summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorVolker Schumacher <volker@antenna500.local>2009-12-18 12:39:07 +0800
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2010-01-08 00:15:52 +0800
commit947b4f87a88a2702fd15c69f274d9afcab426564 (patch)
treea0c72f8620ecf944808a04b7d386434bcb9ffbc4 /src/main
parent54f79a2d6b0227fa6116f0b6d8ead5094f4b7e02 (diff)
downloadmaven-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.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarManager.java17
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;