Difference between revisions of "Installation of maven"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
This explanation is for an Ubuntu | This explanation is for an Ubuntu 9.04 environment. If you use another distribution or version, some commands | ||
may slightly differ. | may slightly differ. | ||
* First download the maven binaries | * First download the maven binaries. Windows user should use the zip archive. | ||
<pre> | <pre> | ||
wget http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-2. | wget http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-2.2.1-bin.tar.gz | ||
</pre> | </pre> | ||
* Extract them to e.g /usr/local | * Extract them to e.g /usr/local or for win users c:\programme for example. | ||
<pre> | <pre> | ||
sudo tar xfvj apache-maven-2. | sudo tar xfvj apache-maven-2.2.1-bin.tar.gz -C /usr/local | ||
</pre> | </pre> | ||
* Then adept some environment variables in you preferred terminal. For the bash for example, edit ''~/.bashrc'' | * Then adept some environment variables in you preferred terminal. For the bash for example, edit ''~/.bashrc'' |
Revision as of 11:47, 21 September 2009
This explanation is for an Ubuntu 9.04 environment. If you use another distribution or version, some commands may slightly differ.
- First download the maven binaries. Windows user should use the zip archive.
wget http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-2.2.1-bin.tar.gz
- Extract them to e.g /usr/local or for win users c:\programme for example.
sudo tar xfvj apache-maven-2.2.1-bin.tar.gz -C /usr/local
- Then adept some environment variables in you preferred terminal. For the bash for example, edit ~/.bashrc
export MAVEN_OPTS="-Xmx1224m -Xms712m" export PATH=$PATH:<path_to_maven_install_dir>/bin
- Now try running maven with this command
mvn
- If the previous step was successful, point your browser to Archiva and create an account.
- If you want to contribute snapshot builds and releases to the project contact your local archiva administrator to grant you
- the needed rights.
- Create a file at ~/.m2/settings.xml with the following entries
<settings> <profiles> <profile> <id>mysettings</id> <properties> <!-- here you can set and override systemwide properties, valid in all projects --> </properties> </profile> </profiles> <activeProfiles> <!-- using a development environment --> <activeProfile>env-development</activeProfile> <!-- and jboss 4.0 --> <activeProfile>jboss42</activeProfile> <activeProfile>mysettings</activeProfile> </activeProfiles> <mirrors> <mirror> <id>archiva.default</id> <url>http://archiva.mpdl.mpg.de/archiva/repository/internal/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> <servers> <server> <id>deployment.webdav</id> <username>archiva_username</username> <password>archiva_password</password> </server> <server> <id>snapshots.webdav</id> <username>archiva_username</username> <password>archiva_password</password> </server> </servers> </settings>
- Checkout the project, e.g common_services
svn co https://zim02.gwdg.de/repos/common/trunk/common_services/
- Now pick a integration test module (e.g citationmanager_ear, pubman_logic_ear or faces_logic_ear) and type
mvn clean install
- This will download a jboss server for integration tests to your home folder.
- Now change into homefolder and do the following steps:
cd jboss mkdir server_eclipse cp jboss-<jboss-version> server_eclipse
- This will copy another jboss installation into server_eclipse, since it's not possible to have the same jboss installation for the integration tests and eclipse together.
- We will need that later if you want to use eclipse for developing.
You can now start developing. For the first try, why not trying to compile all the project modules? Go to the root of the working dir and type:
mvn clean compile
This should clean and compile all project modules.