I have a war(built using Struts 1.x jars) which has been deployed on server but do not have the corresponding source code so I have basically extracted the .class files from the jar and de-compiled them and trying to build the source code(project) and commit to repository.
So, I want to create a Struts 1.x project using Ant tool, import it into Eclipse IDE and then generate a war.
I tried the following:
1. Created a dynamic web project & added struts jars
New -> Other -> Web - >Dynamic Web Project
Updated web.xml & created struts-config.xml under WEB-INF
Then struts jars were added to build path
2. Created an Ant build file for existing project
Select File > Export from main menu<br/>
In the Export dialog, select General > Ant Buildfilesas follows:
Click Next. In the Generate Ant Buildfilesscreen:
Check the project in list.
Uncheck the option "Create target to compile project using Eclipse compiler" because we want to create a build file which is independent of Eclipse.
Leave the Name for Ant buildfile as default: build.xml
Click Finish, Eclipse will generate the build.xmlfile
3. Run Ant build to build a war.
Is this the correct way of building war using ant tool? Or is there any other way?