[BUILD-194] Pre-configure poms to generate test-jars Created: 05/Feb/15 Updated: 08/Feb/16 Resolved: 16/Mar/15 |
|
| Status: | Closed |
| Project: | Build |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | POMs 31 |
| Type: | New Feature | Priority: | Major |
| Reporter: | Magnolia International | Assignee: | Magnolia International |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Template: |
|
||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Description |
|
We currently copy & paste this snippet when we need to share test-jars:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- let's also attach the test sources -->
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-test-sources</id>
<goals>
<goal>test-jar-no-fork</goal>
</goals>
</execution>
</executions>
Doing this in the parent pom by default might result in unnecessary disk space usage (and perhaps some confusion as to which projects do provide valuable reusable test code) It'd be nice if we could somehow avoid the redundancy. |
| Comments |
| Comment by Magnolia International [ 16/Mar/15 ] |
|
Due to Maven's inability to "process" properties (we can't do ${!buildTestJar}, for example), we introduced a skipTestJar property, which is by default set to true. Projects who want to build a test-jar and test-sources-jar can set the property to false. |