summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Janes <github.com@peterjanes.ca>2010-02-09 07:45:05 +0800
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2010-05-14 01:05:50 +0800
commit0913c7ba9c27ec7d6e2a3146baf806f75952f586 (patch)
treeab7cec5e9891a599002bb67ff1ea6bcad35d98ac
parentaac23b5083a919983887a448f29fd8e72075e6bd (diff)
downloadmaven-nar-plugin-0913c7ba9c27ec7d6e2a3146baf806f75952f586.tar.gz
maven-nar-plugin-0913c7ba9c27ec7d6e2a3146baf806f75952f586.tar.bz2
maven-nar-plugin-0913c7ba9c27ec7d6e2a3146baf806f75952f586.tar.xz
maven-nar-plugin-0913c7ba9c27ec7d6e2a3146baf806f75952f586.zip
Unpack test-scoped dependencies as well as compile-scoped
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarUnpackMojo.java10
1 files changed, 9 insertions, 1 deletions
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() );