diff options
author | Vikas Rangarajan <vikas@vikas-linux.tva.tvworks.com> | 2010-03-22 15:48:57 -0700 |
---|---|---|
committer | Vikas Rangarajan <vikas@vikas-linux.tva.tvworks.com> | 2010-03-22 15:48:57 -0700 |
commit | e8c35d105cf227a9a781ac4aac79dcd0c5024a6b (patch) | |
tree | ed979c6ccf8c0a9a5a6ec6ed67ff47242acfeeea /src/main/java/org/apache/maven/plugin/nar/AOL.java | |
parent | 2bb8e535ca23632a4df9ba291709cd1c536d39cd (diff) | |
download | maven-nar-plugin-e8c35d105cf227a9a781ac4aac79dcd0c5024a6b.tar.gz maven-nar-plugin-e8c35d105cf227a9a781ac4aac79dcd0c5024a6b.tar.bz2 maven-nar-plugin-e8c35d105cf227a9a781ac4aac79dcd0c5024a6b.tar.xz maven-nar-plugin-e8c35d105cf227a9a781ac4aac79dcd0c5024a6b.zip |
Initial merge of local changes with master, main changes :
- New mojo for vcproj generation
- Fixed aol to be url-friendly for maven deployments (g++->gpp)
- Fail build early if specified include paths do not exist
- Only add "include" subdirs of sourcedirs if they exist, to the include path
- Removed duplication of source dirs in source path
Diffstat (limited to 'src/main/java/org/apache/maven/plugin/nar/AOL.java')
-rw-r--r-- | src/main/java/org/apache/maven/plugin/nar/AOL.java | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/src/main/java/org/apache/maven/plugin/nar/AOL.java b/src/main/java/org/apache/maven/plugin/nar/AOL.java index e519026..b1edb10 100644 --- a/src/main/java/org/apache/maven/plugin/nar/AOL.java +++ b/src/main/java/org/apache/maven/plugin/nar/AOL.java @@ -48,9 +48,9 @@ public class AOL os = aolString[osIndex]; case architectureIndex+1: architecture = aolString[architectureIndex]; - break; + break; - default: + default: throw new IllegalArgumentException( "AOL '" + aol + "' cannot be parsed." ); } } @@ -68,24 +68,46 @@ public class AOL */ public final String toString() { - return architecture + ( ( os == null ) ? "" : "-" + os + ( ( linkerName == null ) ? "" : "-" + linkerName ) ); + String tempLinkerName = null; + if ( linkerName == null ) { + tempLinkerName = ""; + } else if ( linkerName.equals("g++") ) { + tempLinkerName = "-gpp"; + } else { + tempLinkerName = "-" + linkerName; + } + + return architecture + + ((os == null) ? "" : "-" + os + + tempLinkerName); } // FIXME, maybe change to something like isCompatible (AOL). public final boolean hasLinker( String linker ) { - return linkerName.equals( linker ); + return linkerName.equals(linker); } /** * Returns an AOL key (arch.os.linker) to search in the properties files. * @return dot separated AOL */ - public final String getKey() + public final String getKey() { - return architecture + ( ( os == null ) ? "" : "." + os + ( ( linkerName == null ) ? "" : "." + linkerName ) ); - } - + String tempLinkerName = null; + if ( linkerName == null ) { + tempLinkerName = ""; + } else if ( linkerName.equals("g++") ) { + tempLinkerName = ".gpp"; + } else { + tempLinkerName = "." + linkerName; + } + + return architecture + + ((os == null) ? "" : "." + os + + tempLinkerName); + } + final String getOS() { return os; } |