summaryrefslogtreecommitdiff
path: root/src/main/java/org/apache/maven/plugin/nar/NarUtil.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/apache/maven/plugin/nar/NarUtil.java')
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarUtil.java30
1 files changed, 6 insertions, 24 deletions
diff --git a/src/main/java/org/apache/maven/plugin/nar/NarUtil.java b/src/main/java/org/apache/maven/plugin/nar/NarUtil.java
index cb77355..b739f0e 100644
--- a/src/main/java/org/apache/maven/plugin/nar/NarUtil.java
+++ b/src/main/java/org/apache/maven/plugin/nar/NarUtil.java
@@ -30,7 +30,6 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Properties;
import java.util.Set;
import java.util.regex.Pattern;
@@ -41,7 +40,6 @@ import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.PropertyUtils;
import org.codehaus.plexus.util.cli.Commandline;
/**
@@ -54,24 +52,6 @@ public final class NarUtil
// never instantiate
}
- private static Properties defaults;
-
- public static Properties getDefaults()
- throws MojoFailureException
- {
- // read properties file with defaults
- if ( defaults == null )
- {
- defaults = PropertyUtils.loadProperties( NarUtil.class.getResourceAsStream( "aol.properties" ) );
- }
- if ( defaults == null )
- {
- throw new MojoFailureException( "NAR: Could not load default properties file: 'aol.properties'." );
- }
-
- return defaults;
- }
-
public static String getOS( String defaultOs )
{
String os = defaultOs;
@@ -111,22 +91,23 @@ public final class NarUtil
return link;
}
- public static String getLinkerName( String architecture, String os, Linker linker )
+ public static String getLinkerName(MavenProject project, String architecture, String os, Linker linker )
throws MojoFailureException, MojoExecutionException
{
- return getLinker( linker ).getName( getDefaults(), getArchitecture( architecture ) + "." + getOS( os ) + "." );
+ return getLinker( linker ).getName( NarProperties.getInstance(project), getArchitecture( architecture ) + "." + getOS( os ) + "." );
}
- public static AOL getAOL( String architecture, String os, Linker linker, String aol )
+ public static AOL getAOL(MavenProject project, String architecture, String os, Linker linker, String aol )
throws MojoFailureException, MojoExecutionException
{
// adjust aol
- return aol == null ? new AOL( getArchitecture( architecture ), getOS( os ), getLinkerName( architecture, os,
+ return aol == null ? new AOL( getArchitecture( architecture ), getOS( os ), getLinkerName( project, architecture, os,
linker ) )
: new AOL( aol );
}
// FIXME, should go to AOL.
+/* NOT USED ?
public static String getAOLKey( String architecture, String os, Linker linker )
throws MojoFailureException, MojoExecutionException
{
@@ -134,6 +115,7 @@ public final class NarUtil
return getArchitecture( architecture ) + "." + getOS( os ) + "." + getLinkerName( architecture, os, linker )
+ ".";
}
+*/
public static String getAOLKey( String aol )
{