You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mb...@apache.org on 2015/12/17 22:53:46 UTC
svn commit: r1720674 - /commons/proper/weaver/trunk/parent/pom.xml
Author: mbenson
Date: Thu Dec 17 21:53:46 2015
New Revision: 1720674
URL: http://svn.apache.org/viewvc?rev=1720674&view=rev
Log:
only create test* jars if there are actually unit tests
Modified:
commons/proper/weaver/trunk/parent/pom.xml
Modified: commons/proper/weaver/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/parent/pom.xml?rev=1720674&r1=1720673&r2=1720674&view=diff
==============================================================================
--- commons/proper/weaver/trunk/parent/pom.xml (original)
+++ commons/proper/weaver/trunk/parent/pom.xml Thu Dec 17 21:53:46 2015
@@ -243,22 +243,6 @@ under the License.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-test-jar</id>
- <phase>package</phase>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <skipIfEmpty>true</skipIfEmpty>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
@@ -284,32 +268,6 @@ under the License.
<goal>jar-no-fork</goal>
</goals>
</execution>
- <execution>
- <id>attach-test-sources</id>
- <goals>
- <goal>test-jar-no-fork</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-test-notices</id>
- <phase>generate-test-resources</phase>
- <goals>
- <goal>add-test-resource</goal>
- </goals>
- <configuration>
- <resources>
- <resource>
- <directory>${project.build.directory}/generated-test-resources/notices</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
</executions>
</plugin>
</plugins>
@@ -426,6 +384,66 @@ under the License.
</plugin>
</plugins>
</build>
+ </profile>
+ <profile>
+ <id>unit-tests</id>
+ <activation>
+ <file>
+ <exists>src/test</exists>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-test-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <skipIfEmpty>true</skipIfEmpty>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-test-sources</id>
+ <goals>
+ <goal>test-jar-no-fork</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-test-notices</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>add-test-resource</goal>
+ </goals>
+ <configuration>
+ <resources>
+ <resource>
+ <directory>${project.build.directory}/generated-test-resources/notices</directory>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</profile>
</profiles>
</project>