This commit is contained in:
Jason van Zyl 2005-10-03 19:46:30 +00:00
parent 83f92aa8ea
commit 71f15ae92d
1 changed files with 20 additions and 5 deletions

View File

@ -129,7 +129,8 @@ m2 archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app
* <<packaging>> This element indicates the packing to be used by this artifact. This not only means if the artifact
produced is JAR, WAR, or EAR but can also indicate a specific lifecycle to use as part of the build process. This
is a topic we will deal with further on in the guide, just keep in mind the indicated packaging of a project
can play a part in customizing the build lifecycle.
can play a part in customizing the build lifecycle. The default value for the <<<packaging>>> element is JAR
so you do not have to specify this for most projects.
* <<version>> This element indicates the version of the artifact generated by the project. Maven goes a long way
to help you with version management and you will often see the <<<SNAPSHOT>>> designator in a version which
@ -285,7 +286,25 @@ Results :
* How do I create a JAR and install it in my local repository?
Making a JAR file is straight forward enough and can be accomplished by executing the following command:
+----+
m2 package
+----+
If you again take a look at the POM for this project you will notice the <<<packaging>>> element is set to <<<jar>>>.
This is how Maven knows to produce a JAR file from the above command. You can now take a look in the the
<<<${basedir}/target>>> directory and you will see the generated JAR file.
+----+
m2 install
+----+
+----+
~~* How do I package resources inside my JAR?
@ -295,8 +314,6 @@ Results :
~~* How do I filter resources against my POM?
+-----+
FYI - In beta-2, while the other technique is still supported, the
recommended way is finally settled:
@ -308,8 +325,6 @@ chatting with emm in irc and src/main/filters seems like a good place for filter
</filters>
</build>
+-----+
~~* How do use resources with my tests?
~~ o EIDSL