Skip to content
This repository has been archived by the owner on May 20, 2022. It is now read-only.

Commit

Permalink
cleaned up and fixed pom file: generate doc folder only if profile is…
Browse files Browse the repository at this point in the history
… active, updated build.bat and build.sh to activate that provile out of the box. So doc folder will be generated only if you run build.bat/build.sh (in all other cases doc copying is ignored)
  • Loading branch information
alextunyk committed Jul 6, 2011
1 parent 13aa190 commit 09af43f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 56 deletions.
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mvn clean package javadoc:jar javadoc:test-jar source:jar source:test-jar site:jar assembly:single resources:copy-resources
mvn clean package javadoc:jar javadoc:test-jar source:jar source:test-jar site:jar assembly:single -P doc-folder-generation
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
mvn clean package javadoc:jar javadoc:test-jar source:jar source:test-jar site:jar assembly:single resources:copy-resources
mvn clean package javadoc:jar javadoc:test-jar source:jar source:test-jar site:jar assembly:single -P doc-folder-generation
83 changes: 29 additions & 54 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,21 +136,6 @@
<connectionUrl>scm:svn:http://htmlcompressor.googlecode.com/svn/trunk/</connectionUrl>
</configuration>
</plugin>
<!-- Maven GPG Plugin (will be trigered only for releases, see profiles below) -->
<!--<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>-->
<!-- Assemble distribution package -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
Expand All @@ -173,29 +158,6 @@
<notimestamp>true</notimestamp>
</configuration>
</plugin>
<!-- Copy javadocs -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<outputDirectory>doc</outputDirectory>
<resources>
<resource>
<directory>target/apidocs</directory>
</resource>
</resources>
</configuration>
<!-- disable execution due to error during release: locally modified files -->
<!--<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
</execution>
</executions>-->
</plugin>
</plugins>
</build>

Expand Down Expand Up @@ -282,22 +244,6 @@
<tag>HEAD</tag>
<url>http://code.google.com/p/htmlcompressor/source/browse/</url>
</scm>
<!--<distributionManagement>-->
<!-- use the following if you're not using a snapshot version. -->
<!--<repository>
<id>maven-staging-repo</id>
<name>Maven Staging Repository</name>
<url>scp://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>-->
<!-- use the following if you ARE using a snapshot version. -->
<!--
<snapshotRepository>
<id>maven-snapshot-repo</id>
<name>Maven Snapshot Repository</name>
<url>scp://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
-->
<!--</distributionManagement>-->

<!-- ====================================================================== -->
<!-- Profile Settings -->
Expand Down Expand Up @@ -329,6 +275,35 @@
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>doc-folder-generation</id>
<build>
<plugins>
<!-- Copy javadocs -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>doc</outputDirectory>
<resources>
<resource>
<directory>target/apidocs</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 09af43f

Please sign in to comment.