From 5da2fa5e95ec3361eba2bfcde46ee9f910576d7b Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Tue, 13 Oct 2009 23:06:19 +0200 Subject: Fixed NAR-39 --- src/it/it0001-executable/pom.xml | 10 +------ src/it/it0002-executable-static/pom.xml | 10 +------ src/it/it0003-jni/pom.xml | 13 +++------ src/it/it0004-java-dep-jni/pom.xml | 10 +++---- src/it/it0005-jni-static/pom.xml | 11 ++------ src/it/it0006-jni-3rdparty/pom.xml | 11 ++------ src/it/it0007-lib-shared/pom.xml | 11 ++------ src/it/it0008-executable-dep-lib-shared/pom.xml | 10 +++---- src/it/it0009-jni-dep-lib-shared/pom.xml | 10 +++---- src/it/it0010-lib-static/pom.xml | 11 ++------ src/it/it0011-executable-dep-lib-static/pom.xml | 10 +++---- src/it/it0012-jni-dep-lib-static/pom.xml | 10 +++---- .../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. http://maven.apache.org/ - integration-test @@ -60,12 +58,6 @@ under the License. - - maven-surefire-plugin - - true - - 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 - integration-test @@ -60,12 +58,6 @@ under the License. - - maven-surefire-plugin - - true - - 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 http://maven.apache.org/ - + true + install @@ -63,12 +62,6 @@ under the License. - - maven-surefire-plugin - - true - - 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 + + true + + integration-test @@ -44,12 +48,6 @@ under the License. maven-nar-plugin true - - maven-surefire-plugin - - true - - 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 http://maven.apache.org/ - install @@ -61,12 +60,6 @@ under the License. - - maven-surefire-plugin - - true - - 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 http://maven.apache.org/ - integration-test @@ -58,12 +57,6 @@ under the License. - - maven-surefire-plugin - - true - - 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 http://maven.apache.org/ - install @@ -64,12 +63,6 @@ under the License. - - maven-surefire-plugin - - true - - 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. Executable depending on a shared library. + + + true + integration-test @@ -53,12 +57,6 @@ under the License. - - maven-surefire-plugin - - true - - 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. + + true + + integration-test @@ -54,12 +58,6 @@ under the License. - - maven-surefire-plugin - - true - - 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 http://maven.apache.org/ - install @@ -64,12 +63,6 @@ under the License. - - maven-surefire-plugin - - true - - 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. + + true + + integration-test @@ -53,12 +57,6 @@ under the License. - - maven-surefire-plugin - - true - - 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 + + true + + integration-test @@ -54,12 +58,6 @@ under the License. - - maven-surefire-plugin - - true - - 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: + *

+ * 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 by setting maven.test.skip.exec to false in your pom. + *

* * @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; -- cgit v1.2.3