Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Corollary to org.eclipse.jst.component.dependency in WTP 1.5
Corollary to org.eclipse.jst.component.dependency in WTP 1.5 [message #204754] Tue, 20 November 2007 15:34 Go to next message
Eclipse User
Originally posted by: JKSchneider.gmail.com

A coworker and I are working on an Ivy dependency management plugin targeted
at RAD7 (Eclipse 3.2.2, WTP 1.5.5). 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.ClassPa thSelection and
org.eclipse.jst.j2ee.internal.common.ClasspathModel.

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
Re: Corollary to org.eclipse.jst.component.dependency in WTP 1.5 [message #204950 is a reply to message #204754] Mon, 26 November 2007 15:18 Go to previous message
Rob Frost is currently offline Rob Frost
Messages: 64
Registered: July 2009
Member
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_Requi rements/JavaCPvsJavaEEModDeps

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

"Jon Schneider" <JKSchneider@gmail.com> wrote in message
news:fhuuqi$v7t$1@build.eclipse.org...
>A coworker and I are working on an Ivy dependency management plugin
>targeted
> at RAD7 (Eclipse 3.2.2, WTP 1.5.5). 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.ClassPa thSelection
> and
> org.eclipse.jst.j2ee.internal.common.ClasspathModel.
>
> 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
>
>
Previous Topic:IWAB0489E Error when deploying Web service to Axis
Next Topic:Automatically deploy jar file when deploying web application
Goto Forum:
  


Current Time: Sun Sep 21 14:14:26 GMT 2014

Powered by FUDForum. Page generated in 0.05309 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software