This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes .classpath entry to build war out using dependent war file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark ".classpath entry to build war out using dependent war file " Watch ".classpath entry to build war out using dependent war file " New topic

.classpath entry to build war out using dependent war file

Phani.Kiran Gutha

Joined: Dec 14, 2010
Posts: 14
Hi all i have very rare problem which needs to be solved.


I have a dynamic web project which is already built and i have war file of that project.

I need to apply some customizations on top of the war file given to me.

Using maven or ant am able to compile the custom code written by me and able to add produced class files to the war file.

But the this is hapenning for final war file build.

when i want to test my code in eclipse. the war file build and deployed in jboss plugin contains only the class files produced out of java files written by me..........

Please help me how can i modify the .classpath file of my project so that a jboss publish can build a war file using the dependent war file which can run on eclipse-jboss to test my custom code....

Advance Thanks.....
Peter Johnson

Joined: May 14, 2008
Posts: 5852

You cannot have one WAR depend on another, so what you will have to do is repackage what you have.

If you have the source code for the original WAR, add it to your WAR project - this in effect merges the two into one.

If you don't have the source, then try this: pakcafe the .class files into a JAR file and add them to the WEB-INF/lib directory or your WAR project. Then take the rest of the original WAR (JSPs, etc) and merge it with your WAR project.

JBoss In Action
Have you checked out Aspose?
subject: .classpath entry to build war out using dependent war file
It's not a secret anymore!