One step closer to a proper test-utils artifact. Using the maven-jar-plugin to create a test classifer, excluding actual tests, until we can properly separate the classes into separate artifacts/modules.
This commit is contained in:
parent
25aee7164e
commit
de13f41fc3
|
|
@ -153,6 +153,6 @@ if [ "${unknown_args}" != "" ]; then
|
|||
else
|
||||
echo "Equivalent maven command"
|
||||
echo "${mvn_cmd}${mvn_properties}${post_script}"
|
||||
# sh -c "${mvn_cmd}${mvn_properties}${post_script}"
|
||||
sh -c "${mvn_cmd}${mvn_properties}${post_script}"
|
||||
|
||||
fi
|
||||
|
|
|
|||
43
pom.xml
43
pom.xml
|
|
@ -33,6 +33,7 @@
|
|||
<!-- TODO: Need a better a way to say "don't include hidden" by default -->
|
||||
<gatkdocs.include.hidden>-build-timestamp "${maven.build.timestamp}"</gatkdocs.include.hidden>
|
||||
<sting.jar.phase>package</sting.jar.phase>
|
||||
<sting.test-utils.jar.phase>none</sting.test-utils.jar.phase>
|
||||
<sting.packagecommittests.skipped>true</sting.packagecommittests.skipped>
|
||||
<sting.packageunittests.skipped>${sting.packagecommittests.skipped}</sting.packageunittests.skipped>
|
||||
<sting.packageintegrationtests.skipped>${sting.packagecommittests.skipped}</sting.packageintegrationtests.skipped>
|
||||
|
|
@ -275,6 +276,41 @@
|
|||
<id>default-jar</id>
|
||||
<phase>${sting.jar.phase}</phase>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>test-utils</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
<phase>${sting.test-utils-jar.phase}</phase>
|
||||
<configuration>
|
||||
<classesDirectory>${project.build.testOutputDirectory}</classesDirectory>
|
||||
<classifier>test-utils</classifier>
|
||||
<!--
|
||||
TODO: Excluding actual tests from tests-utils jar is required because the same test classes
|
||||
TODO: cannot be in both the test artifact AND the test classes directory.
|
||||
|
||||
TODO: Otherwise maven throws an [ERROR] java.lang.RuntimeException: Duplicate test set
|
||||
|
||||
TODO: This is due to AbstractSurefireMojo.scanForTestClasses() adding both scanDirectories() and scanDependencies().
|
||||
TODO: Pain to debug as exception is three maven invoker levels deep, outer maven, maven-inovker-plugin, then forked tests!
|
||||
|
||||
TODO: See also: http://maven.apache.org/plugins/maven-jar-plugin/usage.html#The_preferred_way
|
||||
|
||||
TODO: Then that dependency won't have test classes that will also run from the
|
||||
TODO: test classes directory during the invoked package test.
|
||||
-->
|
||||
<excludes>
|
||||
<exclude>**/*UnitTest.class</exclude>
|
||||
<exclude>**/*UnitTest$*.class</exclude>
|
||||
<exclude>**/*IntegrationTest.class</exclude>
|
||||
<exclude>**/*IntegrationTest$*.class</exclude>
|
||||
<exclude>**/*PipelineTest.class</exclude>
|
||||
<exclude>**/*PipelineTest$*.class</exclude>
|
||||
<exclude>**/*LargeScaleTest.class</exclude>
|
||||
<exclude>**/*LargeScaleTest.class</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
|
|
@ -508,9 +544,6 @@
|
|||
</properties>
|
||||
</configuration>
|
||||
<executions>
|
||||
<!--
|
||||
TODO: see description of disable.gatk-framework.test.dependency in gatk-framework/pom.xml
|
||||
-->
|
||||
<execution>
|
||||
<id>package-unittests</id>
|
||||
<goals>
|
||||
|
|
@ -523,7 +556,6 @@
|
|||
<skipInvocation>${sting.packageunittests.skipped}</skipInvocation>
|
||||
<properties>
|
||||
<unittests.profile.enabled>true</unittests.profile.enabled>
|
||||
<disable.gatk-framework.test.dependency>false</disable.gatk-framework.test.dependency>
|
||||
<sting.packageunittests.skipped>${sting.packageunittests.skipped}</sting.packageunittests.skipped>
|
||||
</properties>
|
||||
</configuration>
|
||||
|
|
@ -541,7 +573,6 @@
|
|||
<skipInvocation>${sting.packageintegrationtests.skipped}</skipInvocation>
|
||||
<properties>
|
||||
<integrationtests.profile.enabled>true</integrationtests.profile.enabled>
|
||||
<disable.gatk-framework.test.dependency>false</disable.gatk-framework.test.dependency>
|
||||
<sting.packageintegrationtests.skipped>${sting.packageintegrationtests.skipped}</sting.packageintegrationtests.skipped>
|
||||
</properties>
|
||||
</configuration>
|
||||
|
|
@ -559,7 +590,6 @@
|
|||
<skipInvocation>${sting.packagepipelinetests.skipped}</skipInvocation>
|
||||
<properties>
|
||||
<integrationtests.profile.enabled>true</integrationtests.profile.enabled>
|
||||
<disable.gatk-framework.test.dependency>false</disable.gatk-framework.test.dependency>
|
||||
<sting.packagepipelinetests.skipped>${sting.packagepipelinetests.skipped}</sting.packagepipelinetests.skipped>
|
||||
</properties>
|
||||
</configuration>
|
||||
|
|
@ -577,7 +607,6 @@
|
|||
<skipInvocation>${sting.packagelargescaletests.skipped}</skipInvocation>
|
||||
<properties>
|
||||
<integrationtests.profile.enabled>true</integrationtests.profile.enabled>
|
||||
<disable.gatk-framework.test.dependency>false</disable.gatk-framework.test.dependency>
|
||||
<sting.packagelargescaletests.skipped>${sting.packagelargescaletests.skipped}</sting.packagelargescaletests.skipped>
|
||||
</properties>
|
||||
</configuration>
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>sting-utils</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
<classifier>test-utils</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>gatk-framework</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
<classifier>test-utils</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
|
|||
|
|
@ -41,12 +41,15 @@
|
|||
<!--
|
||||
Test dependencies are not transitive,
|
||||
so must include each explicit test artifact.
|
||||
|
||||
TODO: switch from test-utils classifier to a tests-utils artifact
|
||||
TODO: see also http://maven.apache.org/plugins/maven-jar-plugin/usage.html#The_preferred_way
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>org.broadinstitute.sting</groupId>
|
||||
<artifactId>sting-utils</artifactId>
|
||||
<version>${sting.version}</version>
|
||||
<type>test-jar</type>
|
||||
<classifier>test-utils</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
@ -54,7 +57,7 @@
|
|||
<groupId>org.broadinstitute.sting</groupId>
|
||||
<artifactId>gatk-framework</artifactId>
|
||||
<version>${sting.version}</version>
|
||||
<type>test-jar</type>
|
||||
<classifier>test-utils</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
<properties>
|
||||
<sting.basedir>${project.basedir}/../..</sting.basedir>
|
||||
<sting.packagetests.artifactId>gatk-package</sting.packagetests.artifactId>
|
||||
<sting.test-utils-jar.phase>${sting.jar.phase}</sting.test-utils-jar.phase>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
@ -29,7 +30,7 @@
|
|||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>sting-utils</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
<classifier>test-utils</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
@ -77,66 +78,29 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!--
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>test-jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!--
|
||||
TODO: disable.gatk-framework.test.dependency is required because the the same test classes
|
||||
TODO: cannot be in both the gatk-framework test artifact AND the test classes directory.
|
||||
|
||||
TODO: Otherwise maven throws an [ERROR] java.lang.RuntimeException: Duplicate test set
|
||||
|
||||
TODO: This is due to AbstractSurefireMojo.scanForTestClasses() adding both scanDirectories() and scanDependencies().
|
||||
TODO: Pain to debug as exception is three maven invoker levels deep, outer maven, maven-inovker-plugin, then forked tests!
|
||||
|
||||
TODO: Move BaseTest and other non UnitTests into the sting-utils test jar/artifact.
|
||||
|
||||
TODO: Then that dependency won't have test classes that will also run from the gatk-framework
|
||||
TODO: test classes directory during the invoked package test.
|
||||
-->
|
||||
-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-invoker-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>package-unittests</id>
|
||||
<configuration>
|
||||
<properties>
|
||||
<disable.gatk-framework.test.dependency>true</disable.gatk-framework.test.dependency>
|
||||
</properties>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>package-integrationtests</id>
|
||||
<configuration>
|
||||
<properties>
|
||||
<disable.gatk-framework.test.dependency>true</disable.gatk-framework.test.dependency>
|
||||
</properties>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>package-largescaletests</id>
|
||||
<configuration>
|
||||
<properties>
|
||||
<disable.gatk-framework.test.dependency>true</disable.gatk-framework.test.dependency>
|
||||
</properties>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>package-pipelinetests</id>
|
||||
<configuration>
|
||||
<properties>
|
||||
<disable.gatk-framework.test.dependency>true</disable.gatk-framework.test.dependency>
|
||||
</properties>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
|
|
|||
|
|
@ -47,6 +47,14 @@
|
|||
<artifactId>cofoja</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>gatk-framework</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>test-utils</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
|
|
@ -65,27 +73,6 @@
|
|||
</build>
|
||||
|
||||
<profiles>
|
||||
<!--
|
||||
TODO: see description of disable.gatk-framework.test.dependency in gatk-framework/pom.xml
|
||||
-->
|
||||
<profile>
|
||||
<id>include-gatk-framework-tests</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>disable.gatk-framework.test.dependency</name>
|
||||
<value>false</value>
|
||||
</property>
|
||||
</activation>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>gatk-framework</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>unittests</id>
|
||||
<activation>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
<gatk.extensions.sources>${project.build.directory}/generated-sources/gatk-extensions</gatk.extensions.sources>
|
||||
<sting.generate-gatk-extensions.skipped>false</sting.generate-gatk-extensions.skipped>
|
||||
<sting.packagetests.artifactId>queue-package</sting.packagetests.artifactId>
|
||||
<sting.test-utils-jar.phase>${sting.jar.phase}</sting.test-utils-jar.phase>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
@ -65,7 +66,7 @@
|
|||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>gatk-framework</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
<classifier>test-utils</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
@ -170,17 +171,6 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>test-jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-invoker-plugin</artifactId>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
<sting.basedir>${project.basedir}/../..</sting.basedir>
|
||||
<gsalib.packagedir>org/broadinstitute/sting/utils/R</gsalib.packagedir>
|
||||
<gsalib.filename>gsalib.tar.gz</gsalib.filename>
|
||||
<sting.test-utils-jar.phase>${sting.jar.phase}</sting.test-utils-jar.phase>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
@ -154,17 +155,6 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>test-jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
|||
Loading…
Reference in New Issue