• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Eclipse + Maven + Tomcat

 
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have create a maven web project project. And one of the dependencies of my project
is a maven simple project (package as a jar) call my-services. Both the projects are presents in eclipse

I run mvn:eclipse:eclipse for my-service and mvn:eclipse:eclipse -Dwtpversion=2.0 for my web project

In the .classpath, of the webapp, i have:
<classpathentry kind="src" path="/my-services"/>

In the org.eclipse.wst.common file of the webapp i, have

<dependent-module archiveName="my-services.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/my-services/my-services">
<dependency-type>uses</dependency-type>
</dependent-module>

The problem is that when i deploy my webapp in tomcat with eclipse , the jar of my-services is not deploy
or .class or the my-services are not deployed with the webapp. All classes of my simple project are missing
after the deployement.

I'm missing something in my configuration ?

I'm using Eclipse Ganymede, maven 2.0.9 and tomcat 5

Thanks !!!
 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you include the "my-services" dependency in your web app's POM file? If so, is it set to be deployed with your war? Adding a dependency but accidentally placing it as test or provided will not make it go in the war.
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
do an mvn package and mvn deploy first (this should deploy to your local repo), then provide repository tag for your POM (so that you Maven knows that it has to get it from local repo, the packaged jar), then finally add:



Trilochan.
 
Collins Mbianda
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hy guys,
Thanks for you responses,
I have "myServices" as dependency in the pom of my webapp, i think is for that reason
i have a reference of that project in the webapp.
When i do an mvn clean install, i see that the jar is in the local repository.
If i do an mvn clean install on my webapp i have a war with my jar inside the lib directory of the war. And it OK

My problem is that when i deploy the webapp whith wtp in eclipse, my java project("myServices") is not deploy.

The problem is when i deploy my webapp in eclipse

 
Collins Mbianda
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I get it.
to tell Eclipse to deploy my jar in tomcat i need to do>> mvn eclipse:eclipse -Dwtpversion=2.0 on both the two projetcs

I was doing it just on the web project. On the project package i was just doing an mvn eclipse:eclipse.

Thanks !!!
Collins
 
reply
    Bookmark Topic Watch Topic
  • New Topic