geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r382187 - /geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/InstallPluginDependenciesMojo.java
Date Wed, 01 Mar 2006 22:44:17 GMT
Author: sppatel
Date: Wed Mar  1 14:44:16 2006
New Revision: 382187

URL: http://svn.apache.org/viewcvs?rev=382187&view=rev
Log:
plugin fixes

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

Modified: geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/InstallPluginDependenciesMojo.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/InstallPluginDependenciesMojo.java?rev=382187&r1=382186&r2=382187&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/InstallPluginDependenciesMojo.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/maven-plugins/maven-geronimodevtools-plugin/src/main/java/org/apache/geronimo/eclipse/devtools/InstallPluginDependenciesMojo.java
Wed Mar  1 14:44:16 2006
@@ -31,6 +31,8 @@
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.project.MavenProject;
 
+import sun.security.action.GetLongAction;
+
 /**
  * @goal install
  */
@@ -87,7 +89,6 @@
 		File pluginsDir = new File(eclipsehome.getAbsolutePath().concat(File.separator
 				+ "plugins"));
 		
-		//process(pluginsDir, 0, null);
 		processDependenciesOnly(pluginsDir);
 	}
 
@@ -96,8 +97,8 @@
 		Iterator i = dependencies.iterator();
 		while (i.hasNext()) {
 			Dependency dependency = (Dependency) i.next();
-			getLog().debug(dependency.toString());
 			if (GROUP_ID.equals(dependency.getGroupId())) {
+				getLog().info("Eclipse dependency: " + dependency.toString());
 				process(pluginsDir, 0, dependency.getArtifactId());
 			}
 		}
@@ -127,7 +128,7 @@
 	protected boolean shouldInstall(String artifactId, File file) {
 		if (!file.getName().endsWith(".jar"))
 			return false;
-		return artifactId == null || getArtifactID(file).equals(artifactId);
+		return artifactId == null || getBundleName(file).equals(artifactId);
 	}
 
 	protected void install(File file, int depth) {
@@ -138,7 +139,7 @@
 			artifactId = getBundleName(bundleDir) + "." + getArtifactID(file);
 			version = getBundleVersion(bundleDir);
 		} else {
-			artifactId = getArtifactID(file);
+			artifactId = getBundleName(file);
 			version = getBundleVersion(file);
 		}
 
@@ -161,7 +162,9 @@
 
 	public static String getBundleName(File bundle) {
 		String id = getArtifactID(bundle);
-		return id.substring(0, id.indexOf("_"));
+		if(id.indexOf("_") != -1)
+			id = id.substring(0, id.indexOf("_"));
+		return id;
 	}
 
 	public static String getBundleVersion(File bundle) {



Mime
View raw message