diff options
author | Volker Schumacher <volker@antenna500.local> | 2009-12-18 12:39:07 +0800 |
---|---|---|
committer | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2010-01-08 00:15:52 +0800 |
commit | 947b4f87a88a2702fd15c69f274d9afcab426564 (patch) | |
tree | a0c72f8620ecf944808a04b7d386434bcb9ffbc4 | |
parent | 54f79a2d6b0227fa6116f0b6d8ead5094f4b7e02 (diff) | |
download | maven-nar-plugin-947b4f87a88a2702fd15c69f274d9afcab426564.tar.gz maven-nar-plugin-947b4f87a88a2702fd15c69f274d9afcab426564.tar.bz2 maven-nar-plugin-947b4f87a88a2702fd15c69f274d9afcab426564.tar.xz maven-nar-plugin-947b4f87a88a2702fd15c69f274d9afcab426564.zip |
getAttachedNarDependencies: when classifier is not specified, collect all available nar artifacts.
-rw-r--r-- | src/main/java/org/apache/maven/plugin/nar/NarManager.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/main/java/org/apache/maven/plugin/nar/NarManager.java b/src/main/java/org/apache/maven/plugin/nar/NarManager.java index ee3cbdb..32f5e65 100644 --- a/src/main/java/org/apache/maven/plugin/nar/NarManager.java +++ b/src/main/java/org/apache/maven/plugin/nar/NarManager.java @@ -174,15 +174,12 @@ public class NarManager for ( Iterator i = narArtifacts.iterator(); i.hasNext(); ) { Artifact dependency = (Artifact) i.next(); - NarInfo narInfo = getNarInfo( dependency ); + if ( noarch ) { artifactList.addAll( getAttachedNarDependencies( dependency, null, NarConstants.NAR_NO_ARCH ) ); } - // use preferred binding, unless non existing. - String binding = narInfo.getBinding( aol, type != null ? type : Library.STATIC ); - // FIXME kludge, but does not work anymore since AOL is now a class if ( aol.equals( NarConstants.NAR_NO_ARCH ) ) { @@ -191,7 +188,17 @@ public class NarManager } else { - artifactList.addAll( getAttachedNarDependencies( dependency, aol, binding ) ); + if ( type != null ) + { + artifactList.addAll( getAttachedNarDependencies( dependency, aol, type ) ); + } + else + { + for ( int j = 0; j < narTypes.length; j++ ) + { + artifactList.addAll( getAttachedNarDependencies( dependency, aol, narTypes[j] )); + } + } } } return artifactList; |