The build.xml is at the project root. This web application runs successfully.
I created an ANT script to compile, build a WAR file, and deploy it. But, even the basic task does not work. I right click on the build.xml --> run as ... --> Ant build. In the console, I can see all the echo messages and no error. However, I do not see any new directories created (I "refresh" the project.). No "class" files compiled from the Java code and not to mention build and deploy.
There is something I did not get it right. Please help. Here is my Ant script:
posted 3 years ago
It is me again.
Sorry, the "Java Resources" is Eclipse specific. To be accurate, under the project root, there are src, build, WebContent folders and the build.xml file.
If you didn't get any error messages out of running that script, then perhaps the directories were actually created somewhere you didn't expect. You've got another task which is supposed to delete some directories: did it delete the directories you expected it to delete? The potential problem is that the current working directory when you ran the script wasn't what you hoped it would be.
You can use the Windows file-viewer app to search for directories with a particular name, so try that.
posted 3 years ago
Hello Paul, You are right. The cause of the problem is
The current working directory when you ran the script wasn't what you hoped it would be.
I have to change:
Now, I am able to compile the Java classes (i.e. javac works). I can see the compiled Java classes under root/build/classes folder.
However, I still cannot build a WAR file (I have read those previously posted relevant threads and tried to follow the examples). I can see 1. the "copy" tasks do not work because I do not see files are copied into the "build/war" directory; and 2. the "war" task is not doing anything. Nevertheless, there is no error message on the console. Here I post my ANT script and hoping to get some more help. Thank you very much.
This tiny ad is wafer thin:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps