aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Conditional dependency Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Conditional dependency" Watch "Conditional dependency" New topic
Author

Conditional dependency

Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 613
Hi,

I have to add an dependency for JTA jar files and one conf folder (under <resources> tag) , but only when i build it for tomcat, how can i achieve this in pom.xml ?

-P


All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15632
    
  15

Use the Maven profile facility. Define one or more profiles in the POM with the extra stuff in them and use the "-P" option on Maven to activate the profile when you need to.

I've been using this for things like building test apps for Tomcat when the production build is an IBM iSeries.


Customer surveys are for companies who didn't pay proper attention to begin with.
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 613
thanks much Tim will try it
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Conditional dependency
 
Similar Threads
How to put Filter in component diagram
DAOs X POJOs X FACADEs
"throws" UML relationship between classes
Passed SCEA Part-2 and 3
Tomcat - The requested resource is not available