You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by sp...@apache.org on 2006/09/19 02:49:21 UTC
svn commit: r447663 -
/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/SharedLibEntryCreationOperation.java
Author: sppatel
Date: Mon Sep 18 17:49:21 2006
New Revision: 447663
URL: http://svn.apache.org/viewvc?view=rev&rev=447663
Log:
add URLs instead of paths, ignore source entries with default output location
Modified:
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/SharedLibEntryCreationOperation.java
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/SharedLibEntryCreationOperation.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/SharedLibEntryCreationOperation.java?view=diff&rev=447663&r1=447662&r2=447663
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/SharedLibEntryCreationOperation.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/operations/SharedLibEntryCreationOperation.java Mon Sep 18 17:49:21 2006
@@ -17,6 +17,8 @@
import java.io.File;
import java.io.FileOutputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
@@ -26,6 +28,7 @@
import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;
+import javax.management.Attribute;
import javax.management.MBeanInfo;
import javax.management.MBeanServerConnection;
import javax.management.ObjectInstance;
@@ -169,7 +172,8 @@
path = p.getLocation().removeLastSegments(1).append(ref.getOutputLocation()).addTrailingSeparator().toOSString();
} else if (kind == IClasspathEntry.CPE_SOURCE) {
//this if not combined with parent statement to filter out CPE_SOURCE entries from following else statement
- if(includeOutputLocations) {
+ //if no outputlocation, output path will get picked up by default output path
+ if(includeOutputLocations && entry.getOutputLocation() != null) {
path = project.getLocation().append(entry.getOutputLocation()).addTrailingSeparator().toOSString();
}
} else {
@@ -194,9 +198,18 @@
}
private void addEntry(HashSet entries, String path) {
- if (path != null && !entries.contains(path)) {
- Trace.trace(Trace.INFO, "Adding " + path);
- entries.add(path);
+ if(path != null) {
+ File f = new File(path);
+ try {
+ String url = f.toURL().toExternalForm();
+ if (!entries.contains(url)) {
+ Trace.trace(Trace.INFO, "Adding " + url);
+ entries.add(url);
+ }
+ } catch (MalformedURLException e1) {
+ Trace.trace(Trace.INFO, "Failed to add " + path);
+ e1.printStackTrace();
+ }
}
}