From e8c35d105cf227a9a781ac4aac79dcd0c5024a6b Mon Sep 17 00:00:00 2001 From: Vikas Rangarajan Date: Mon, 22 Mar 2010 15:48:57 -0700 Subject: 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 --- src/main/java/org/apache/maven/plugin/nar/AOL.java | 38 +++++++++++++++++----- 1 file changed, 30 insertions(+), 8 deletions(-) (limited to 'src/main/java/org/apache/maven/plugin/nar/AOL.java') 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; } -- cgit v1.2.3