You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Loïc Lefèvre <lo...@gmail.com> on 2005/06/27 23:44:46 UTC

About the Building Maven 2.0 webpage

Hello,
This week-end, I've tried to follow the indications to build maven 2.0
(http://maven.apache.org/maven2/building.html) and so here is my
feedback:

-----8<------------------------------------------------------------------------
"...
Why would I want to build Maven 2.0?
...
to fix a problem you are having and submit a patch to the developers team.
..."
----->8------------------------------------------------------------------------

Please can you add a link to the JIRA website? It can help to quickly
check the open issues on maven 2.

-----8<------------------------------------------------------------------------
"...
Checking out the sources
All of the source code for Maven 2.0 and its related libraries are in
Subversion.
..."
----->8------------------------------------------------------------------------

A link to the website of Subversion could be interesting here or at
least, explain that subversion is a tool such as CVS (for those who
don't know subversion).

Here, the code is checked out as written, everything is okay (see logs
subversion.zip).

Now the hard-to-understand-part-for-a-maven2-dummy-like-me!

-----8<------------------------------------------------------------------------
"...
Building Maven
Once you have checked out the code, change into the maven-components
directory that was created. You may want to setup a different
environment to install Maven to other than your normal installation of
a release, so set the M2_HOME environment variable accordingly, e.g.:

export M2_HOME=/usr/local/maven-2.0-SNAPSHOT
PATH=$M2_HOME/bin:$PATH
 or
set M2_HOME=c:\maven-2.0-SNAPSHOT
set PATH=%M2_HOME%\bin;$PATH
"
----->8------------------------------------------------------------------------

Here, a small mistake (the devil god of the copy/paste was here) =>

set PATH=%M2_HOME%\bin;%PATH%

-----8<------------------------------------------------------------------------
"
>From this, run the m2-bootstrap-all command for your system:

sh m2-bootstrap-all.sh
 or
m2-bootstrap-all.bat

First, the code will be built, then using the new installation the
plugins will be rebuilt and installed in the local repository.
Finally, a set of integration tests will run.

If you have any problems or get any failures during the run, please
report them to the Maven Developers List."
----->8------------------------------------------------------------------------

So I followed the indications and I get an error (see 1st-try.txt):

ERROR: M2_HOME is set to an invalid directory.
M2_HOME = L:\maven-2.0-SNAPSHOT
Please set the M2_HOME variable in your environment to match the
location of the Maven installation

Though the directory L:\maven-2.0-SNAPSHOT was created.

After numerous tries (add settings.xml in my home directory under
~/.m2, append the command line -Dmaven.repo.local=XXXX to the command
line...)
I've downloaded the alpha-3 release of m2 and extracted it into the
defined %M2_HOME% directory and only then the m2-bootstrap-all.bat
script worked
(see m2-bootstrap-all.zip)!

So please can you update this webpage and add more details? Thanks in advance!

Apart that I hope m2 a long life!

Loïc

####################################################################
ATTACHMENTS: since mailing list restrictions, I add the only useful
attachment as plain text
####################################################################
1st-try.txt:
####################################################################
L:\>cd maven-components

L:\maven-components>set M2_HOME=L:\maven-2.0-SNAPSHOT

L:\maven-components>set PATH=%M2_HOME%\bin;%PATH%

L:\maven-components>m2-bootstrap-all.bat
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
        1 fichier(s) copié(s).
You SHOULD have a ~/.m2/settings.xml file and must contain at least
the following information:

<settings>
  <localRepository>/path/to/your/repository</localRepository>
</settings>

Alternatively, you can specify -Dmaven.repo.local=/path/to/m2/repository

HOWEVER, since you did not specify a repository path, maven will use:
C:\Documents and Settings\Administrateur\.m2\repository
to store artifacts locally.
Maven installation directory: L:\maven-2.0-SNAPSHOT
The directory given to install Maven in already exists, but does not
contain a Maven installation

        L:\maven-2.0-SNAPSHOT

If you really mean to install Maven to this location, please delete
the directory first
Commande ECHO désactivée.
-----------------------------------------------------------------------
Rebuilding maven2 plugins
-----------------------------------------------------------------------

ERROR: M2_HOME is set to an invalid directory.
M2_HOME = L:\maven-2.0-SNAPSHOT
Please set the M2_HOME variable in your environment to match the
location of the Maven installation

Commande ECHO désactivée.
-----------------------------------------------------------------------
Rebuilding maven2 reports
-----------------------------------------------------------------------

ERROR: M2_HOME is set to an invalid directory.
M2_HOME = L:\maven-2.0-SNAPSHOT
Please set the M2_HOME variable in your environment to match the
location of the Maven installation

Commande ECHO désactivée.
-----------------------------------------------------------------------
Running integration tests
-----------------------------------------------------------------------
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/maven/it/Verifier
L:\maven-components>
####################################################################
m2-bootstrap-all.zip skipped (phew)
subversion.zip skipped (phew)

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