From 0913c7ba9c27ec7d6e2a3146baf806f75952f586 Mon Sep 17 00:00:00 2001 From: Peter Janes Date: Tue, 9 Feb 2010 07:45:05 +0800 Subject: Unpack test-scoped dependencies as well as compile-scoped --- src/main/java/org/apache/maven/plugin/nar/NarUnpackMojo.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/org/apache/maven/plugin/nar/NarUnpackMojo.java b/src/main/java/org/apache/maven/plugin/nar/NarUnpackMojo.java index b32b0ba..f94b49f 100644 --- a/src/main/java/org/apache/maven/plugin/nar/NarUnpackMojo.java +++ b/src/main/java/org/apache/maven/plugin/nar/NarUnpackMojo.java @@ -33,7 +33,7 @@ import org.codehaus.plexus.archiver.manager.ArchiverManager; * @goal nar-unpack * @phase process-sources * @requiresProject - * @requiresDependencyResolution + * @requiresDependencyResolution test * @author Mark Donszelmann */ public class NarUnpackMojo @@ -59,6 +59,14 @@ public class NarUnpackMojo throws MojoExecutionException, MojoFailureException { List narArtifacts = getNarManager().getNarDependencies( "compile" ); + unpackNars(narArtifacts); + List testNarArtifacts = getNarManager().getNarDependencies( "test" ); + unpackNars(testNarArtifacts); + } + + private void unpackNars(List narArtifacts) + throws MojoExecutionException, MojoFailureException + { if ( classifiers == null ) { getNarManager().unpackAttachedNars( narArtifacts, archiverManager, null, getOS(), getLayout(), getUnpackDirectory() ); -- cgit v1.2.3