3

Hi all i have very rare problem which needs to be solved.

Problem/issue:

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 happening 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.....

2 Answers 2

1

Not a rare problem.

What you need to combine two web applications (wars) together. You have your customization war on which you need to overlay the existing web application.

It looks like you have already solved it from build perspective and looking for Eclipse support. To my knowledge, Eclipse lacks support for this. You probably need to manually do the necessary configuration to make this happen.

Sign up to request clarification or add additional context in comments.

Comments

0

It looks strange to me to have two WAR files.

Perhaps you have to consider to package your customizations in a JAR and inserting that jar in the original WAR file.

Otherwise, another solution, and what I do often with open-source project to customize is to have three projects in your workspace.

  • PRJ-src (with your original sources/JAR/WAR)
  • PRJ-custom (which depends of the previous one); This project contains only the new classes or custom spring xml files (with injection of my own classes)
  • PRJ (the merge of the two previous projects)

I create an Ant task in the 3rd project which takes the 1st project (PRJ-src) and merge with the 2nd project (PRJ-custom). This is possible to do so with Maven as well.

Then this is the only project I deploy in my app server (tomcat / jboss).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.