Seen the error of my ways. The "mvn package" command should be default just build the Checkstyle JAR as this is what will be released in the Maven Central Repository.

To generate the distributions, use the command "mvn -Pdistro package". This activates the distro profile that will generate the distributions.
This commit is contained in:
Oliver Burn 2010-09-23 23:50:15 +00:00
parent 3765156a81
commit 1a99a22d57
1 changed files with 76 additions and 59 deletions

135
pom.xml
View File

@ -192,6 +192,15 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<xdocDirectory>${basedir}/src/xdocs</xdocDirectory>
<validate>true</validate>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
@ -279,24 +288,6 @@
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<executions>
<execution>
<id>gen-site</id>
<phase>prepare-package</phase>
<goals>
<goal>site</goal>
</goals>
</execution>
</executions>
<configuration>
<xdocDirectory>${basedir}/src/xdocs</xdocDirectory>
<validate>true</validate>
</configuration>
</plugin>
<!-- Used to set custom properties -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@ -332,28 +323,6 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>all</shadedClassifierName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.puppycrawl.tools.checkstyle.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<!-- Ensure the manifest has all the gory details -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@ -368,25 +337,6 @@
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>config/assembly-bin.xml</descriptor>
<descriptor>config/assembly-src.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-bundle</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
@ -440,6 +390,73 @@
</reporting>
<profiles>
<profile>
<!-- To be used when making distributions. Run the command-->
<!-- mvn -Pdistro package -->
<id>distro</id>
<build>
<plugins>
<!-- Generates the site, which is required for assembly -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<executions>
<execution>
<id>gen-site</id>
<phase>prepare-package</phase>
<goals>
<goal>site</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Creates the all inclusive uber jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>all</shadedClassifierName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.puppycrawl.tools.checkstyle.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<!-- Creates the binary and source distributions -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>config/assembly-bin.xml</descriptor>
<descriptor>config/assembly-src.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-bundle</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<distributionManagement>