Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 212906 Details for
Bug 364026
saaj.jar deployment fails when multiple javax.xml.soap bundles are installed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
patch for version-specific bundle lookup
eclipse-364026-patch.txt (text/plain), 5.76 KB, created by
Martin Lippert
on 2012-03-20 07:20:17 EDT
(
hide
)
Description:
patch for version-specific bundle lookup
Filename:
MIME Type:
Creator:
Martin Lippert
Created:
2012-03-20 07:20:17 EDT
Size:
5.76 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jst.ws.axis.consumption.ui >Index: src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java >=================================================================== >RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.jst.ws.axis.consumption.ui/src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java,v >retrieving revision 1.36 >diff -u -r1.36 CopyAxisJarCommand.java >--- src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java 20 Apr 2010 15:43:27 -0000 1.36 >+++ src/org/eclipse/jst/ws/internal/axis/consumption/ui/task/CopyAxisJarCommand.java 20 Mar 2012 11:16:38 -0000 >@@ -60,6 +60,7 @@ > import org.eclipse.wst.common.environment.IEnvironment; > import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; > import org.eclipse.wst.ws.internal.common.BundleUtils; >+import org.osgi.framework.Version; > > > public class CopyAxisJarCommand extends AbstractDataModelOperation { >@@ -71,6 +72,7 @@ > public static String JAVAX_XML_RPC_PLUGIN_ID = "javax.xml.rpc"; //$NON-NLS-1$ > public static String JAVAX_XML_RPC_JAR = "jaxrpc.jar"; //$NON-NLS-1$ > public static String JAVAX_XML_SOAP_PLUGIN_ID = "javax.xml.soap"; //$NON-NLS-1$ >+ public static Version JAVAX_XML_SOAP_PLUGIN_VERSION = Version.parseVersion("1.2.0.v201005080501"); > public static String JAVAX_XML_SOAP_JAR = "saaj.jar"; //$NON-NLS-1$ > public static String JAVAX_WSDL_PLUGIN_ID = "javax.wsdl"; //$NON-NLS-1$ > public static String JAVAX_WSDL_JAR = "wsdl4j.jar"; //$NON-NLS-1$ >@@ -150,19 +152,19 @@ > deleteObsoleteJars(webModulePath); > > >- copyIFile(AXIS_RUNTIME_PLUGIN_ID, "lib/" + AXIS_JAR, webModulePath, "WEB-INF/lib/" + AXIS_JAR, status, env, monitor); >+ copyIFile(AXIS_RUNTIME_PLUGIN_ID, null, "lib/" + AXIS_JAR, webModulePath, "WEB-INF/lib/" + AXIS_JAR, status, env, monitor); > if (status.getSeverity() == Status.ERROR) { > return; > } >- copyIFile(COMMON_DISCOVERY_PLUGIN_ID, "lib/" + COMMON_DISCOVERY_JAR, webModulePath, "WEB-INF/lib/" + COMMON_DISCOVERY_JAR, status, env, monitor); >+ copyIFile(COMMON_DISCOVERY_PLUGIN_ID, null, "lib/" + COMMON_DISCOVERY_JAR, webModulePath, "WEB-INF/lib/" + COMMON_DISCOVERY_JAR, status, env, monitor); > if (status.getSeverity() == Status.ERROR) { > return; > } >- copyIFile(JAVAX_XML_RPC_PLUGIN_ID, "lib/" + JAVAX_XML_RPC_JAR, webModulePath, "WEB-INF/lib/" + JAVAX_XML_RPC_JAR, status, env, monitor); >+ copyIFile(JAVAX_XML_RPC_PLUGIN_ID, null, "lib/" + JAVAX_XML_RPC_JAR, webModulePath, "WEB-INF/lib/" + JAVAX_XML_RPC_JAR, status, env, monitor); > if (status.getSeverity() == Status.ERROR) { > return; > } >- copyIFile(JAVAX_XML_SOAP_PLUGIN_ID, "lib/" + JAVAX_XML_SOAP_JAR, webModulePath, "WEB-INF/lib/" + JAVAX_XML_SOAP_JAR, status, env, monitor); >+ copyIFile(JAVAX_XML_SOAP_PLUGIN_ID, JAVAX_XML_SOAP_PLUGIN_VERSION, "lib/" + JAVAX_XML_SOAP_JAR, webModulePath, "WEB-INF/lib/" + JAVAX_XML_SOAP_JAR, status, env, monitor); > if (status.getSeverity() == Status.ERROR) { > return; > } >@@ -181,7 +183,7 @@ > /** > * > */ >- private void copyIFile(String pluginId, String source, IPath targetPath, String targetFile, IStatus status, IEnvironment env, IProgressMonitor monitor) { >+ private void copyIFile(String pluginId, Version pluginVersion, String source, IPath targetPath, String targetFile, IStatus status, IEnvironment env, IProgressMonitor monitor) { > IPath target = targetPath.append(new Path(targetFile)); > ProgressUtils.report(monitor, ConsumptionMessages.PROGRESS_INFO_COPYING_FILE); > >@@ -190,7 +192,15 @@ > context.setOverwriteFilesEnabled(true); > context.setCreateFoldersEnabled(true); > context.setCheckoutFilesEnabled(true); >- URL sourceURL = BundleUtils.getURLFromBundle(pluginId, source); >+ >+ URL sourceURL = null; >+ if (pluginVersion != null) { >+ sourceURL = BundleUtils.getURLFromBundle(pluginId, pluginVersion, source); >+ } >+ else { >+ sourceURL = BundleUtils.getURLFromBundle(pluginId, source); >+ } >+ > IFile resource = ResourceUtils.getWorkspaceRoot().getFile(target); > if (!resource.exists()) { > IFile file = FileResourceUtils.createFile(context, target, sourceURL.openStream(), monitor, env.getStatusHandler()); >#P org.eclipse.wst.ws >Index: src/org/eclipse/wst/ws/internal/common/BundleUtils.java >=================================================================== >RCS file: /cvsroot/webtools/webservices/plugins/org.eclipse.wst.ws/src/org/eclipse/wst/ws/internal/common/BundleUtils.java,v >retrieving revision 1.4 >diff -u -r1.4 BundleUtils.java >--- src/org/eclipse/wst/ws/internal/common/BundleUtils.java 26 Mar 2008 21:23:14 -0000 1.4 >+++ src/org/eclipse/wst/ws/internal/common/BundleUtils.java 20 Mar 2012 11:16:39 -0000 >@@ -30,13 +30,34 @@ > { > static public URL getURLFromBundle( String bundleId, String path ) throws MalformedURLException > { >- Bundle bundle = Platform.getBundle( bundleId ); >+ Bundle bundle = Platform.getBundle(bundleId); > URL installURL = bundle.getEntry("/"); > URL fileURL = new URL(installURL, path ); > > return fileURL; > } > >+ static public URL getURLFromBundle( String bundleId, Version bundleVersion, String path ) throws MalformedURLException >+ { >+ Bundle bundle = getBundleExactVersion(bundleId, bundleVersion); >+ URL installURL = bundle.getEntry("/"); >+ URL fileURL = new URL(installURL, path ); >+ >+ return fileURL; >+ } >+ >+ private static Bundle getBundleExactVersion(String bundleId, >+ Version bundleVersion) { >+ Bundle[] bundles = Platform.getBundles(bundleId, bundleVersion.toString()); >+ for(Bundle bundle : bundles) { >+ if (bundle.getVersion().compareTo(bundleVersion) == 0) { >+ return bundle; >+ } >+ } >+ >+ return null; >+ } >+ > /** > * @param bundleId > * @return Returns the path for the Jarred plugin. Returns null if path not found.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
keith.chong.ca
:
iplog+
Actions:
View
Attachments on
bug 364026
: 212906 |
213895
|
214202