MAVEN PLUGIN(S) SERIES - support zip packaging


Purpose of series ... 


In my "day by day" experience as Java Architect, i'm involved in deep on processes concerning Application Lifecycle Management   (ALM). We use Apache Maven as ingredient technology and we always dealing with need to find the best plugin (Mojo) that accomplish our requirements.


So i've decided to share this experience providing a briefly description of most useful (or unusual) plugins discovered during my work.



First One - ZIP Bundle Maven Plugin

Description

Typically a Maven user, to provide a zip as deliverable of his project, uses the famous maven assembly plugin  The common approach is declare the packaging of the project as pom and invoke the assembly plugin, for zip creation and attachment it to the deploy phase.

The ZIP Bundle Maven Plugin, allow us to continue using assembly plugin and also to declare the packaging as zip instead of pom.  


Usage

The basic usage is shown below (from official site)


<project>
  ...
  <packaging>zip</packaging>
  ...
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.3</version>
          <configuration>
            <descriptors>
              <descriptor>src/main/assembly/zip.xml</descriptor>
            </descriptors>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

      <plugins>
          <plugin>
              <groupId>com.maestrodev</groupId>
              <artifactId>zip-bundle-maven-plugin</artifactId>
              <version>1.0</version>
              <extensions>true</extensions>
          </plugin>          
      </plugins>

  </build>
</project>




Release

The current release is the 1.0 deployed in june  2012

Repository

Such release has been deployed into following repository
https://repo.maestrodev.com/archiva/repository/ZIP.Bundle.Maven.Plugin.releases


  <pluginRepositories>
      <pluginRepository>
          <id>mastrodev</id>
          <url>https://repo.maestrodev.com/archiva/repository/ZIP.Bundle.Maven.Plugin.releases</url>
          <releases>
              <enabled>true</enabled>
          </releases>
          <snapshots>
              <enabled>false</enabled>
          </snapshots>
      </pluginRepository>
  </pluginRepositories>

Comments

Popular posts from this blog

Google Web Toolkit Vs AngularJS

PlantText: The new "Online" UML Editor powered by PlantUML

PlantUML & Maven - Enrich your project's documentation