From 7eb1e97c0a34b10a2d6724e8907ed3183fc97bcb Mon Sep 17 00:00:00 2001 From: Volker Schumacher Date: Fri, 18 Dec 2009 10:43:49 +0800 Subject: Moved NarLayout properties up to AbstractNarMojo. --- .../maven/plugin/nar/AbstractCompileMojo.java | 24 ---------------------- .../apache/maven/plugin/nar/AbstractNarMojo.java | 21 +++++++++++++++++++ 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/src/main/java/org/apache/maven/plugin/nar/AbstractCompileMojo.java b/src/main/java/org/apache/maven/plugin/nar/AbstractCompileMojo.java index c04660d..876f152 100644 --- a/src/main/java/org/apache/maven/plugin/nar/AbstractCompileMojo.java +++ b/src/main/java/org/apache/maven/plugin/nar/AbstractCompileMojo.java @@ -129,18 +129,6 @@ public abstract class AbstractCompileMojo */ private Java java; - /** - * Layout to be used for building and unpacking artifacts - * - * @parameter expression="${nar.layout}" default-value="org.apache.maven.plugin.nar.NarLayout21" - * @required - */ - private String layout; - - - - private NarLayout narLayout; - private NarInfo narInfo; private List/* */dependencyLibOrder; @@ -285,16 +273,4 @@ public abstract class AbstractCompileMojo } return narInfo; } - - // FIXME, needs to maybe move up - protected final NarLayout getLayout() - throws MojoExecutionException - { - if ( narLayout == null ) - { - narLayout = - AbstractNarLayout.getLayout( layout, getLog() ); - } - return narLayout; - } } diff --git a/src/main/java/org/apache/maven/plugin/nar/AbstractNarMojo.java b/src/main/java/org/apache/maven/plugin/nar/AbstractNarMojo.java index 0923600..99bebf6 100644 --- a/src/main/java/org/apache/maven/plugin/nar/AbstractNarMojo.java +++ b/src/main/java/org/apache/maven/plugin/nar/AbstractNarMojo.java @@ -106,6 +106,16 @@ public abstract class AbstractNarMojo */ private File unpackDirectory; + /** + * Layout to be used for building and unpacking artifacts + * + * @parameter expression="${nar.layout}" default-value="org.apache.maven.plugin.nar.NarLayout21" + * @required + */ + private String layout; + + private NarLayout narLayout; + /** * @parameter expression="${project}" * @readonly @@ -176,6 +186,17 @@ public abstract class AbstractNarMojo return unpackDirectory; } + protected final NarLayout getLayout() + throws MojoExecutionException + { + if ( narLayout == null ) + { + narLayout = + AbstractNarLayout.getLayout( layout, getLog() ); + } + return narLayout; + } + protected final MavenProject getMavenProject() { return mavenProject; -- cgit v1.2.3