diff options
-rw-r--r-- | src/it/it0001-executable/pom.xml | 10 | ||||
-rw-r--r-- | src/it/it0002-executable-static/pom.xml | 10 | ||||
-rw-r--r-- | src/it/it0003-jni/pom.xml | 13 | ||||
-rw-r--r-- | src/it/it0004-java-dep-jni/pom.xml | 10 | ||||
-rw-r--r-- | src/it/it0005-jni-static/pom.xml | 11 | ||||
-rw-r--r-- | src/it/it0006-jni-3rdparty/pom.xml | 11 | ||||
-rw-r--r-- | src/it/it0007-lib-shared/pom.xml | 11 | ||||
-rw-r--r-- | src/it/it0008-executable-dep-lib-shared/pom.xml | 10 | ||||
-rw-r--r-- | src/it/it0009-jni-dep-lib-shared/pom.xml | 10 | ||||
-rw-r--r-- | src/it/it0010-lib-static/pom.xml | 11 | ||||
-rw-r--r-- | src/it/it0011-executable-dep-lib-static/pom.xml | 10 | ||||
-rw-r--r-- | src/it/it0012-jni-dep-lib-static/pom.xml | 10 | ||||
-rw-r--r-- | src/main/java/org/apache/maven/plugin/nar/NarIntegrationTestMojo.java | 31 |
13 files changed, 55 insertions, 103 deletions
diff --git a/src/it/it0001-executable/pom.xml b/src/it/it0001-executable/pom.xml index 63391cf..d938b5d 100644 --- a/src/it/it0001-executable/pom.xml +++ b/src/it/it0001-executable/pom.xml @@ -39,11 +39,9 @@ under the License. </description> <url>http://maven.apache.org/</url> -<!-- <properties> - <maven.test.skip>true</maven.test.skip> + <maven.test.skip.exec>true</maven.test.skip.exec> </properties> ---> <build> <defaultGoal>integration-test</defaultGoal> @@ -60,12 +58,6 @@ under the License. </libraries> </configuration> </plugin> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - </plugin> </plugins> </build> </project> diff --git a/src/it/it0002-executable-static/pom.xml b/src/it/it0002-executable-static/pom.xml index 42d4e8b..9a22bae 100644 --- a/src/it/it0002-executable-static/pom.xml +++ b/src/it/it0002-executable-static/pom.xml @@ -38,11 +38,9 @@ under the License. Simple executable statically linked with the c runtime </description> -<!-- <properties> - <maven.test.skip>true</maven.test.skip> + <maven.test.skip.exec>true</maven.test.skip.exec> </properties> ---> <build> <defaultGoal>integration-test</defaultGoal> @@ -60,12 +58,6 @@ under the License. </libraries> </configuration> </plugin> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - </plugin> </plugins> </build> </project> diff --git a/src/it/it0003-jni/pom.xml b/src/it/it0003-jni/pom.xml index 18ad2d8..6941f3d 100644 --- a/src/it/it0003-jni/pom.xml +++ b/src/it/it0003-jni/pom.xml @@ -38,11 +38,10 @@ under the License. Simple JNI Library </description> <url>http://maven.apache.org/</url> -<!-- + <properties> - <maven.test.skip>true</maven.test.skip> - </properties> ---> + <maven.test.skip.exec>true</maven.test.skip.exec> + </properties> <build> <defaultGoal>install</defaultGoal> @@ -63,12 +62,6 @@ under the License. </libraries> </configuration> </plugin> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - </plugin> </plugins> </build> </project> diff --git a/src/it/it0004-java-dep-jni/pom.xml b/src/it/it0004-java-dep-jni/pom.xml index 2901f12..97d0e55 100644 --- a/src/it/it0004-java-dep-jni/pom.xml +++ b/src/it/it0004-java-dep-jni/pom.xml @@ -37,6 +37,10 @@ under the License. Java class which depends on a separate JNI library </description> + <properties> + <maven.test.skip.exec>true</maven.test.skip.exec> + </properties> + <build> <defaultGoal>integration-test</defaultGoal> <plugins> @@ -44,12 +48,6 @@ under the License. <artifactId>maven-nar-plugin</artifactId> <extensions>true</extensions> </plugin> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - </plugin> </plugins> </build> diff --git a/src/it/it0005-jni-static/pom.xml b/src/it/it0005-jni-static/pom.xml index f27a874..4c14526 100644 --- a/src/it/it0005-jni-static/pom.xml +++ b/src/it/it0005-jni-static/pom.xml @@ -38,11 +38,10 @@ under the License. Simple Static JNI Library </description> <url>http://maven.apache.org/</url> -<!-- + <properties> - <maven.test.skip>true</maven.test.skip> + <maven.test.skip.exec>true</maven.test.skip.exec> </properties> ---> <build> <defaultGoal>install</defaultGoal> @@ -61,12 +60,6 @@ under the License. </libraries> </configuration> </plugin> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - </plugin> </plugins> </build> </project> diff --git a/src/it/it0006-jni-3rdparty/pom.xml b/src/it/it0006-jni-3rdparty/pom.xml index 65602e6..b3f5647 100644 --- a/src/it/it0006-jni-3rdparty/pom.xml +++ b/src/it/it0006-jni-3rdparty/pom.xml @@ -38,11 +38,10 @@ under the License. Java class that uses a 3rd party JNI and its library </description> <url>http://maven.apache.org/</url> -<!-- + <properties> - <maven.test.skip>true</maven.test.skip> + <maven.test.skip.exec>true</maven.test.skip.exec> </properties> ---> <build> <defaultGoal>integration-test</defaultGoal> @@ -58,12 +57,6 @@ under the License. </libraries> </configuration> </plugin> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - </plugin> </plugins> </build> </project> diff --git a/src/it/it0007-lib-shared/pom.xml b/src/it/it0007-lib-shared/pom.xml index 893ced1..aa6d790 100644 --- a/src/it/it0007-lib-shared/pom.xml +++ b/src/it/it0007-lib-shared/pom.xml @@ -38,11 +38,10 @@ under the License. Simple shared library and test file </description> <url>http://maven.apache.org/</url> -<!-- + <properties> - <maven.test.skip>true</maven.test.skip> + <maven.test.skip.exec>true</maven.test.skip.exec> </properties> ---> <build> <defaultGoal>install</defaultGoal> @@ -64,12 +63,6 @@ under the License. </tests> </configuration> </plugin> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - </plugin> </plugins> </build> </project> diff --git a/src/it/it0008-executable-dep-lib-shared/pom.xml b/src/it/it0008-executable-dep-lib-shared/pom.xml index 7ce981b..1f12ed5 100644 --- a/src/it/it0008-executable-dep-lib-shared/pom.xml +++ b/src/it/it0008-executable-dep-lib-shared/pom.xml @@ -37,6 +37,10 @@ under the License. <description> Executable depending on a shared library. </description> + + <properties> + <maven.test.skip.exec>true</maven.test.skip.exec> + </properties> <build> <defaultGoal>integration-test</defaultGoal> @@ -53,12 +57,6 @@ under the License. </libraries> </configuration> </plugin> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - </plugin> </plugins> </build> <dependencies> diff --git a/src/it/it0009-jni-dep-lib-shared/pom.xml b/src/it/it0009-jni-dep-lib-shared/pom.xml index e211c83..a1e570a 100644 --- a/src/it/it0009-jni-dep-lib-shared/pom.xml +++ b/src/it/it0009-jni-dep-lib-shared/pom.xml @@ -38,6 +38,10 @@ under the License. JNI depending on a shared library. </description> + <properties> + <maven.test.skip.exec>true</maven.test.skip.exec> + </properties> + <build> <defaultGoal>integration-test</defaultGoal> <plugins> @@ -54,12 +58,6 @@ under the License. </libraries> </configuration> </plugin> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - </plugin> </plugins> </build> diff --git a/src/it/it0010-lib-static/pom.xml b/src/it/it0010-lib-static/pom.xml index 864019b..dfcf047 100644 --- a/src/it/it0010-lib-static/pom.xml +++ b/src/it/it0010-lib-static/pom.xml @@ -38,11 +38,10 @@ under the License. Simple static library and test file </description> <url>http://maven.apache.org/</url> -<!-- + <properties> - <maven.test.skip>true</maven.test.skip> + <maven.test.skip.exec>true</maven.test.skip.exec> </properties> ---> <build> <defaultGoal>install</defaultGoal> @@ -64,12 +63,6 @@ under the License. </tests> </configuration> </plugin> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - </plugin> </plugins> </build> </project> diff --git a/src/it/it0011-executable-dep-lib-static/pom.xml b/src/it/it0011-executable-dep-lib-static/pom.xml index 74b92cd..62795a5 100644 --- a/src/it/it0011-executable-dep-lib-static/pom.xml +++ b/src/it/it0011-executable-dep-lib-static/pom.xml @@ -38,6 +38,10 @@ under the License. Executable depending on a static library. </description> + <properties> + <maven.test.skip.exec>true</maven.test.skip.exec> + </properties> + <build> <defaultGoal>integration-test</defaultGoal> <plugins> @@ -53,12 +57,6 @@ under the License. </libraries> </configuration> </plugin> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - </plugin> </plugins> </build> diff --git a/src/it/it0012-jni-dep-lib-static/pom.xml b/src/it/it0012-jni-dep-lib-static/pom.xml index d63def0..e09f463 100644 --- a/src/it/it0012-jni-dep-lib-static/pom.xml +++ b/src/it/it0012-jni-dep-lib-static/pom.xml @@ -38,6 +38,10 @@ under the License. JNI </description> + <properties> + <maven.test.skip.exec>true</maven.test.skip.exec> + </properties> + <build> <defaultGoal>integration-test</defaultGoal> <plugins> @@ -54,12 +58,6 @@ under the License. </libraries> </configuration> </plugin> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skip>true</skip> - </configuration> - </plugin> </plugins> </build> diff --git a/src/main/java/org/apache/maven/plugin/nar/NarIntegrationTestMojo.java b/src/main/java/org/apache/maven/plugin/nar/NarIntegrationTestMojo.java index ede37b5..ca2a1ec 100644 --- a/src/main/java/org/apache/maven/plugin/nar/NarIntegrationTestMojo.java +++ b/src/main/java/org/apache/maven/plugin/nar/NarIntegrationTestMojo.java @@ -60,11 +60,20 @@ import org.codehaus.plexus.util.StringUtils; /** * Run integration tests using Surefire. This goal was copied from Maven's surefire plugin to accomodate a few things - * for the NAR plugin: 1. To test a jar file with its native module we can only run after the package phase, so we use - * the integration-test phase. 2. We need to set java.library.path to an AOL (architecture-os-linker) specific value, - * but AOL is only known in the NAR plugin and thus cannot be set from the pom. 3. To have the java.library.path - * definition picked up by java we need the "pertest" forkmode. To use this goal you need to put the test sources in the - * regular test directories but disable the running of the tests by the maven-surefire-plugin. + * for the NAR plugin: + * <P> + * 1. To test a jar file with its native module we can only run after the package phase, so we use the integration-test + * phase. + * </P> + * <P> + * 2. We need to set java.library.path to an AOL (architecture-os-linker) specific value, but AOL is only known in the + * NAR plugin and thus cannot be set from the pom. + * </P> + * <P> + * 3. To have the java.library.path definition picked up by java we need the "pertest" forkmode. To use this goal you + * need to put the test sources in the regular test directories but disable the running of the tests by the + * maven-surefire-plugin by setting maven.test.skip.exec to false in your pom. + * </P> * * @author Jason van Zyl (modified by Mark Donszelmann, noted by DUNS) * @version 2.3 maven repository maven-surefire-plugin and changes by DUNS @@ -104,26 +113,29 @@ public class NarIntegrationTestMojo */ private boolean skipNAR; + // DUNS changed to nar. because of naming conflict /** * Set this to 'true' to bypass unit tests entirely. Its use is NOT RECOMMENDED, but quite convenient on occasion. * - * @parameter expression="${maven.test.skip}" + * @parameter expression="${nar.test.skip}" */ private boolean skip; + // DUNS changed to nar. because of naming conflict /** * Set this to 'true' to bypass unit tests execution, but still compile them. Its use is NOT RECOMMENDED, but quite * convenient on occasion. * - * @parameter expression="${maven.test.skip.exec}" + * @parameter expression="${nar.test.skip.exec}" */ private boolean skipExec; + // DUNS changed to nar. because of naming conflict /** * Set this to true to ignore a failure during testing. Its use is NOT RECOMMENDED, but quite convenient on * occasion. * - * @parameter expression="${maven.test.failure.ignore}" + * @parameter expression="${nar.test.failure.ignore}" */ private boolean testFailureIgnore; @@ -261,11 +273,12 @@ public class NarIntegrationTestMojo */ private boolean useFile; + // DUNS changed to nar. because of naming conflict /** * When forking, set this to true to redirect the unit test standard output to a file (found in * reportsDirectory/testName-output.txt). * - * @parameter expression="${maven.test.redirectTestOutputToFile}" default-value="false" + * @parameter expression="${nar.test.redirectTestOutputToFile}" default-value="false" */ private boolean redirectTestOutputToFile; |