Once you run the ant command, it will generate the jar file.
Run the jar file as follows.
Note: In MAC or Linuc before running java, give the execute permissions as follows. #chmod -R 777 <>/HelloWorld-20170629.jar
Build.xml:
Contains all the instructions:
-
Copy all the files except java files to "build/classes"
-
Compile .java files in "src" directory and copy .class files in "build/classes"
-
Package all the content in "build/classes" and "WebContent" as a war/jar/ear files.
-
Deploy the war/jar/ear file in to "webapp" directory of Tomcat
-
Cleanup "build/classes"