geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r531632 - /geronimo/devtools/maven-plugins/trunk/maven-eclipsepde-plugin/src/main/java/org/apache/geronimo/devtools/plugins/eclipsepde/InstallPluginDependenciesMojo.java
Date Mon, 23 Apr 2007 22:20:35 GMT
Author: sppatel
Date: Mon Apr 23 15:20:32 2007
New Revision: 531632

URL: http://svn.apache.org/viewvc?view=rev&rev=531632
Log:
workaround for _ in version

Modified:
    geronimo/devtools/maven-plugins/trunk/maven-eclipsepde-plugin/src/main/java/org/apache/geronimo/devtools/plugins/eclipsepde/InstallPluginDependenciesMojo.java

Modified: geronimo/devtools/maven-plugins/trunk/maven-eclipsepde-plugin/src/main/java/org/apache/geronimo/devtools/plugins/eclipsepde/InstallPluginDependenciesMojo.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/maven-plugins/trunk/maven-eclipsepde-plugin/src/main/java/org/apache/geronimo/devtools/plugins/eclipsepde/InstallPluginDependenciesMojo.java?view=diff&rev=531632&r1=531631&r2=531632
==============================================================================
--- geronimo/devtools/maven-plugins/trunk/maven-eclipsepde-plugin/src/main/java/org/apache/geronimo/devtools/plugins/eclipsepde/InstallPluginDependenciesMojo.java
(original)
+++ geronimo/devtools/maven-plugins/trunk/maven-eclipsepde-plugin/src/main/java/org/apache/geronimo/devtools/plugins/eclipsepde/InstallPluginDependenciesMojo.java
Mon Apr 23 15:20:32 2007
@@ -99,7 +99,7 @@
 	/**
 	 * @parameter expression="${useDistributionVersions}"
 	 */
-	protected boolean useDistributionVersion = true;
+	protected boolean useQualifer = true;
 
 	private List removeList = new ArrayList();
 
@@ -225,7 +225,7 @@
 			if (file.getName().endsWith(".jar")) {
 				File bundle = getBundle(file);
 				install(file, bundle);
-				if (useDistributionVersion)
+				if (useQualifer)
 					dependency.setVersion(getBundleVersion(bundle));
 			}
 		}
@@ -236,7 +236,7 @@
 		String artifactId = getArtifactID(artifact, bundle);
 		String version = getBundleVersion(bundle);
 
-		if (!useDistributionVersion)
+		if (!useQualifer)
 			version = fixVersion(version);
 
 		if (bundle.isDirectory())
@@ -317,7 +317,9 @@
 
 	public static String getBundleVersion(File bundle) {
 		String id = removeJarExtension(bundle);
-		return id.substring(id.indexOf("_") + 1, id.length());
+		id = id.substring(id.indexOf("_") + 1, id.length());
+		id = id.replaceAll("_", ""); //bug workaround - maven fails compilation for artifacts who's
versions contain the "_" character.
+		return id;
 	}
 
 	public static String getArtifactID(File artifact, File bundle) {



Mime
View raw message