Lines 37-42
Link Here
|
37 |
import org.eclipse.jst.common.jdt.internal.javalite.JavaLiteUtilities; |
37 |
import org.eclipse.jst.common.jdt.internal.javalite.JavaLiteUtilities; |
38 |
import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil; |
38 |
import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil; |
39 |
import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualArchiveComponent; |
39 |
import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualArchiveComponent; |
|
|
40 |
import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent; |
40 |
import org.eclipse.jst.j2ee.componentcore.util.EARArtifactEdit; |
41 |
import org.eclipse.jst.j2ee.componentcore.util.EARArtifactEdit; |
41 |
import org.eclipse.jst.j2ee.ejb.EJBJar; |
42 |
import org.eclipse.jst.j2ee.ejb.EJBJar; |
42 |
import org.eclipse.jst.j2ee.internal.EjbModuleExtensionHelper; |
43 |
import org.eclipse.jst.j2ee.internal.EjbModuleExtensionHelper; |
Lines 71-80
Link Here
|
71 |
import org.eclipse.wst.common.componentcore.resources.IVirtualReference; |
72 |
import org.eclipse.wst.common.componentcore.resources.IVirtualReference; |
72 |
import org.eclipse.wst.server.core.IModule; |
73 |
import org.eclipse.wst.server.core.IModule; |
73 |
import org.eclipse.wst.server.core.ServerUtil; |
74 |
import org.eclipse.wst.server.core.ServerUtil; |
|
|
75 |
import org.eclipse.wst.server.core.internal.ModuleFile; |
76 |
import org.eclipse.wst.server.core.internal.ModuleFolder; |
74 |
import org.eclipse.wst.server.core.model.IModuleFile; |
77 |
import org.eclipse.wst.server.core.model.IModuleFile; |
75 |
import org.eclipse.wst.server.core.model.IModuleResource; |
78 |
import org.eclipse.wst.server.core.model.IModuleResource; |
76 |
import org.eclipse.wst.server.core.util.ModuleFile; |
|
|
77 |
import org.eclipse.wst.server.core.util.ModuleFolder; |
78 |
import org.eclipse.wst.web.internal.deployables.ComponentDeployable; |
79 |
import org.eclipse.wst.web.internal.deployables.ComponentDeployable; |
79 |
/** |
80 |
/** |
80 |
* J2EE module superclass. |
81 |
* J2EE module superclass. |
Lines 355-360
Link Here
|
355 |
return singleUtil; |
356 |
return singleUtil; |
356 |
} |
357 |
} |
357 |
|
358 |
|
|
|
359 |
/** |
360 |
* The references for J2EE module deployment are only those child modules of EARs or web modules |
361 |
*/ |
362 |
@Override |
363 |
protected IVirtualReference[] getReferences(IVirtualComponent aComponent) { |
364 |
if (aComponent == null || aComponent.isBinary()) { |
365 |
return new IVirtualReference[] {}; |
366 |
} else if (JavaEEProjectUtilities.isDynamicWebProject(aComponent.getProject())) { |
367 |
return getWebLibModules((J2EEModuleVirtualComponent)aComponent); |
368 |
} else if (JavaEEProjectUtilities.isEARProject(aComponent.getProject())) { |
369 |
return super.getReferences(aComponent); |
370 |
} else { |
371 |
return new IVirtualReference[] {}; |
372 |
} |
373 |
} |
374 |
|
375 |
@Override |
376 |
protected ArtifactEdit getComponentArtifactEditForRead() { |
377 |
return EARArtifactEdit.getEARArtifactEditForRead(component.getProject()); |
378 |
} |
379 |
|
380 |
/** |
381 |
* This method will return the list of dependent modules which are utility jars in the web lib |
382 |
* folder of the deployed path of the module. It will not return null. |
383 |
* |
384 |
* @return array of the web library dependent modules |
385 |
*/ |
386 |
private IVirtualReference[] getWebLibModules(J2EEModuleVirtualComponent comp) { |
387 |
List result = new ArrayList(); |
388 |
IVirtualReference[] refComponents = comp.getNonManifestReferences(); |
389 |
// Check the deployed path to make sure it has a lib parent folder and matchs the web.xml |
390 |
// base path |
391 |
for (int i = 0; i < refComponents.length; i++) { |
392 |
if (refComponents[i].getRuntimePath().equals(WEBLIB)) |
393 |
result.add(refComponents[i]); |
394 |
} |
395 |
return (IVirtualReference[]) result.toArray(new IVirtualReference[result.size()]); |
396 |
} |
397 |
|
358 |
/** |
398 |
/** |
359 |
* Returns the classpath as a list of absolute IPaths. |
399 |
* Returns the classpath as a list of absolute IPaths. |
360 |
* |
400 |
* |