aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Marius Venstad <jvenstad@yahoo-inc.com>2018-11-02 15:02:10 +0100
committerJon Marius Venstad <jvenstad@yahoo-inc.com>2018-11-02 15:02:10 +0100
commit36587c72f7e715a63bef8a9964610588acf5f2eb (patch)
treebea8513aa58453c14e7c37551c7869ae34d6db16
parent644630efa8afae5944e8e68c996bd3219ae44130 (diff)
Separate jar with tests to scan to avoid Surefire breakdown
-rw-r--r--tenant-base/pom.xml23
1 files changed, 16 insertions, 7 deletions
diff --git a/tenant-base/pom.xml b/tenant-base/pom.xml
index 51d830f0e7d..a29302f9ab4 100644
--- a/tenant-base/pom.xml
+++ b/tenant-base/pom.xml
@@ -78,12 +78,13 @@
<profiles>
<profile>
- <!-- Build *-fat-test.jar file that includes all classes and resources
- that are part of the class path during test and put it inside a zip:
+ <!-- Build *-fat-test.jar file that includes all non-test classes and resources
+ that are part of the class path during test and and test.jar that includes
+ all test classes and resources, and put it inside a zip:
1. application classes and resources
2. test classes and resources
3. classes and resources in all dependencies of both (1) and (2)
- 4. copy the fat-test-jar to application-test/artifacts directory
+ 4. copy the fat-test-jar and test-jar to application-test/artifacts directory
5. zip application-test -->
<id>fat-test-application</id>
<build>
@@ -154,10 +155,6 @@
<resource>
<directory>target/classes</directory>
</resource>
- <!-- test classes and resources, see 2. above -->
- <resource>
- <directory>target/test-classes</directory>
- </resource>
</resources>
</configuration>
</execution>
@@ -169,6 +166,7 @@
<version>3.1.0</version>
<executions>
<execution>
+ <id>fat-test-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
@@ -178,6 +176,13 @@
<classifier>fat-test</classifier>
</configuration>
</execution>
+ <execution>
+ <id>test-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
</executions>
</plugin>
<plugin>
@@ -196,6 +201,10 @@
<copy file="target/${project.artifactId}-fat-test.jar"
todir="target/application-test/artifacts/" />
+ <!-- copy slim test-jar to application-test artifacts directory, see 4. above -->
+ <copy file="target/${project.artifactId}-tests.jar"
+ todir="target/application-test/artifacts/" />
+
<!-- zip application-test, see 5. above -->
<zip destfile="target/application-test.zip"
basedir="target/application-test/" />