June 2005
Beginner
224 pages
5h 40m
English
You have a new project with one class and a unit test. Next, let's
build the project and run the App
class.
Create a JAR file containing this application's classes by executing the jar:jar goal. The JAR plug-in defines a
shorthand goal named jar which
depends upon the jar:jar goal.
Executing either goal will have the same result. All plug-ins define
such a shortcut; for example, the test goal executes the test:test goal from the Test plug-in.
Execute the jar goal with maven jar:
C:\dev\mavenbook\code\genapp\test-application>maven jar _ _ _ _ | \/ |_ _ _Apache_ _ _ _ _ | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~ |_| |_\_ _,_|\_/\_ _ _|_||_| v. 1.0.2 Attempting to download junit-3.8.1.jar. 118K downloaded build:start: java:prepare-filesystem: [mkdir] Created dir: C:\dev\mavenbook\code\genapp\test-application\target\classes java:compile: [echo] Compiling to C:\dev\mavenbook\code\genapp\test-application/target/classes [echo] [javac] Compiling 1 source file to C:\dev\mavenbook\code\genapp\test-application\ target\classes java:jar-resources: Copying 1 file to C:\dev\mavenbook\code\genapp\test-application\target\classes test:prepare-filesystem: [mkdir] Created dir: C:\dev\mavenbook\code\genapp\test-application\target\ test-classes [mkdir] Created dir: C:\dev\mavenbook\code\genapp\test-application\target\ test-reports test:test-resources: test:compile: [javac] Compiling 3 source files to C:\dev\mavenbook\code\genapp\test-application\ ...Read now
Unlock full access