You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jv...@apache.org on 2005/10/03 21:36:44 UTC

svn commit: r293440 - /maven/components/trunk/maven-site/src/site/apt/guides/getting-started/index.apt

Author: jvanzyl
Date: Mon Oct  3 12:36:42 2005
New Revision: 293440

URL: http://svn.apache.org/viewcvs?rev=293440&view=rev
Log: (empty)

Modified:
    maven/components/trunk/maven-site/src/site/apt/guides/getting-started/index.apt

Modified: maven/components/trunk/maven-site/src/site/apt/guides/getting-started/index.apt
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-site/src/site/apt/guides/getting-started/index.apt?rev=293440&r1=293439&r2=293440&view=diff
==============================================================================
--- maven/components/trunk/maven-site/src/site/apt/guides/getting-started/index.apt (original)
+++ maven/components/trunk/maven-site/src/site/apt/guides/getting-started/index.apt Mon Oct  3 12:36:42 2005
@@ -110,21 +110,37 @@
   This is a very simple POM but still displays the key elements every POM contains so lets walk through each of them
   to familiarize you with the POM essentials:
 
-  * <<project>>
+  * <<project>> This is the top-level element in all Maven pom.xml files.
 
-  * <<modelVersion>>
+  * <<modelVersion>> This element indicates what version of the object model this POM is using. The version of the
+    model itself changes very infrequently but it is mandatory in order to ensure stability of use when and if
+    the Maven developers deem a change to the model necessasry.
+
+  * <<groupId>> This element indicates the unique groupId of the organization or group that created the project.
+    The groupId is on of the key identifiers of a project and is typically based on the fully qualified
+    domain name of your organization. For example  <<<org.apache.maven.plugins>>> is the designated groupId for
+    all Maven plug-ins.
+
+  * <<artifactId>> This element indicates the unique base name of the primary artifact being generated by this project.
+    The primary artifact for a project is typically a JAR file. Secondary artifacts like source bundles also use
+    the artifactId as part of their final name. A typical artifact produced by would have the form
+    \<artifactId\>-\<version\>.\<extension\>.
+
+  * <<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.
+
+  * <<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
+    indicates a project is in a state of development. We will discuss the use of snapshots and how they work further
+    on in the guide.
 
-  * <<groupId>>
+  * <<name>> This element indicates the display name used for the project. This name is often used in Maven's
+    generated documentation.
 
-  * <<artifactId>>
-
-  * <<packaging>>
-
-  * <<version>>
-
-  * <<name>>
-
-  * <<url>>
+  * <<url>> This element indicates where the project's site can be found. This url is often used in Maven's
+    generated documentation.
 
   []
 
@@ -201,24 +217,73 @@
  another standard convention employed by Maven. So, if you're a keen observer you'll notice that using the
  standard conventions the POM above is very small and you haven't explicity had to tell Maven where any of
  your sources are or where the output should go. By following the standard Maven conventions you can get
- a lot done with very little effort! Just as a comparison lets take a look at what you might have had to do
+ a lot done with very little effort! Just as a casual comparison lets take a look at what you might have had to do
  in {{{http://ant.apache.org}Ant}} to accomplish the same {{{../../ant/build-a1.xml}thing}}.
 
- Now this is simply to compile a single application source and the Ant script shown is pretty much the same
+ Now this is simply to compile a single tree of application sources and the Ant script shown is pretty much the same
  size as the POM shown above. But we'll see how much more we can do with just that simple POM above!
 
-* How do I compile my test sources?
+* How do I compile my test sources and run my unit tests?
+
+ So you can now compile your applications sources and now you've got some unit tests that you want to compile
+ and execute because every programmer always writes and executes their unit tests (nudge nudge wink wink).
+
+ Execute the following command:
 
 +----+
 
-m2 test-compile
+m2 test
 
 +----+
 
  Upon executing this command you should see output like the following:
 
++----+
+
+[INFO] ----------------------------------------------------------------------------
+[INFO] Building Maven Quick Start Archetype
+[INFO]    task-segment: [test]
+[INFO] ----------------------------------------------------------------------------
+[INFO] [resources:resources]
+[INFO] [compiler:compile]
+Compiling 1 source file to /home/jvanzyl/js/org.apache.maven/components/trunk/maven-site/my-app/target/classes
+[INFO] [resources:testResources]
+[INFO] [compiler:testCompile]
+Compiling 1 source file to /home/jvanzyl/js/org.apache.maven/components/trunk/maven-site/my-app/target/test-classes
+[INFO] [surefire:test]
+[INFO] Setting reports dir: /home/jvanzyl/js/org.apache.maven/components/trunk/maven-site/my-app/target/surefire-reports
+
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+[surefire] Running com.mycompany.app.AppTest
+[surefire] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.005 sec
+
+Results :
+[surefire] Tests run: 1, Failures: 0, Errors: 0
+
+[INFO] ----------------------------------------------------------------------------
+[INFO] BUILD SUCCESSFUL
+[INFO] ----------------------------------------------------------------------------
+[INFO] Total time: 2 seconds
+[INFO] Finished at: Mon Oct 03 15:06:22 GMT-05:00 2005
+[INFO] Final Memory: 2M/6M
+[INFO] ----------------------------------------------------------------------------
+
++----+
 
-~~* How do I create a JAR?
+ If you simply want to compile your test sources you can execute the following which does not run your unit tests:
+
++----+
+
+ m2 test-compile
+
++----+
+
+ Now that you can compile your application sources and compile your tests and execute them you'll want to move
+ on to the next logical step so you'll be asking ...
+
+* How do I create a JAR and install it in my local repository?
 
 +----+
 +----+
@@ -234,6 +299,8 @@
 
 FYI - In beta-2, while the other technique is still supported, the
 recommended way is finally settled:
+
+chatting with emm in irc and src/main/filters seems like a good place for filter files.
 
 <build>
   <filters>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org