geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r544194 - /geronimo/devtools/maven-plugins/trunk/maven-eclipsepde-plugin/src/main/java/org/apache/geronimo/devtools/plugins/eclipsepde/InstallPluginDependenciesMojo.java
Date Mon, 04 Jun 2007 17:48:34 GMT
Author: sppatel
Date: Mon Jun  4 10:48:29 2007
New Revision: 544194

URL: http://svn.apache.org/viewvc?view=rev&rev=544194
Log:
always convert eclipse version & qualifier to maven format before deploying causes strange
compilation errors on certain bundles otherwise

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=544194&r1=544193&r2=544194
==============================================================================
--- 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 Jun  4 10:48:29 2007
@@ -94,11 +94,6 @@
 	 */
 	private File eclipseHome;
 
-	/**
-	 * @parameter expression="${useDistributionVersions}"
-	 */
-	protected boolean useQualifer = true;
-
 	private List removeList = new ArrayList();
 
 	private List addList = new ArrayList();
@@ -223,8 +218,7 @@
 			if (file.getName().endsWith(".jar")) {
 				File bundle = getBundle(file);
 				install(file, bundle);
-				if (useQualifer)
-					dependency.setVersion(getBundleVersion(bundle));
+				dependency.setVersion(getBundleVersion(bundle));
 			}
 		}
 	}
@@ -234,9 +228,6 @@
 		String artifactId = getArtifactID(artifact, bundle);
 		String version = getBundleVersion(bundle);
 
-		if (!useQualifer)
-			version = fixVersion(version);
-
 		if (bundle.isDirectory())
 			addList.add(createDependency(artifactId, version));
 
@@ -264,8 +255,8 @@
 		if (qualifierIndex == -1)
 			return version; // has no qualifier
 		String eclipseQualifier = version.substring(qualifierIndex + 1);
-		String newQualifier = eclipseQualifier.replaceAll("[^\\d]", "");
-		return version.substring(0, qualifierIndex) + "-" + newQualifier;
+		//String newQualifier = eclipseQualifier.replaceAll("[^\\d]", "");
+		return version.substring(0, qualifierIndex) + "-" + eclipseQualifier;
 	}
 
 	protected File getBundle(File file) {
@@ -315,9 +306,7 @@
 
 	public static String getBundleVersion(File bundle) {
 		String id = removeJarExtension(bundle);
-		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;
+		return fixVersion(id.substring(id.indexOf("_") + 1, id.length()));
 	}
 
 	public static String getArtifactID(File artifact, File bundle) {



Mime
View raw message