|
Lines 60-65
Link Here
|
| 60 |
import org.eclipse.wst.common.environment.IEnvironment; |
60 |
import org.eclipse.wst.common.environment.IEnvironment; |
| 61 |
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; |
61 |
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation; |
| 62 |
import org.eclipse.wst.ws.internal.common.BundleUtils; |
62 |
import org.eclipse.wst.ws.internal.common.BundleUtils; |
|
|
63 |
import org.osgi.framework.Version; |
| 63 |
|
64 |
|
| 64 |
|
65 |
|
| 65 |
public class CopyAxisJarCommand extends AbstractDataModelOperation { |
66 |
public class CopyAxisJarCommand extends AbstractDataModelOperation { |
|
Lines 71-76
Link Here
|
| 71 |
public static String JAVAX_XML_RPC_PLUGIN_ID = "javax.xml.rpc"; //$NON-NLS-1$ |
72 |
public static String JAVAX_XML_RPC_PLUGIN_ID = "javax.xml.rpc"; //$NON-NLS-1$ |
| 72 |
public static String JAVAX_XML_RPC_JAR = "jaxrpc.jar"; //$NON-NLS-1$ |
73 |
public static String JAVAX_XML_RPC_JAR = "jaxrpc.jar"; //$NON-NLS-1$ |
| 73 |
public static String JAVAX_XML_SOAP_PLUGIN_ID = "javax.xml.soap"; //$NON-NLS-1$ |
74 |
public static String JAVAX_XML_SOAP_PLUGIN_ID = "javax.xml.soap"; //$NON-NLS-1$ |
|
|
75 |
public static Version JAVAX_XML_SOAP_PLUGIN_VERSION = Version.parseVersion("1.2.0"); |
| 76 |
private static Version JAVAX_XML_SOAP_PLUGIN_UPPER_VERSION = Version.parseVersion("1.3.0"); |
| 74 |
public static String JAVAX_XML_SOAP_JAR = "saaj.jar"; //$NON-NLS-1$ |
77 |
public static String JAVAX_XML_SOAP_JAR = "saaj.jar"; //$NON-NLS-1$ |
| 75 |
public static String JAVAX_WSDL_PLUGIN_ID = "javax.wsdl"; //$NON-NLS-1$ |
78 |
public static String JAVAX_WSDL_PLUGIN_ID = "javax.wsdl"; //$NON-NLS-1$ |
| 76 |
public static String JAVAX_WSDL_JAR = "wsdl4j.jar"; //$NON-NLS-1$ |
79 |
public static String JAVAX_WSDL_JAR = "wsdl4j.jar"; //$NON-NLS-1$ |
|
Lines 150-168
Link Here
|
| 150 |
deleteObsoleteJars(webModulePath); |
153 |
deleteObsoleteJars(webModulePath); |
| 151 |
|
154 |
|
| 152 |
|
155 |
|
| 153 |
copyIFile(AXIS_RUNTIME_PLUGIN_ID, "lib/" + AXIS_JAR, webModulePath, "WEB-INF/lib/" + AXIS_JAR, status, env, monitor); |
156 |
copyIFile(AXIS_RUNTIME_PLUGIN_ID, null, null, "lib/" + AXIS_JAR, webModulePath, "WEB-INF/lib/" + AXIS_JAR, status, env, monitor); |
| 154 |
if (status.getSeverity() == Status.ERROR) { |
157 |
if (status.getSeverity() == Status.ERROR) { |
| 155 |
return; |
158 |
return; |
| 156 |
} |
159 |
} |
| 157 |
copyIFile(COMMON_DISCOVERY_PLUGIN_ID, "lib/" + COMMON_DISCOVERY_JAR, webModulePath, "WEB-INF/lib/" + COMMON_DISCOVERY_JAR, status, env, monitor); |
160 |
copyIFile(COMMON_DISCOVERY_PLUGIN_ID, null, null, "lib/" + COMMON_DISCOVERY_JAR, webModulePath, "WEB-INF/lib/" + COMMON_DISCOVERY_JAR, status, env, monitor); |
| 158 |
if (status.getSeverity() == Status.ERROR) { |
161 |
if (status.getSeverity() == Status.ERROR) { |
| 159 |
return; |
162 |
return; |
| 160 |
} |
163 |
} |
| 161 |
copyIFile(JAVAX_XML_RPC_PLUGIN_ID, "lib/" + JAVAX_XML_RPC_JAR, webModulePath, "WEB-INF/lib/" + JAVAX_XML_RPC_JAR, status, env, monitor); |
164 |
copyIFile(JAVAX_XML_RPC_PLUGIN_ID, null, null, "lib/" + JAVAX_XML_RPC_JAR, webModulePath, "WEB-INF/lib/" + JAVAX_XML_RPC_JAR, status, env, monitor); |
| 162 |
if (status.getSeverity() == Status.ERROR) { |
165 |
if (status.getSeverity() == Status.ERROR) { |
| 163 |
return; |
166 |
return; |
| 164 |
} |
167 |
} |
| 165 |
copyIFile(JAVAX_XML_SOAP_PLUGIN_ID, "lib/" + JAVAX_XML_SOAP_JAR, webModulePath, "WEB-INF/lib/" + JAVAX_XML_SOAP_JAR, status, env, monitor); |
168 |
copyIFile(JAVAX_XML_SOAP_PLUGIN_ID, JAVAX_XML_SOAP_PLUGIN_VERSION, JAVAX_XML_SOAP_PLUGIN_UPPER_VERSION, "lib/" + JAVAX_XML_SOAP_JAR, webModulePath, "WEB-INF/lib/" + JAVAX_XML_SOAP_JAR, status, env, monitor); |
| 166 |
if (status.getSeverity() == Status.ERROR) { |
169 |
if (status.getSeverity() == Status.ERROR) { |
| 167 |
return; |
170 |
return; |
| 168 |
} |
171 |
} |
|
Lines 181-187
Link Here
|
| 181 |
/** |
184 |
/** |
| 182 |
* |
185 |
* |
| 183 |
*/ |
186 |
*/ |
| 184 |
private void copyIFile(String pluginId, String source, IPath targetPath, String targetFile, IStatus status, IEnvironment env, IProgressMonitor monitor) { |
187 |
private void copyIFile(String pluginId, Version pluginVersion, Version upperVersion, String source, IPath targetPath, String targetFile, IStatus status, IEnvironment env, IProgressMonitor monitor) { |
| 185 |
IPath target = targetPath.append(new Path(targetFile)); |
188 |
IPath target = targetPath.append(new Path(targetFile)); |
| 186 |
ProgressUtils.report(monitor, ConsumptionMessages.PROGRESS_INFO_COPYING_FILE); |
189 |
ProgressUtils.report(monitor, ConsumptionMessages.PROGRESS_INFO_COPYING_FILE); |
| 187 |
|
190 |
|
|
Lines 190-196
Link Here
|
| 190 |
context.setOverwriteFilesEnabled(true); |
193 |
context.setOverwriteFilesEnabled(true); |
| 191 |
context.setCreateFoldersEnabled(true); |
194 |
context.setCreateFoldersEnabled(true); |
| 192 |
context.setCheckoutFilesEnabled(true); |
195 |
context.setCheckoutFilesEnabled(true); |
| 193 |
URL sourceURL = BundleUtils.getURLFromBundle(pluginId, source); |
196 |
|
|
|
197 |
URL sourceURL = null; |
| 198 |
if (pluginVersion != null) { |
| 199 |
sourceURL = BundleUtils.getURLFromBundle(pluginId, pluginVersion, upperVersion, source); |
| 200 |
} |
| 201 |
else { |
| 202 |
sourceURL = BundleUtils.getURLFromBundle(pluginId, source); |
| 203 |
} |
| 204 |
|
| 194 |
IFile resource = ResourceUtils.getWorkspaceRoot().getFile(target); |
205 |
IFile resource = ResourceUtils.getWorkspaceRoot().getFile(target); |
| 195 |
if (!resource.exists()) { |
206 |
if (!resource.exists()) { |
| 196 |
IFile file = FileResourceUtils.createFile(context, target, sourceURL.openStream(), monitor, env.getStatusHandler()); |
207 |
IFile file = FileResourceUtils.createFile(context, target, sourceURL.openStream(), monitor, env.getStatusHandler()); |