Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Maven2 and WTP
Maven2 and WTP [message #224891] Wed, 10 December 2008 13:24 Go to next message
Albert Liptay is currently offline Albert LiptayFriend
Messages: 3
Registered: July 2009
Junior Member
I can't seem to figure out how to properly include another project to my
main project and have the other project's classes published to Tomcat
(version 6.0.18)

I have:
Q4E .8
Eclipse Ganymede SP1
Tomcat 6.0.18

To create a maven wtp project (main), I use the Maven 2 Project Creation
Wizard and the maven-archetype-webapp

In my pom.xml (main project) I have a dependency on a toolkit project. If
I go to the Java Build Path/Libraries, the project is under the Maven
Classpath Container.

However, when I publish to a Tomcat server (WTP), it pulls the dependent
jars from toolkit into the deploy path, but doesn't copy the classes from
toolkit project to the deploy path.

If I look at the main project's
settings/org.eclipse.wst.common.component, I can see why (there's no
reference to the src folders of toolkit:

<dependent-module deploy-path="/WEB-INF/lib"
handle="module:/resource/WSToolkit/WSToolkit">
<dependency-type>uses</dependency-type>
</dependent-module>

What I'm stuck on is how to tell maven2/wtp/tomcat? to deploy the toolkit
classes to Tomcat.

Any ideas/thoughts would be greatly appreciated
Re: Maven2 and WTP [message #224906 is a reply to message #224891] Wed, 10 December 2008 16:02 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
Albert Liptay wrote:
> I can't seem to figure out how to properly include another project to my
> main project and have the other project's classes published to Tomcat
> (version 6.0.18)
>
> I have:
> Q4E .8
> Eclipse Ganymede SP1
> Tomcat 6.0.18
>
> To create a maven wtp project (main), I use the Maven 2 Project Creation
> Wizard and the maven-archetype-webapp
>
> In my pom.xml (main project) I have a dependency on a toolkit project.
> If I go to the Java Build Path/Libraries, the project is under the Maven
> Classpath Container.
>
> However, when I publish to a Tomcat server (WTP), it pulls the dependent
> jars from toolkit into the deploy path, but doesn't copy the classes
> from toolkit project to the deploy path.
>
> If I look at the main project's
> settings/org.eclipse.wst.common.component, I can see why (there's no
> reference to the src folders of toolkit:
>
> <dependent-module deploy-path="/WEB-INF/lib"
> handle="module:/resource/WSToolkit/WSToolkit">
> <dependency-type>uses</dependency-type>
> </dependent-module>

This should result in a WSToolkit.jar in the WEB-INF/lib of the
published webapp. Typically this would be in a folder for the web
project under the
" .metadata\.plugins\org.eclipse.wst.server.core\tmp?\wtpwebap ps " folder
for the server. Can you confirm that the jar is not there?

Cheers,
Larry

>
> What I'm stuck on is how to tell maven2/wtp/tomcat? to deploy the
> toolkit classes to Tomcat.
>
> Any ideas/thoughts would be greatly appreciated
>
>
Re: Maven2 and WTP [message #224914 is a reply to message #224906] Wed, 10 December 2008 20:26 Go to previous messageGo to next message
Albert Liptay is currently offline Albert LiptayFriend
Messages: 3
Registered: July 2009
Junior Member
Ok, I confirmed that the WSToolkit.jar is not present in the published
WEB-INF\lib folder (mind you if it were I might not be having this problem
:)

So, I guess my next question is which component/piece of WTP or maven2 is
supposed to create this WSToolkit.jar? BTW, manually copying the toolkit
jar after a mvn install to the WEB-INF\lib folder works, so my only hurdle
is to get the WSToolkit.jar created and published.

Any further ideas?
Thanks,
Albert.
Re: Maven2 and WTP [message #224955 is a reply to message #224914] Thu, 11 December 2008 14:07 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
Albert Liptay wrote:
> Ok, I confirmed that the WSToolkit.jar is not present in the published
> WEB-INF\lib folder (mind you if it were I might not be having this
> problem :)
>
> So, I guess my next question is which component/piece of WTP or maven2
> is supposed to create this WSToolkit.jar? BTW, manually copying the
> toolkit jar after a mvn install to the WEB-INF\lib folder works, so my
> only hurdle is to get the WSToolkit.jar created and published.
>
> Any further ideas?
> Thanks,
> Albert.
>

Is there a ".settings/org.eclipse.wst.common.component" in the WSToolkit
project? Maybe the "disconnect" is on that end. You could also try
creating a standard Java project and add it as a dependency of the main
project. If that creates a jar successfully, we'll have to figure out
what it is about the WSToolkit project that's preventing its jar from
being created.

Cheers,
Larry
Previous Topic:Tomcat 6
Next Topic:Tomcat 5.5 startup detection
Goto Forum:
  


Current Time: Sun Nov 23 10:14:32 GMT 2014

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

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