This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant Build Failing --  Need a way to pick jar file during run time. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "Ant Build Failing --  Need a way to pick jar file during run time." Watch "Ant Build Failing --  Need a way to pick jar file during run time." New topic
Author

Ant Build Failing -- Need a way to pick jar file during run time.

Prachi Garg
Greenhorn

Joined: Dec 29, 2011
Posts: 2
Hi Everyone, I am new to ANT. I am looking for some inputs on writing build.xml file, I have written one, It works fine if I include one of my jar file in ../WEB-INF/lib folder.

I dont want this jar file to be packaged while creating WAR/EAR files and This jar file is required during run time and want to exclude this jar file from ../WEB-INF/lib folder and still build successfully..

Please let me know possible solutions.

My Build.xml file looks like:


Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2350

Welcome to the Ranch, Prachi!


OCUP UML fundamental
ITIL foundation
Prachi Garg
Greenhorn

Joined: Dec 29, 2011
Posts: 2
Any Suggestions here please?

Thanks,
Prachi
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5579

The copy statement in lines 72-74, try adding an excludes value to not copy the JAR file you don't want. In general, that is how you prevent Ant from copying files you don't want.

If I know exactly what the JAR file was named, and where it is located, I could be more specific. Posting the project directory and file structure would help.


JBoss In Action
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Ant Build Failing -- Need a way to pick jar file during run time.
 
Similar Threads
Class files generated in web-inf directory as well as in base directory
What does ${user.home} means ? Where is build .properties ?
weblogic.management.DeploymentException: [Deployer:149189]
How to automate deployment of war in Tomcat through Ant
Which IDE support JSP 2.0