Deploying an eclipse module to multiple locations on the same server [message #652349] |
Thu, 03 February 2011 11:15  |
Eclipse User |
|
|
|
I am trying to use Eclipse Helios to deploy modules to a server which will expose an applet where some modules are required by both the applet and the server. To better explain this I have given a scenario below (I have simplified my problem as I am working with a lot more module than described in the example, however the principle is the same):
Imagine a project with the following 4 modules (each as a Java project in eclipse):
-data (required by both the applet and the server)
-interface (required by both the applet and the server)
-server-code (required only by the server)
-applet-code (required only by the applet)
The applet goes into %WEPAPP_ROOT%/applet and the server code will obviously go in the %WEBAPP_ROOT%/WEB-INF/lib folder.
I have created another project (Server) which is a dynamic web project and have edited the org.eclipse.wst.common.component to look like the following:
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="Server">
<wb-resource deploy-path="/" source-path="/WebContent"/>
<dependent-module archiveName="data.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/data/data">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="interface.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/interface/interface">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="server-code.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/server-code/server-code">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="applet-code.jar" deploy-path="/applet" handle="module:/resource/applet-code/applet-code">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="data.jar" deploy-path="/applet" handle="module:/resource/data/data">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="interface.jar" deploy-path="/applet" handle="module:/resource/interface/interface">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="context-root" value="Server"/>
<property name="java-output-path" value="/Server/build/classes"/>
</wb-module>
</project-modules>
When I add the Server project to my Tomcat server and publish the modules interface.jar, data.jar and server-code.jar in the WEB-INF/lib folder build fine and the applet-code.jar appears in the applet folder, but the interface.jar and data.jar do not appear in the applet directory.
Is there a syntax for instructing eclipse to publish the same module to two different locations on the server?
|
|
|
Re: Deploying an eclipse module to multiple locations on the same server [message #652414 is a reply to message #652349] |
Thu, 03 February 2011 13:33  |
Eclipse User |
|
|
|
On 2/3/2011 11:15 AM, colin_gs@tiscali.co.uk wrote:
> I am trying to use Eclipse Helios to deploy modules to a server which
> will expose an applet where some modules are required by both the applet
> and the server. To better explain this I have given a scenario below (I
> have simplified my problem as I am working with a lot more module than
> described in the example, however the principle is the same):
>
> Imagine a project with the following 4 modules (each as a Java project
> in eclipse): -data (required by both the applet and the server)
> -interface (required by both the applet and the server) -server-code
> (required only by the server) -applet-code (required only by the applet)
>
> The applet goes into %WEPAPP_ROOT%/applet and the server code will
> obviously go in the %WEBAPP_ROOT%/WEB-INF/lib folder.
>
> I have created another project (Server) which is a dynamic web project
> and have edited the org.eclipse.wst.common.component to look like the
> following:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project-modules id="moduleCoreId" project-version="1.5.0">
> <wb-module deploy-name="Server">
> <wb-resource deploy-path="/" source-path="/WebContent"/>
> <dependent-module archiveName="data.jar" deploy-path="/WEB-INF/lib"
> handle="module:/resource/data/data">
> <dependency-type>uses</dependency-type>
> </dependent-module>
> <dependent-module archiveName="interface.jar" deploy-path="/WEB-INF/lib"
> handle="module:/resource/interface/interface">
> <dependency-type>uses</dependency-type>
> </dependent-module>
> <dependent-module archiveName="server-code.jar"
> deploy-path="/WEB-INF/lib"
> handle="module:/resource/server-code/server-code">
> <dependency-type>uses</dependency-type>
> </dependent-module>
> <dependent-module archiveName="applet-code.jar" deploy-path="/applet"
> handle="module:/resource/applet-code/applet-code">
> <dependency-type>uses</dependency-type>
> </dependent-module>
> <dependent-module archiveName="data.jar" deploy-path="/applet"
> handle="module:/resource/data/data">
> <dependency-type>uses</dependency-type>
> </dependent-module>
> <dependent-module archiveName="interface.jar" deploy-path="/applet"
> handle="module:/resource/interface/interface">
> <dependency-type>uses</dependency-type>
> </dependent-module>
> <property name="context-root" value="Server"/>
> <property name="java-output-path" value="/Server/build/classes"/>
> </wb-module>
> </project-modules>
>
> When I add the Server project to my Tomcat server and publish the
> modules interface.jar, data.jar and server-code.jar in the WEB-INF/lib
> folder build fine and the applet-code.jar appears in the applet folder,
> but the interface.jar and data.jar do not appear in the applet directory.
>
> Is there a syntax for instructing eclipse to publish the same module to
> two different locations on the server?
I don't think WTP supports having more than one dependency on a
particular project. My guess is that it is only "acting" on the first
one when publishing.
Cheers,
Larry
|
|
|
Powered by
FUDForum. Page generated in 0.04139 seconds