Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [wtp-jst-dev] Corollary to org.eclipse.jst.component.dependency inWTP 1.5

Hi John,

The full details how classpath publish/export support is integrated into
WTP is somewhat complex (required distinct code for both publish and
export support) but the modification of the computed IVirtualReferences
is key. 

One key barrier to support pre-WTP 2.0 (at least for the current WTP
design) was the lack of the necessary support for Java classpath
attributes (there was a point at which modification to the Java build
path for a project would clear any custom cp attributes that had been
set).

User oriented details on this functionality can be found at:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=185176

Plans for a full reconciliation between the JDT classpath and WTP module
dependencies (tentatively planned for 3.0) can be found at:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=116856
and
http://wiki.eclipse.org/Web_Tools_Platform_Release_3.0_Requirements/Java
CPvsJavaEEModDeps

The bulk of the current code that is specific to cp entry publish/export
support is located in the org.eclipse.jst.j2ee plugin within the
org.eclipse.jst.j2ee.classpathdep and
org.eclipse.jst.j2ee.internal.classpathdep packages.

To understand how the flagged entries on the classpath contribute to the
set of IVirtualReferences for a WTP module project, see
J2EEModuleVirtualComponent.getJavaClasspathReferences(). To understand
how this is leveraged during publish, see J2EEFlexProjectDeployable. To
understand how this is leveraged during export, see
ComponentLoadStrategyImpl (and subclasses). The classes you referenced
are involved in the integration of this functionality into the "J2EE
Module Dependencies" UI.

Hope this helps. Feel free to ping me if you have other questions or
want to discuss more.

-Rob



-----Original Message-----
From: wtp-jst-dev-bounces@xxxxxxxxxxx
[mailto:wtp-jst-dev-bounces@xxxxxxxxxxx] On Behalf Of JKSchneider
Sent: Tuesday, November 20, 2007 10:46 AM
To: wtp-jst-dev@xxxxxxxxxxx
Subject: [wtp-jst-dev] Corollary to org.eclipse.jst.component.dependency
inWTP 1.5


A coworker and I are working on an Ivy dependency management plugin
targeted
at RAD7 (Eclipse 3.2.2, WTP 1.5.4).  The basic concept is wholly similar
to
how the Maven plugin functions in that a classpath container is created
to
hold the Ivy-managed dependencies in order that we can check our
.classpath
into source control and it is not checked out each time we refresh
dependencies.

The issue at hand is how to add the jars and project references included
in
this classpath container to the runtime classpath as well.  I see that
Rob
Frost did some excellent work for WTP 2.0 in exposing a new classpath
attribute and API for tagging classpath containers among other entries
for
the runtime classpath.

I was hoping to reproduce a similar behavior in our plugin to support
the
already lagging RAD7.

It appears that the key to Rob Frost's extension point lies in 
org.eclipse.jst.j2ee.application.internal.operations.ClassPathSelection
and
org.eclipse.jst.j2ee.internal.common.ClasspathModel.

While I can clearly see how Rob Frost is building up his classpath
references maps, creating IVirtualReference objects, it is unclear to me
if
these IVirtualReference instances are what actually binds references in
the
runtime classpath and what is being done with the instances after their
creation.  I am guessing I am just not noticing a core class a la
ContainerCore, JavaCore, and others that might expose service methods to
bind these references.

Surely there is some other way to add classpath resources to the runtime
classpath without modifying the WTP core.  I fail to understand how the
J2EE
Module Dependencies mechanism worked prior to WTP 2.0 which would appear
to
do what we want.

Any pointers as to how the runtime classpath is modified programatically
would be appreciated.

Thanks,

Jon Schneider
-- 
View this message in context:
http://www.nabble.com/Corollary-to-org.eclipse.jst.component.dependency-
in-WTP-1.5-tf4843947.html#a13858400
Sent from the Eclipse JST - Dev mailing list archive at Nabble.com.

_______________________________________________
wtp-jst-dev mailing list
wtp-jst-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-jst-dev

Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.


Back to the top