update references to beta-1

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@289594 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-09-16 16:09:56 +00:00
parent d922db3226
commit 38d4a61e39
8 changed files with 300 additions and 173 deletions

View File

@ -8,8 +8,6 @@
Build Lifecycle Build Lifecycle
<<PLEASE NOTE:>> this documentation is current only as of alpha-3.
* Build Lifecycle Basics * Build Lifecycle Basics
Maven 2.0 is based around the central concept of a build lifecycle. What this means is that the process for building Maven 2.0 is based around the central concept of a build lifecycle. What this means is that the process for building
@ -165,8 +163,7 @@ m2 clean:clean install
* Build Lifecycle Phase Reference * Build Lifecycle Phase Reference
The following phases are all the ones available as of the Maven 2.0 alpha-3 release. They are executed in the order The following phases are executed in the order given, up to the point of the one specified.
given, up to the point of the one specified.
*-------------------------------+--------------------------------------------------------------------------------------+ *-------------------------------+--------------------------------------------------------------------------------------+
| <<<validate>>> | validate the project is correct and all necessary information is available. | <<<validate>>> | validate the project is correct and all necessary information is available.

View File

@ -39,7 +39,7 @@ Building a Site
The FML format is the FAQ format, also used in Maven 1.0. The FML format is the FAQ format, also used in Maven 1.0.
Other formats are available, but at this point these 3 are the best tested. There are also several possible output formats, Other formats are available, but at this point these 3 are the best tested. There are also several possible output formats,
but as of alpha-3, only XHTML is available. but as of beta-1, only XHTML is available.
Note that all of the above is optional - just one index file is required in one of the input trees. Each of the paths will be merged Note that all of the above is optional - just one index file is required in one of the input trees. Each of the paths will be merged
together to form the root directory of the site. together to form the root directory of the site.

View File

@ -19,7 +19,8 @@
Maven has also grown into a project that is building other products to help in the software development Maven has also grown into a project that is building other products to help in the software development
lifecycle<!--, lifecycle<!--,
such as the <a href="http://maven.apache.org/continuum">Continuum</a> continuous integration server -->. such as the <a href="http://maven.apache.org/continuum">Continuum</a> continuous integration server -->.
<a href="http://maven.apache.org/project/index.html">More information about the Maven Project</a>. <a href="http://maven.apache.org/project/index.html">More information about the Maven Project</a>
.
</p> </p>
</answer> </answer>
</faq> </faq>
@ -41,7 +42,8 @@
<li>Extensible, with the ability to easily write plugins in Java or other scripting languages</li> <li>Extensible, with the ability to easily write plugins in Java or other scripting languages</li>
<li>Instant access to new features with little or no extra configuration</li> <li>Instant access to new features with little or no extra configuration</li>
<li> <li>
<a href="ant-tasks.html">Ant tasks</a>for dependency management and deployment outside of Maven <a href="ant-tasks.html">Ant tasks</a>
for dependency management and deployment outside of Maven
</li> </li>
</ul> </ul>
<p> <p>
@ -61,7 +63,8 @@
<answer> <answer>
<p> <p>
You've seen You've seen
<a href="#what-is-maven">above</a>the goals that Maven aims to achieve, however there have also <a href="#what-is-maven">above</a>
the goals that Maven aims to achieve, however there have also
been questions about why Maven 2.0 is rewritten from the successful Maven 1.0. In summary, the main goals of been questions about why Maven 2.0 is rewritten from the successful Maven 1.0. In summary, the main goals of
the new Maven 2.0 architecture are: the new Maven 2.0 architecture are:
</p> </p>
@ -93,7 +96,8 @@
</p> </p>
<p> <p>
For more information on whether this release of Maven 2.0 should be used in your environment, please consult For more information on whether this release of Maven 2.0 should be used in your environment, please consult
<a href="maven1.html#m1-or-m2">this topic</a>. <a href="maven1.html#m1-or-m2">this topic</a>
.
</p> </p>
</answer> </answer>
</faq> </faq>
@ -117,7 +121,8 @@
</p> </p>
<p> <p>
For more information, consult the For more information, consult the
<a href="roadmap.html">Road Map</a>. <a href="roadmap.html">Road Map</a>
.
</p> </p>
</answer> </answer>
</faq> </faq>
@ -135,11 +140,13 @@
</p> </p>
<p> <p>
For instructions on checking out and building Maven 2.0, see For instructions on checking out and building Maven 2.0, see
<a href="/maven2/developers/building.html">Building Maven 2.0</a>. <a href="/maven2/developers/building.html">Building Maven 2.0</a>
.
</p> </p>
<p> <p>
For more information, please see For more information, please see
<a href="http://maven.apache.org/contributing/help.html">How to Help</a>. <a href="http://maven.apache.org/contributing/help.html">How to Help</a>
.
</p> </p>
</answer> </answer>
</faq> </faq>
@ -148,7 +155,7 @@
<question>What plugin languages will Maven 2.0 support? What about [insert language here]?</question> <question>What plugin languages will Maven 2.0 support? What about [insert language here]?</question>
<answer> <answer>
<p> <p>
As of the current alpha-3 release, Maven supports pure Java, Beanshell and Marmalade. Java is the preferred As of the current release, Maven supports pure Java, Beanshell and Marmalade. Java is the preferred
language for it's familiarity and speed, while Marmalade is preferred for porting Maven 1.x plugins, and language for it's familiarity and speed, while Marmalade is preferred for porting Maven 1.x plugins, and
writing writing
plugins based on Ant tasks. plugins based on Ant tasks.
@ -182,18 +189,25 @@
<answer> <answer>
<p> <p>
Help for both Maven 1.0 and Maven 2.0 can be obtained by subscribing and posting to the Help for both Maven 1.0 and Maven 2.0 can be obtained by subscribing and posting to the
<a href="http://maven.apache.org/mail-lists.html">Maven Users List</a>. If you are posting about Maven 2.0, <a href="http://maven.apache.org/mail-lists.html">Maven Users List</a>
. If you are posting about Maven 2.0,
please make that clear in your email. please make that clear in your email.
</p> </p>
<p> <p>
You can also join us on IRC at You can also join us on IRC at
<code>irc.codehaus.org</code>on <code>irc.codehaus.org</code>
<code>#maven</code>. This is available both on
<code>#maven</code>
. This is available both
over over
<a href="irc://irc.codehaus.org/#maven">IRC</a>and <a href="irc://irc.codehaus.org/#maven">IRC</a>
<a href="http://irc.codehaus.org/">HTTP</a>for those behind firewalls (enter and
<code>#maven</code>in the <a href="http://irc.codehaus.org/">HTTP</a>
<i>Channel</i>box). for those behind firewalls (enter
<code>#maven</code>
in the
<i>Channel</i>
box).
</p> </p>
<p> <p>
Please remember that it is a preview release, so please be patient with features that are not yet implemented, Please remember that it is a preview release, so please be patient with features that are not yet implemented,

View File

@ -10,14 +10,17 @@
</p> </p>
<ul> <ul>
<li> <li>
<i>Project</i>- most static configuration occurs in <i>Project</i>
- most static configuration occurs in
<code>pom.xml</code> <code>pom.xml</code>
</li> </li>
<li> <li>
<i>Installation</i>- this is configuration added once for a Maven installation <i>Installation</i>
- this is configuration added once for a Maven installation
</li> </li>
<li> <li>
<i>User</i>- this is configuration specific to a particular user <i>User</i>
- this is configuration specific to a particular user
</li> </li>
</ul> </ul>
<p> <p>
@ -25,18 +28,24 @@
building it, while the others both define settings for the current environment. building it, while the others both define settings for the current environment.
</p> </p>
<p> <p>
<b>Note:</b>the installation and user configuration can not be used to add shared project information - <b>Note:</b>
the installation and user configuration can not be used to add shared project information -
for example setting for example setting
<code>&lt;organization&gt;</code>or <code>&lt;organization&gt;</code>
<code>&lt;distributionManagement&gt;</code>company-wide. or
<code>&lt;distributionManagement&gt;</code>
company-wide.
For this, you should have your projects inherit from a company-wide parent For this, you should have your projects inherit from a company-wide parent
<code>pom.xml</code>. <code>pom.xml</code>
.
<!-- TODO: versioning doc that discusses this --> <!-- TODO: versioning doc that discusses this -->
</p> </p>
<p> <p>
You can specify your user configuration in You can specify your user configuration in
<code>${user.home}/.m2/settings.xml</code>. A <code>${user.home}/.m2/settings.xml</code>
<a href="maven-settings/settings.html">full reference</a>to the . A
<a href="maven-settings/settings.html">full reference</a>
to the
configuration file is available. This section will show how to make some common configurations. configuration file is available. This section will show how to make some common configurations.
Note that the file is not required - defaults will be used if it is not found. Note that the file is not required - defaults will be used if it is not found.
</p> </p>
@ -58,16 +67,19 @@
<h4>Configuring a Proxy</h4> <h4>Configuring a Proxy</h4>
<p> <p>
You can configure a proxy to use for some or all of your HTTP requests in Maven 2.0. The username and You can configure a proxy to use for some or all of your HTTP requests in Maven 2.0. The username and
password are only required if your proxy requires basic authentication (note that later alphas will support password are only required if your proxy requires basic authentication (note that later releases may support
storing your passwords in a secured keystore - in the mean time, please ensure your storing your passwords in a secured keystore - in the mean time, please ensure your
<code>settings.xml</code> <code>settings.xml</code>
file is secured with permissions appropriate for your operating system). file is secured with permissions appropriate for your operating system).
</p> </p>
<p> <p>
The The
<code>nonProxyHosts</code>setting accepts wild cards, and each host not to proxy is separated by the <code>nonProxyHosts</code>
<code>|</code>character. This matches the setting accepts wild cards, and each host not to proxy is separated by the
<a href="http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html">JDK configuration</a>equivalent. <code>|</code>
character. This matches the
<a href="http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html">JDK configuration</a>
equivalent.
</p> </p>
<source><![CDATA[ <source><![CDATA[
<settings> <settings>
@ -89,16 +101,19 @@
<h4>Security and Deployment Settings</h4> <h4>Security and Deployment Settings</h4>
<p> <p>
Repositories to deploy to are defined in a project in the Repositories to deploy to are defined in a project in the
<code>&lt;distributionManagement&gt;</code>section. <code>&lt;distributionManagement&gt;</code>
section.
However, you cannot put your username, password, or other security settings in that project. For that reason, However, you cannot put your username, password, or other security settings in that project. For that reason,
you should add a server definition to your own settings with an you should add a server definition to your own settings with an
<code>id</code>that matches that of the <code>id</code>
that matches that of the
deployment repository in the project. deployment repository in the project.
</p> </p>
<p> <p>
In addition, some repositories may require authorisation to download from, so the corresponding settings can In addition, some repositories may require authorisation to download from, so the corresponding settings can
be specified in a be specified in a
<code>server</code>element in the same way. <code>server</code>
element in the same way.
</p> </p>
<p> <p>
Which settings are required will depend on the type of repository you are deploying to. As of the first release, Which settings are required will depend on the type of repository you are deploying to. As of the first release,
@ -140,12 +155,16 @@
<p> <p>
To configure a mirror of a given repository, you provide it in your settings file, giving the new repository To configure a mirror of a given repository, you provide it in your settings file, giving the new repository
it's own it's own
<code>id</code>and <code>id</code>
<code>url</code>, and specify the and
<code>mirrorOf</code>setting that is the ID of <code>url</code>
, and specify the
<code>mirrorOf</code>
setting that is the ID of
the repository you are using a mirror of. For example, the ID of the main Maven repository included by default the repository you are using a mirror of. For example, the ID of the main Maven repository included by default
is is
<code>central</code>, so to use an Australian mirror, you would configure the following: <code>central</code>
, so to use an Australian mirror, you would configure the following:
</p> </p>
<source><![CDATA[ <source><![CDATA[
<settings> <settings>
@ -162,7 +181,8 @@
. .
.]]></source> .]]></source>
<p> <p>
<i>Please note:</i>this particular is not actually set up for Maven 2 yet, so this should be treated as an <i>Please note:</i>
this particular is not actually set up for Maven 2 yet, so this should be treated as an
example only. example only.
</p> </p>
</section> </section>

View File

@ -2,7 +2,7 @@
<properties> <properties>
<title>Dependency Mechanism</title> <title>Dependency Mechanism</title>
<author email="brett@apache.org">Brett Porter</author> <author email="brett@apache.org">Brett Porter</author>
<author email="trygvis@apache.org">Trygve Laugstol </author> <author email="trygvis@apache.org">Trygve Laugstol</author>
</properties> </properties>
<body> <body>
<section name="Dependency Mechanism"> <section name="Dependency Mechanism">
@ -57,11 +57,6 @@
of the build. This is described in more detail below. of the build. This is described in more detail below.
</li> </li>
</ul> </ul>
<p>
More features are planned, such as different mediation techniques and conflict management as well as
reporting,
in later alpha versions of Maven 2.0.
</p>
</subsection> </subsection>
<subsection name="Dependency Scope"> <subsection name="Dependency Scope">
<a name="dependency_scope"/> <a name="dependency_scope"/>
@ -270,7 +265,8 @@
</p> </p>
<p> <p>
The reference information about the dependency management tags is available from the The reference information about the dependency management tags is available from the
<a href="maven-model/maven.html#class_DependencyManagement">project descriptor reference</a>. <a href="maven-model/maven.html#class_DependencyManagement">project descriptor reference</a>
.
</p> </p>
</subsection> </subsection>
</section> </section>

View File

@ -4,7 +4,7 @@
<author email="brett@apache.org">Brett Porter</author> <author email="brett@apache.org">Brett Porter</author>
</properties> </properties>
<body> <body>
<section name="Download Maven 2.0 Alpha 3 Technology Preview"> <section name="Download Maven 2.0 Beta 1">
<p> <p>
Maven is distributed in several formats for your convenience. Maven is distributed in several formats for your convenience.
</p> </p>
@ -13,42 +13,52 @@
hours to reach all mirrors. hours to reach all mirrors.
</p> </p>
<p> <p>
<b>IMPORTANT:</b> Some plugins built for alpha-2 will not work with alpha-3. If you are experiencing <b>IMPORTANT:</b>
Some plugins built for alpha-3 will not work with beta-1. If you are experiencing
"plugin not found" or other messages, please try running the command with -U first to ensure you have the "plugin not found" or other messages, please try running the command with -U first to ensure you have the
latest version. latest version.
</p> </p>
<ul> <ul>
<li> <li>
<a href="http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-2.0-alpha-3-bin.tar.bz2"> <a href="http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-2.0-beta-1-bin.tar.bz2">
<code>.tar.bz2</code>archive <code>.tar.bz2</code>
archive
</a> </a>
<span style="font-size: smaller"> <span style="font-size: smaller">
( (
<a href="http://www.apache.org/dist/maven/binaries/maven-2.0-alpha-3-bin.tar.bz2.md5">checksum</a>) <a href="http://www.apache.org/dist/maven/binaries/maven-2.0-beta-1-bin.tar.bz2.md5">checksum</a>
)
( (
<a href="http://www.apache.org/dist/maven/binaries/maven-2.0-alpha-3-bin.tar.bz2.asc">PGP</a>) <a href="http://www.apache.org/dist/maven/binaries/maven-2.0-beta-1-bin.tar.bz2.asc">PGP</a>
)
</span> </span>
</li> </li>
<li> <li>
<a href="http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-2.0-alpha-3-bin.tar.gz"> <a href="http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-2.0-beta-1-bin.tar.gz">
<code>.tar.gz</code>archive <code>.tar.gz</code>
archive
</a> </a>
<span style="font-size: smaller"> <span style="font-size: smaller">
( (
<a href="http://www.apache.org/dist/maven/binaries/maven-2.0-alpha-3-bin.tar.gz.md5">checksum</a>) <a href="http://www.apache.org/dist/maven/binaries/maven-2.0-beta-1-bin.tar.gz.md5">checksum</a>
)
( (
<a href="http://www.apache.org/dist/maven/binaries/maven-2.0-alpha-3-bin.tar.gz.asc">PGP</a>) <a href="http://www.apache.org/dist/maven/binaries/maven-2.0-beta-1-bin.tar.gz.asc">PGP</a>
)
</span> </span>
</li> </li>
<li> <li>
<a href="http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-2.0-alpha-3-bin.zip"> <a href="http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-2.0-beta-1-bin.zip">
<code>.zip</code>archive <code>.zip</code>
archive
</a> </a>
<span style="font-size: smaller"> <span style="font-size: smaller">
( (
<a href="http://www.apache.org/dist/maven/binaries/maven-2.0-alpha-3-bin.zip.md5">checksum</a>) <a href="http://www.apache.org/dist/maven/binaries/maven-2.0-beta-1-bin.zip.md5">checksum</a>
)
( (
<a href="http://www.apache.org/dist/maven/binaries/maven-2.0-alpha-3-bin.zip.asc">PGP</a>) <a href="http://www.apache.org/dist/maven/binaries/maven-2.0-beta-1-bin.zip.asc">PGP</a>
)
</span> </span>
</li> </li>
</ul> </ul>
@ -57,28 +67,34 @@
Also available is a distribution suitable for use with Ant to use Maven 2.0's dependency Also available is a distribution suitable for use with Ant to use Maven 2.0's dependency
management (including transitive dependencies), repository and artifact deployment support. management (including transitive dependencies), repository and artifact deployment support.
See See
<a href="ant-tasks.html">Ant Tasks</a>for more information and installation instructions. <a href="ant-tasks.html">Ant Tasks</a>
for more information and installation instructions.
</p> </p>
<ul> <ul>
<li> <li>
<a href="http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-artifact-ant-2.0-alpha-3-dep.jar"> <a href="http://www.apache.org/dyn/closer.cgi/maven/binaries/maven-artifact-ant-2.0-beta-1-dep.jar">
<code>.jar</code>archive <code>.jar</code>
archive
</a> </a>
<span style="font-size: smaller"> <span style="font-size: smaller">
( (
<a href="http://www.apache.org/dist/maven/binaries/maven-artifact-ant-2.0-alpha-3-dep.jar.md5">checksum</a>) <a href="http://www.apache.org/dist/maven/binaries/maven-artifact-ant-2.0-beta-1-dep.jar.md5">checksum</a>
)
( (
<a href="http://www.apache.org/dist/maven/binaries/maven-artifact-ant-2.0-alpha-3-dep.jar.asc">PGP</a>) <a href="http://www.apache.org/dist/maven/binaries/maven-artifact-ant-2.0-beta-1-dep.jar.asc">PGP</a>
)
</span> </span>
</li> </li>
</ul> </ul>
<p> <p>
Maven 2.0 is distributed under the Maven 2.0 is distributed under the
<a href="http://maven.apache.org/license.html">Apache License, version 2.0</a>. <a href="http://maven.apache.org/license.html">Apache License, version 2.0</a>
.
</p> </p>
<p> <p>
The Ant tasks contain the JCraft Jsch library for deployment via SSH. For more information, see their The Ant tasks contain the JCraft Jsch library for deployment via SSH. For more information, see their
<a href="http://www.jcraft.com/jsch/LICENSE.txt">License and Copyright notice</a>. <a href="http://www.jcraft.com/jsch/LICENSE.txt">License and Copyright notice</a>
.
</p> </p>
<a name="requirements"/> <a name="requirements"/>
<subsection name="System Requirements"> <subsection name="System Requirements">
@ -115,27 +131,31 @@
<ol> <ol>
<li> <li>
Unzip Unzip
<code>maven-2.0-alpha-3-bin.zip</code>to the directory you wish to install Maven 2.0. These instructions <code>maven-2.0-beta-1-bin.zip</code>
to the directory you wish to install Maven 2.0. These instructions
assume you chose assume you chose
<code>C:\Program Files\Apache Software Foundation\maven-2.0-alpha-3</code> <code>C:\Program Files\Apache Software Foundation\maven-2.0-beta-1</code>
</li> </li>
<li> <li>
Add the Add the
<code>bin</code>directory to your path, by opening up the system properties (WinKey + Pause), <code>bin</code>
directory to your path, by opening up the system properties (WinKey + Pause),
selecting the "Advanced" tab, and the "Environment Variables" button, then editing the selecting the "Advanced" tab, and the "Environment Variables" button, then editing the
<code>PATH</code> <code>PATH</code>
variable in the user variables. variable in the user variables.
eg. eg.
<code>"C:\Program Files\Apache Software Foundation\maven-2.0-alpha-3\bin";%PATH%</code> <code>"C:\Program Files\Apache Software Foundation\maven-2.0-beta-1\bin";%PATH%</code>
</li> </li>
<li> <li>
In the same dialog, make sure that In the same dialog, make sure that
<code>JAVA_HOME</code>is set to the location of your JDK, eg. <code>JAVA_HOME</code>
is set to the location of your JDK, eg.
<code>C:\Program Files\Java\jdk1.5.0_02</code> <code>C:\Program Files\Java\jdk1.5.0_02</code>
</li> </li>
<li> <li>
Run Run
<code>m2 --version</code>to verify that it is correctly installed. <code>m2 --version</code>
to verify that it is correctly installed.
</li> </li>
</ol> </ol>
<p style="font-weight: bold; font-size: larger"> <p style="font-weight: bold; font-size: larger">
@ -145,23 +165,27 @@
<li> <li>
Extract the distribution archive to the directory you wish to install Maven 2.0. These instructions Extract the distribution archive to the directory you wish to install Maven 2.0. These instructions
assume you chose assume you chose
<code>/usr/local/maven-2.0-alpha-3</code>. The directory <code>/usr/local/maven-2.0-beta-1</code>
<code>maven-2.0-alpha-3</code> . The directory
<code>maven-2.0-beta-1</code>
will be created from the archive. will be created from the archive.
</li> </li>
<li> <li>
Add the Add the
<code>bin</code>directory to your path, eg. <code>bin</code>
<code>export PATH=/usr/local/maven-2.0-alpha-3/bin:$PATH</code> directory to your path, eg.
<code>export PATH=/usr/local/maven-2.0-beta-1/bin:$PATH</code>
</li> </li>
<li> <li>
Make sure that Make sure that
<code>JAVA_HOME</code>is set to the location of your JDK, eg. <code>JAVA_HOME</code>
is set to the location of your JDK, eg.
<code>export JAVA_HOME=/usr/java/jdk1.5.0_02</code> <code>export JAVA_HOME=/usr/java/jdk1.5.0_02</code>
</li> </li>
<li> <li>
Run Run
<code>m2 --version</code>to verify that it is correctly installed. <code>m2 --version</code>
to verify that it is correctly installed.
</li> </li>
</ol> </ol>
</subsection> </subsection>

View File

@ -8,11 +8,13 @@
<p> <p>
This section will help you create a trivial project, and build it, and should provide enough information This section will help you create a trivial project, and build it, and should provide enough information
to build any project that requires Maven 2.0. It assumed that you have already to build any project that requires Maven 2.0. It assumed that you have already
<a href="download.html">Downloaded and Installed</a> a Maven 2.0 release. <a href="download.html">Downloaded and Installed</a>
a Maven 2.0 release.
</p> </p>
<p> <p>
If you are behind a proxy, make sure that you've read If you are behind a proxy, make sure that you've read
<a href="configuration.html">Configuring Maven</a> first <a href="configuration.html">Configuring Maven</a>
first
for instructions on how to configure your proxy. for instructions on how to configure your proxy.
</p> </p>
<subsection name="Creating a Project Skeleton"> <subsection name="Creating a Project Skeleton">
@ -22,7 +24,8 @@
<source>m2 archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app</source> <source>m2 archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app</source>
<p> <p>
This command has created a layout according the the conventions laid out This command has created a layout according the the conventions laid out
<a href="http://maven.apache.org/reference/conventions.html">here</a>. <a href="http://maven.apache.org/reference/conventions.html">here</a>
.
</p> </p>
<!-- TODO <!-- TODO
<p> <p>
@ -31,7 +34,8 @@
--> -->
<p> <p>
The file The file
<code>pom.xml</code> is the Maven 2.0 project descriptor. <code>pom.xml</code>
is the Maven 2.0 project descriptor.
</p> </p>
<source><![CDATA[ <source><![CDATA[
<project> <project>
@ -51,14 +55,17 @@
</project>]]></source> </project>]]></source>
<p> <p>
You can get a full reference to the You can get a full reference to the
<a href="maven-model/maven.html">project descriptor</a> to see what other <a href="maven-model/maven.html">project descriptor</a>
to see what other
elements are available. elements are available.
</p> </p>
<p> <p>
You'll notice there is a You'll notice there is a
<code>src/main/java</code> directory containing a simple source file to compile, <code>src/main/java</code>
directory containing a simple source file to compile,
and a and a
<code>src/test/java</code> directory containing a trivial unit test. <code>src/test/java</code>
directory containing a trivial unit test.
</p> </p>
<p> <p>
Let's now change into the project's directory and try a few things... Let's now change into the project's directory and try a few things...
@ -71,23 +78,30 @@
</p> </p>
<ul> <ul>
<li> <li>
<code>generate-sources</code> - perform any source generation <code>generate-sources</code>
- perform any source generation
</li> </li>
<li> <li>
<code>compile</code> - compile the sources in <code>compile</code>
<code>src/main/java</code> as well as any generated source - compile the sources in
<code>src/main/java</code>
as well as any generated source
</li> </li>
<li> <li>
<code>test</code> - compile and run the unit tests <code>test</code>
- compile and run the unit tests
</li> </li>
<li> <li>
<code>package</code> - package the source code into an archive (primarily a JAR) <code>package</code>
- package the source code into an archive (primarily a JAR)
</li> </li>
<li> <li>
<code>install</code> - install the package in the local repository for use with other projects <code>install</code>
- install the package in the local repository for use with other projects
</li> </li>
<li> <li>
<code>deploy</code> - deploy the package to the remote repository <code>deploy</code>
- deploy the package to the remote repository
</li> </li>
</ul> </ul>
<p> <p>
@ -95,16 +109,26 @@
</p> </p>
<source>m2 install</source> <source>m2 install</source>
<p> <p>
<b>Note:</b> if you are using the project you generated in the first step, make sure you are running this <b>Note:</b>
command from inside the directory it created, where <code>pom.xml</code> resides. if you are using the project you generated in the first step, make sure you are running this
command from inside the directory it created, where
<code>pom.xml</code>
resides.
</p> </p>
<p> <p>
This will do all of the steps - generating sources, compiling, copying resources, packaging and finally installing. This will do all of the steps - generating sources, compiling, copying resources, packaging and finally
installing.
</p> </p>
<p> <p>
If you try that, you'll see that the file is copied to a directory under <code>~/.m2/repository</code>. If you try that, you'll see that the file is copied to a directory under
This is also where all those downloaded files go - it is called your <i>local repository</i>. <code>~/.m2/repository</code>
The location is configurable - see <a href="configuration.html">Configuration</a> for more information. .
This is also where all those downloaded files go - it is called your
<i>local repository</i>
.
The location is configurable - see
<a href="configuration.html">Configuration</a>
for more information.
</p> </p>
<!-- TODO <!-- TODO
<p> <p>
@ -116,7 +140,9 @@
</p> </p>
<source>m2 clean:clean install</source> <source>m2 clean:clean install</source>
<p> <p>
This will remove the <code>target</code> directory with all the build data before starting so that it is This will remove the
<code>target</code>
directory with all the build data before starting so that it is
fresh. fresh.
</p> </p>
<p> <p>
@ -124,15 +150,20 @@
</p> </p>
<source>m2 idea:idea</source> <source>m2 idea:idea</source>
<p> <p>
This can be run over the top of a previous IDEA project - it will update the settings rather than starting fresh. This can be run over the top of a previous IDEA project - it will update the settings rather than starting
fresh.
</p> </p>
<p> <p>
<b>Note:</b> some familiar goals from Maven 1.0 are still there - such as <b>Note:</b>
<code>jar:jar</code>, but they might some familiar goals from Maven 1.0 are still there - such as
<code>jar:jar</code>
, but they might
not behave like you'd expect. Presently, not behave like you'd expect. Presently,
<code>jar:jar</code> will not recompile sources - it will simply just <code>jar:jar</code>
will not recompile sources - it will simply just
create a JAR from the create a JAR from the
<code>target/classes</code> directory, under the assumption everything else had already <code>target/classes</code>
directory, under the assumption everything else had already
been done. been done.
</p> </p>
</subsection> </subsection>
@ -140,8 +171,14 @@
<subsection name="Configuring Plugins"> <subsection name="Configuring Plugins">
<p> <p>
What if you would like to customise whether a plugins is enabled, or how a plugin operates? What if you would like to customise whether a plugins is enabled, or how a plugin operates?
In Maven 1.0, you would have added some <code>preGoal</code> to <code>maven.xml</code> and some In Maven 1.0, you would have added some
entries to <code>project.properties</code>. Here, it is a little different. <code>preGoal</code>
to
<code>maven.xml</code>
and some
entries to
<code>project.properties</code>
. Here, it is a little different.
</p> </p>
<p> <p>
For this example, we will configure the Java compiler to allow JDK 5.0 sources. This is as simple as For this example, we will configure the Java compiler to allow JDK 5.0 sources. This is as simple as
@ -169,7 +206,9 @@
(the default is to use the latest available). (the default is to use the latest available).
</p> </p>
<p> <p>
The <code>configuration</code> element applies the given parameters to every goal from the compiler plugin. The
<code>configuration</code>
element applies the given parameters to every goal from the compiler plugin.
It is possible to change a parameter just for an individual goal as well - for example, to change the It is possible to change a parameter just for an individual goal as well - for example, to change the
debug flag for test sources: debug flag for test sources:
</p> </p>
@ -190,21 +229,24 @@
. .
.]]></source> .]]></source>
<p> <p>
To find out what configuration is available for a plugin, you can see the <a href="plugins/">Plugins List</a> To find out what configuration is available for a plugin, you can see the
<a href="plugins/">Plugins List</a>
and navigate to the plugin and goal you are using. and navigate to the plugin and goal you are using.
</p> </p>
</subsection> </subsection>
<subsection name="Other Project Types"> <subsection name="Other Project Types">
<p> <p>
Note that the lifecycle applies to any project type. For example, back in the base direcotry we can create a simple web application: Note that the lifecycle applies to any project type. For example, back in the base direcotry we can create a
simple web application:
</p> </p>
<source> <source>
m2 archetype:create \ m2 archetype:create \
-DgroupId=com.mycompany.app -DartifactId=my-webapp \ -DgroupId=com.mycompany.app -DartifactId=my-webapp \
-DarchetypeArtifactId=maven-archetype-webapp</source> -DarchetypeArtifactId=maven-archetype-webapp</source>
<p> <p>
Note that these must all be on a single line. This will create a directory Note that these must all be on a single line. This will create a directory
<code>my-webapp</code> and the following <code>my-webapp</code>
and the following
project descriptor: project descriptor:
</p> </p>
<source><![CDATA[<project> <source><![CDATA[<project>
@ -227,12 +269,14 @@ m2 archetype:create \
</project>]]></source> </project>]]></source>
<p> <p>
Note the Note the
<code>&lt;packaging&gt;</code> element - this tells Maven to build as a WAR. Change into the webapp project's directory and try: <code>&lt;packaging&gt;</code>
element - this tells Maven to build as a WAR. Change into the webapp project's directory and try:
</p> </p>
<source>m2 clean:clean package</source> <source>m2 clean:clean package</source>
<p> <p>
You'll see You'll see
<code>target/my-webapp.war</code> is built, and that all the normal steps were executed. <code>target/my-webapp.war</code>
is built, and that all the normal steps were executed.
</p> </p>
</subsection> </subsection>
<subsection name="Multiple Modules"> <subsection name="Multiple Modules">
@ -242,14 +286,15 @@ m2 archetype:create \
</p> </p>
<p> <p>
Firstly, we need to add a parent Firstly, we need to add a parent
<code>pom.xml</code> file in the directory above the other two, so it should look like this: <code>pom.xml</code>
file in the directory above the other two, so it should look like this:
</p> </p>
<source> <source>
+- pom.xml +- pom.xml
+- my-app +- my-app
| +- pom.xml | +- pom.xml
+- my-webapp +- my-webapp
| +- pom.xml | +- pom.xml
</source> </source>
<p> <p>
The POM file you'll create should contain the following: The POM file you'll create should contain the following:
@ -267,7 +312,8 @@ m2 archetype:create \
</project>]]></source> </project>]]></source>
<p> <p>
We'll need a dependency on the JAR from the webapp, so add this to We'll need a dependency on the JAR from the webapp, so add this to
<code>my-webapp/pom.xml</code>: <code>my-webapp/pom.xml</code>
:
</p> </p>
<source><![CDATA[ <source><![CDATA[
. .
@ -284,8 +330,10 @@ m2 archetype:create \
.]]></source> .]]></source>
<p> <p>
Finally, add the following Finally, add the following
<code>&lt;parent&gt;</code> element to both of the other <code>&lt;parent&gt;</code>
<code>pom.xml</code> files element to both of the other
<code>pom.xml</code>
files
in the subdirectories: in the subdirectories:
</p> </p>
<source><![CDATA[<project> <source><![CDATA[<project>
@ -302,13 +350,16 @@ m2 archetype:create \
</p> </p>
<source>m2 clean:clean install</source> <source>m2 clean:clean install</source>
<p> <p>
<b>Note: </b> If you didn't remove the <b>Note:</b>
<code>warName</code> plugin configuration, this will have If you didn't remove the
<code>warName</code>
plugin configuration, this will have
failed due to a bug. Please remove that section, and try again. failed due to a bug. Please remove that section, and try again.
</p> </p>
<p> <p>
The WAR has now been created in The WAR has now been created in
<code>my-webapp/target/my-webapp.war</code>, and the JAR is <code>my-webapp/target/my-webapp.war</code>
, and the JAR is
included: included:
</p> </p>
<source>$ jar tvf my-webapp/target/my-webapp-1.0-SNAPSHOT.war <source>$ jar tvf my-webapp/target/my-webapp-1.0-SNAPSHOT.war
@ -326,39 +377,47 @@ m2 archetype:create \
2713 Fri Jun 24 10:59:56 EST 2005 WEB-INF/lib/my-app-1.0-SNAPSHOT.jar</source> 2713 Fri Jun 24 10:59:56 EST 2005 WEB-INF/lib/my-app-1.0-SNAPSHOT.jar</source>
<p> <p>
How does this work? Firstly, the parent POM created (called How does this work? Firstly, the parent POM created (called
<code>app</code>), has a packaging of <code>app</code>
), has a packaging of
<code>pom</code> <code>pom</code>
and a list of modules defined. This tells Maven to run all operations over the set of projects instead of and a list of modules defined. This tells Maven to run all operations over the set of projects instead of
just the current one (to override this behaviour, you can use the just the current one (to override this behaviour, you can use the
<code>--non-recursive</code> command line <code>--non-recursive</code>
command line
option). option).
</p> </p>
<p> <p>
Next, we tell the WAR that it requires the Next, we tell the WAR that it requires the
<code>my-app</code> JAR. This does a few things: it makes it available <code>my-app</code>
JAR. This does a few things: it makes it available
on the classpath to any code in the WAR (none in this case), it makes sure the JAR is always built before the on the classpath to any code in the WAR (none in this case), it makes sure the JAR is always built before the
WAR, and it indicates to the WAR plugin to include the JAR in it's library directory. WAR, and it indicates to the WAR plugin to include the JAR in it's library directory.
</p> </p>
<p> <p>
You may have noticed that You may have noticed that
<code>junit-3.8.1.jar</code> was a dependency, but didn't end up in the WAR. The <code>junit-3.8.1.jar</code>
was a dependency, but didn't end up in the WAR. The
reason for this is the reason for this is the
<code>&lt;scope&gt;test&lt;/scope&gt;</code> element - it is only required for testing, <code>&lt;scope&gt;test&lt;/scope&gt;</code>
element - it is only required for testing,
and so is not included in the web application as the compile time dependency and so is not included in the web application as the compile time dependency
<code>my-app</code> is. <code>my-app</code>
is.
</p> </p>
<p> <p>
The final step was to include a parent definition. This is different to the The final step was to include a parent definition. This is different to the
<code>extend</code> element you <code>extend</code>
element you
may be familiar with from Maven 1.0: this ensures that the POM can always be located even if the project may be familiar with from Maven 1.0: this ensures that the POM can always be located even if the project
is distributed separately from its parent by looking it up in the repository. is distributed separately from its parent by looking it up in the repository.
</p> </p>
<p> <p>
Like Maven 1.0, as of the current Maven release ( Unlike Maven 1.0, it is not required that you run
<code>2.0-alpha-3</code>), it is required that you run <code>install</code>
<code>install</code> to successfully perform these steps. If you run to successfully perform these steps - you can run
<code>package</code>, the JAR will not be <code>package</code>
copied to the local repository and Maven will not be able to find it. This will be improved in future versions. on its own
and the artifacts in the reactor will be used from the target directories instead of the local repository.
</p> </p>
<p> <p>
You might like to generate you IDEA workspace again from the top level directory... You might like to generate you IDEA workspace again from the top level directory...
@ -373,11 +432,13 @@ m2 archetype:create \
<p> <p>
If you'd like to know more about general Maven concepts, in association with how the current stable release, If you'd like to know more about general Maven concepts, in association with how the current stable release,
Maven 1.0, works, see the Maven 1.0, works, see the
<a href="http://maven.apache.org">Maven website</a>. <a href="http://maven.apache.org">Maven website</a>
.
</p> </p>
<p> <p>
For more information on Maven 2.0, you can consult the For more information on Maven 2.0, you can consult the
<a href="plugins/index.html">list of available plugins</a>, <a href="plugins/index.html">list of available plugins</a>
,
or the other documentation on this site. or the other documentation on this site.
</p> </p>
</subsection> </subsection>

View File

@ -12,8 +12,9 @@
<a href="download.html"> <a href="download.html">
<img valign="top" src="http://maven.apache.org/images/folder-open.gif" border="0" alt="" title="download"/> <img valign="top" src="http://maven.apache.org/images/folder-open.gif" border="0" alt="" title="download"/>
Download Download
</a> Maven 2.0 Alpha 3 </a>
<small>(1.2Mb)</small> Maven 2.0 Beta 1
<small>(1.1Mb)</small>
<br/> <br/>
</p> </p>
<ul> <ul>
@ -37,7 +38,7 @@
</p> </p>
<p> <p>
Maven 2.0 is a rewrite of the popular Maven application to achieve a number of goals, and to provide a stable Maven 2.0 is a rewrite of the popular Maven application to achieve a number of goals, and to provide a stable
basis to take it into the future. It is currently available as a Technology Preview. basis to take it into the future. It is currently available for beta testing.
</p> </p>
<ul> <ul>
<li> <li>
@ -47,7 +48,8 @@
</li> </li>
<li> <li>
<i>What are the <i>What are the
<a href="about.html#features">features of Maven 2.0</a>? <a href="about.html#features">features of Maven 2.0</a>
?
</i> </i>
</li> </li>
<li> <li>
@ -57,22 +59,26 @@
</li> </li>
<li> <li>
<i>What does <i>What does
<a href="about.html#tech-preview">Technology Preview</a> mean? <a href="about.html#tech-preview">beta testing</a>
mean?
</i> </i>
</li> </li>
<li> <li>
<i>How often will Maven 2.0 be <i>How often will Maven 2.0 be
<a href="about.html#release-schedule">released</a>? <a href="about.html#release-schedule">released</a>
?
</i> </i>
</li> </li>
<li> <li>
<i>Can I <i>Can I
<a href="about.html#get-involved">get involved</a>? <a href="about.html#get-involved">get involved</a>
?
</i> </i>
</li> </li>
<li> <li>
<i>Where do I <i>Where do I
<a href="about.html#get-help">get help</a> with Maven 2.0? <a href="about.html#get-help">get help</a>
with Maven 2.0?
</i> </i>
</li> </li>
</ul> </ul>
@ -96,12 +102,14 @@
</li> </li>
<li> <li>
<i> <i>
<a href="maven1.html#m1-future">What will happen</a> to Maven 1.0? <a href="maven1.html#m1-future">What will happen</a>
to Maven 1.0?
</i> </i>
</li> </li>
<li> <li>
<i>Will my <i>Will my
<a href="maven1.html#m1-plugins">Maven 1.0 plugins</a> be supported? <a href="maven1.html#m1-plugins">Maven 1.0 plugins</a>
be supported?
</i> </i>
</li> </li>
</ul> </ul>
@ -146,8 +154,10 @@
</li> </li>
</ul> </ul>
<p> <p>
<b>More coming soon - </b> we will continue to flesh out the documentation, so stay tuned, and join the <b>More coming soon -</b>
<a href="/mail-lists.html">user's mailing list</a> if you have any questions. we will continue to flesh out the documentation, so stay tuned, and join the
<a href="/mail-lists.html">user's mailing list</a>
if you have any questions.
</p> </p>
<subsection name="Developing Maven 2"> <subsection name="Developing Maven 2">
<p> <p>
@ -159,21 +169,26 @@
<ul> <ul>
<li> <li>
<i>How can I <i>How can I
<a href="about.html#get-involved">get involved</a>? <a href="about.html#get-involved">get involved</a>
?
</i> </i>
</li> </li>
<li> <li>
<i>What <i>What
<a href="docs-required.html">documentation is needed</a>? <a href="docs-required.html">documentation is needed</a>
?
</i> </i>
</li> </li>
<li> <li>
<i>How do I <i>How do I
<a href="/developers/building.html">build Maven 2.0</a>? <a href="/developers/building.html">build Maven 2.0</a>
?
</i> </i>
</li> </li>
<li> <li>
<i>Draft <a href="http://docs.codehaus.org/display/MAVEN/Home">design documents</a> are in <i>Draft
<a href="http://docs.codehaus.org/display/MAVEN/Home">design documents</a>
are in
Confluence, until they are implemented and added to the developers section. Confluence, until they are implemented and added to the developers section.
</i> </i>
</li> </li>