From 09c5256f5c8270a4fc5f8493616d9f0229e3284c Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Fri, 8 Jan 2010 09:54:16 +0100 Subject: Readded classifier as parameter --- .../apache/maven/plugin/nar/NarAssemblyMojo.java | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/main/java/org/apache/maven/plugin/nar/NarAssemblyMojo.java b/src/main/java/org/apache/maven/plugin/nar/NarAssemblyMojo.java index ed3fffd..05414e8 100644 --- a/src/main/java/org/apache/maven/plugin/nar/NarAssemblyMojo.java +++ b/src/main/java/org/apache/maven/plugin/nar/NarAssemblyMojo.java @@ -44,9 +44,11 @@ public class NarAssemblyMojo /** * List of classifiers which you want to assemble. Example ppc-MacOSX-g++-static, x86-Windows-msvc-shared, - * i386-Linux-g++-executable, .... + * i386-Linux-g++-executable, .... not setting means all. + * + * @parameter */ - private List classifiers; + private List classifiers = null; /** * Copies the unpacked nar libraries and files into the projects target area @@ -55,7 +57,7 @@ public class NarAssemblyMojo throws MojoExecutionException, MojoFailureException { List narArtifacts = getNarManager().getNarDependencies( "compile" ); - + List dependencies = getNarManager().getAttachedNarDependencies( narArtifacts, classifiers ); // this may make some extra copies... @@ -69,12 +71,11 @@ public class NarAssemblyMojo // of getBaseVersion, called in pathOf. dependency.isSnapshot(); - File srcDir = getLayout().getNarUnpackDirectory( - getUnpackDirectory(), - getNarManager().getNarFile( dependency )); -// File srcDir = new File( getLocalRepository().pathOf( dependency ) ); -// srcDir = new File( getLocalRepository().getBasedir(), srcDir.getParent() ); -// srcDir = new File( srcDir, "nar/" ); + File srcDir = + getLayout().getNarUnpackDirectory( getUnpackDirectory(), getNarManager().getNarFile( dependency ) ); + // File srcDir = new File( getLocalRepository().pathOf( dependency ) ); + // srcDir = new File( getLocalRepository().getBasedir(), srcDir.getParent() ); + // srcDir = new File( srcDir, "nar/" ); File dstDir = getTargetDirectory(); try @@ -88,8 +89,8 @@ public class NarAssemblyMojo } catch ( IOException ioe ) { - throw new MojoExecutionException( "Failed to copy directory for dependency " + dependency - + " from " + srcDir + " to " + dstDir, ioe ); + throw new MojoExecutionException( "Failed to copy directory for dependency " + dependency + " from " + + srcDir + " to " + dstDir, ioe ); } } } -- cgit v1.2.3