From 947b4f87a88a2702fd15c69f274d9afcab426564 Mon Sep 17 00:00:00 2001 From: Volker Schumacher Date: Fri, 18 Dec 2009 12:39:07 +0800 Subject: getAttachedNarDependencies: when classifier is not specified, collect all available nar artifacts. --- .../java/org/apache/maven/plugin/nar/NarManager.java | 17 ++++++++++++----- 1 file 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; -- cgit v1.2.3