From 3d36be1293200ddf6d6eb266e2c468c0b750601b Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Tue, 1 Dec 2009 14:19:56 +0100 Subject: Fixed NAR-18 --- .../maven/plugin/nar/NarIntegrationTestMojo.java | 45 ++++++++-------------- .../maven/plugin/nar/NarTestCompileMojo.java | 8 +++- src/site/apt/configuration.apt | 2 + 3 files changed, 25 insertions(+), 30 deletions(-) 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 28c47ee..bd86ed8 100644 --- a/src/main/java/org/apache/maven/plugin/nar/NarIntegrationTestMojo.java +++ b/src/main/java/org/apache/maven/plugin/nar/NarIntegrationTestMojo.java @@ -106,21 +106,21 @@ public class NarIntegrationTestMojo // DUNS added because of naming conflict /** - * Skip running of NAR plugins (any) altogether. - * - * @parameter expression="${nar.skip}" default-value="false" + * Skip running of NAR integration test plugin + * + * @parameter expression="${skipNar}" default-value="false" */ - private boolean skipNAR; - + private boolean skipNar; + // DUNS changed to nar. because of naming conflict /** * Set this to 'true' to skip running tests, but still compile them. Its use is NOT RECOMMENDED, but quite * convenient on occasion. * - * @parameter expression="${nar.skipTests}" + * @parameter expression="${skipNarTests}" * @since 2.4 */ - private boolean skipTests; + private boolean skipNarTests; // DUNS changed to nar. because of naming conflict /** @@ -131,18 +131,8 @@ public class NarIntegrationTestMojo * @parameter expression="${nar.test.skip.exec}" * @since 2.3 */ - private boolean skipExec; + private boolean skipNarExec; - // DUNS changed to nar. because of naming conflict - /** - * Set this to 'true' to bypass unit tests entirely. Its use is NOT RECOMMENDED, especially if you - * enable it using the "maven.test.skip" property, because maven.test.skip disables both running the - * tests and compiling the tests. Consider using the skipTests parameter instead. - * - * @parameter expression="${nar.test.skip}" - */ - private boolean skip; - // 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 @@ -631,17 +621,14 @@ public class NarIntegrationTestMojo private boolean verifyParameters() throws MojoFailureException - { - // DUNS, shouldSkip() does not work... - if ( skipNAR ) - { - getLog().info( "***********************************************************************" ); - getLog().info( "NAR Integration Tests are SKIPPED since no NAR libraries were built." ); - getLog().info( "***********************************************************************" ); + { + // DUNS + if (shouldSkip() ) { return false; } - - if ( skip || skipTests || skipExec ) + + // DUNS + if ( skipNar || skipNarTests || skipNarExec ) { getLog().info( "Tests are skipped." ); return false; @@ -1272,7 +1259,7 @@ public class NarIntegrationTestMojo */ public boolean isSkipExec() { - return this.skipTests; + return this.skipNarTests; } /** @@ -1280,7 +1267,7 @@ public class NarIntegrationTestMojo */ public void setSkipExec( boolean skipExec ) { - this.skipTests = skipExec; + this.skipNarTests = skipExec; } //TODO remove the part with ToolchainManager lookup once we depend on diff --git a/src/main/java/org/apache/maven/plugin/nar/NarTestCompileMojo.java b/src/main/java/org/apache/maven/plugin/nar/NarTestCompileMojo.java index 6fd47ac..db5c3bf 100644 --- a/src/main/java/org/apache/maven/plugin/nar/NarTestCompileMojo.java +++ b/src/main/java/org/apache/maven/plugin/nar/NarTestCompileMojo.java @@ -49,11 +49,17 @@ import org.apache.tools.ant.Project; public class NarTestCompileMojo extends AbstractCompileMojo { + /** + * Skip running of NAR integration test plugins. + * + * @parameter expression="${skipNar}" default-value="false" + */ + private boolean skipNar; public final void execute() throws MojoExecutionException, MojoFailureException { - if ( shouldSkip() ) + if ( shouldSkip() || skipNar) { return; } diff --git a/src/site/apt/configuration.apt b/src/site/apt/configuration.apt index 0c52546..8fa5d20 100644 --- a/src/site/apt/configuration.apt +++ b/src/site/apt/configuration.apt @@ -12,6 +12,8 @@ NAR Configuration +-- + + -- cgit v1.2.3