Skip to content

Commit 09af43f

Browse files
author
alextunyk
committed
cleaned up and fixed pom file: generate doc folder only if profile is 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)
1 parent 13aa190 commit 09af43f

File tree

3 files changed

+31
-56
lines changed

3 files changed

+31
-56
lines changed

build.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
mvn clean package javadoc:jar javadoc:test-jar source:jar source:test-jar site:jar assembly:single resources:copy-resources
1+
mvn clean package javadoc:jar javadoc:test-jar source:jar source:test-jar site:jar assembly:single -P doc-folder-generation

build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/sh
2-
mvn clean package javadoc:jar javadoc:test-jar source:jar source:test-jar site:jar assembly:single resources:copy-resources
2+
mvn clean package javadoc:jar javadoc:test-jar source:jar source:test-jar site:jar assembly:single -P doc-folder-generation

pom.xml

+29-54
Original file line numberDiff line numberDiff line change
@@ -136,21 +136,6 @@
136136
<connectionUrl>scm:svn:http://htmlcompressor.googlecode.com/svn/trunk/</connectionUrl>
137137
</configuration>
138138
</plugin>
139-
<!-- Maven GPG Plugin (will be trigered only for releases, see profiles below) -->
140-
<!--<plugin>
141-
<groupId>org.apache.maven.plugins</groupId>
142-
<artifactId>maven-gpg-plugin</artifactId>
143-
<version>1.3</version>
144-
<executions>
145-
<execution>
146-
<id>sign-artifacts</id>
147-
<phase>verify</phase>
148-
<goals>
149-
<goal>sign</goal>
150-
</goals>
151-
</execution>
152-
</executions>
153-
</plugin>-->
154139
<!-- Assemble distribution package -->
155140
<plugin>
156141
<artifactId>maven-assembly-plugin</artifactId>
@@ -173,29 +158,6 @@
173158
<notimestamp>true</notimestamp>
174159
</configuration>
175160
</plugin>
176-
<!-- Copy javadocs -->
177-
<plugin>
178-
<artifactId>maven-resources-plugin</artifactId>
179-
<version>2.5</version>
180-
<configuration>
181-
<outputDirectory>doc</outputDirectory>
182-
<resources>
183-
<resource>
184-
<directory>target/apidocs</directory>
185-
</resource>
186-
</resources>
187-
</configuration>
188-
<!-- disable execution due to error during release: locally modified files -->
189-
<!--<executions>
190-
<execution>
191-
<id>copy-resources</id>
192-
<phase>validate</phase>
193-
<goals>
194-
<goal>copy-resources</goal>
195-
</goals>
196-
</execution>
197-
</executions>-->
198-
</plugin>
199161
</plugins>
200162
</build>
201163

@@ -282,22 +244,6 @@
282244
<tag>HEAD</tag>
283245
<url>http://code.google.com/p/htmlcompressor/source/browse/</url>
284246
</scm>
285-
<!--<distributionManagement>-->
286-
<!-- use the following if you're not using a snapshot version. -->
287-
<!--<repository>
288-
<id>maven-staging-repo</id>
289-
<name>Maven Staging Repository</name>
290-
<url>scp://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
291-
</repository>-->
292-
<!-- use the following if you ARE using a snapshot version. -->
293-
<!--
294-
<snapshotRepository>
295-
<id>maven-snapshot-repo</id>
296-
<name>Maven Snapshot Repository</name>
297-
<url>scp://oss.sonatype.org/content/repositories/snapshots/</url>
298-
</snapshotRepository>
299-
-->
300-
<!--</distributionManagement>-->
301247

302248
<!-- ====================================================================== -->
303249
<!-- Profile Settings -->
@@ -329,6 +275,35 @@
329275
</plugin>
330276
</plugins>
331277
</build>
278+
</profile>
279+
<profile>
280+
<id>doc-folder-generation</id>
281+
<build>
282+
<plugins>
283+
<!-- Copy javadocs -->
284+
<plugin>
285+
<artifactId>maven-resources-plugin</artifactId>
286+
<version>2.5</version>
287+
<executions>
288+
<execution>
289+
<id>copy-resources</id>
290+
<phase>validate</phase>
291+
<goals>
292+
<goal>copy-resources</goal>
293+
</goals>
294+
<configuration>
295+
<outputDirectory>doc</outputDirectory>
296+
<resources>
297+
<resource>
298+
<directory>target/apidocs</directory>
299+
</resource>
300+
</resources>
301+
</configuration>
302+
</execution>
303+
</executions>
304+
</plugin>
305+
</plugins>
306+
</build>
332307
</profile>
333308
</profiles>
334309
</project>

0 commit comments

Comments
 (0)