summaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarAssemblyMojo.java3
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarManager.java12
2 files changed, 7 insertions, 8 deletions
diff --git a/src/main/java/org/apache/maven/plugin/nar/NarAssemblyMojo.java b/src/main/java/org/apache/maven/plugin/nar/NarAssemblyMojo.java
index 05414e8..c912743 100644
--- a/src/main/java/org/apache/maven/plugin/nar/NarAssemblyMojo.java
+++ b/src/main/java/org/apache/maven/plugin/nar/NarAssemblyMojo.java
@@ -21,6 +21,7 @@ package org.apache.maven.plugin.nar;
import java.io.File;
import java.io.IOException;
+import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
@@ -48,7 +49,7 @@ public class NarAssemblyMojo
*
* @parameter
*/
- private List classifiers = null;
+ private String[] classifiers = null;
/**
* Copies the unpacked nar libraries and files into the projects target area
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 fd77645..4128b7f 100644
--- a/src/main/java/org/apache/maven/plugin/nar/NarManager.java
+++ b/src/main/java/org/apache/maven/plugin/nar/NarManager.java
@@ -147,25 +147,23 @@ public class NarManager
}
public final List/* <AttachedNarArtifact> */getAttachedNarDependencies(
- List/* <NarArtifacts> */narArtifacts, List classifiers)
+ List/* <NarArtifacts> */narArtifacts, String[] classifiers)
throws MojoExecutionException, MojoFailureException
{
- String[] types;
List artifactList = new ArrayList();
- if( classifiers != null && !classifiers.isEmpty() )
+ if( classifiers != null && classifiers.length > 0 )
{
- types = (String[]) classifiers.toArray();
- for ( int j = 0; j < types.length; j++ )
+ for ( int j = 0; j < classifiers.length; j++ )
{
if ( artifactList != null )
{
- artifactList.addAll( getAttachedNarDependencies( narArtifacts, types[j] ));
+ artifactList.addAll( getAttachedNarDependencies( narArtifacts, classifiers[j] ));
}
}
-}
+ }
else
{
artifactList.addAll( getAttachedNarDependencies( narArtifacts, ( String )null ));