June 2005
Beginner
224 pages
5h 40m
English
There are times when you will want to build using Apache Ant. Maybe your project is using an automated process which relies on Ant, or maybe you have some team members who are not yet comfortable making the transition to Maven and who wish to continue using Ant. Since many IDEs already support projects with Ant build files, you can use Maven to generate a build.xml file so that your project can be built using Apache Ant.
Run the Ant plug-in. Running maven
ant will create a build.xml file which contains targets to
gather dependencies, build, and test your application. Take a look at
the output of running the default jar target:
C:\dev\mavenbook\code\genapp\test-application>ant Buildfile: build.xml init: [mkdir] Created dir: C:\dev\mavenbook\code\genapp\target\lib get-deps: [get] Getting: http://www.ibiblio.org/maven/springframework/jars/spring-core-1.1.4.jar [get] Getting: http://www.ibiblio.org/maven/springframework/jars/spring-web-1.1.4.jar compile: [copy] Copying 1 file to C:\dev\mavenbook\code\genapp\target\classes junit-present: [echo] = = = = = = = = = = = = = = = = = = WARNING = = = = = = = = = = = = = = = = = = = = = = = = [echo] Junit isn't present in your ${ANT_HOME}/lib directory. Tests not executed. [echo] = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = compile-tests: internal-test: test: jar: [jar] Building jar: C:\dev\mavenbook\code\genapp\test-application\target\ test-application-1.0.jar ...Read now
Unlock full access