Fornax-Platform View a printable version of the current page. Export Page as PDF
  3 Maven2
 
 Browse Space
General


Projects


Latest News
Latest News
(The 15 most recent blogposts in space Fornax-Platform.)


Global Reports
Find all pages that arent linked from anywhere.
Find all undefined pages.
Feed for new pages.
Added by Thorsten Kamann, last edited by Karsten Thoms on Jan 24, 2011  (view change)

Labels:

maven maven Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

Maven2 

We are using Maven2 as buildmanagement tool. So we can reuse the poweful dependency and project management. The concept Convention over Configuration offers the using of defaults instead configuring every thing like Ant.

Setting up your system

  1. Download the current release from the official download site
  2. Extract the archive
  3. Add an environment variable MVN_HOME pointing to the folder the download archive was extracted to
  4. Extend you environment variable PATH with %MVN_HOME%\bin for Windows or $MVN_HOME/bin for Linux/Mac OS X
  5. Open a shell (or command prompt) and type mvn -v. You should get
    Apache Maven 3.0
    
  6. Your system is set up properly.

Setting up Eclipse

  1. Install all nessesary plugins (see 1 Eclipse-Plugins)
  2. Configure the Fornax SVN-Repository inside Eclipse (see 2 Subversion)
  3. Check out the project maven-launcher from https://fornax.svn.sourceforge.net/svnroot/fornax/trunk/maven-launcher/
  4. Add a runtime variable in Eclipse:
    Window->Preferences->Run/Debug->String Substitution
  5. Now you are done. If you open the External Launchers Dialog you see all available launchers

How to use the provided Launch-Configurations

The Launch-Configurations provided by the checked out project maven-launcher are the most common used goals for the development with the Fornax-Platform. If you need a special call you can use the launcher Fornax [mvn-commandline] you can enter all parameters you need. For this this launcher offers a textfield after launch:

Installing the Fornax profile

You must install the Fornax profile. This defines the repositories you want to use for dependency resolving. This is done in the $user.home/.m2/settings.xml. Merge the following snippet in your settings.xml. If you don't have a settings.xml you must create one.

<settings>
  <profiles>
    <profile>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
    <id>fornax</id>
    <repositories>
      <repository>
        <id>public.fornax-platform.org</id>
        <name>Fornax Public Repository</name>
        <url>http://fornax-platform.org/nexus/content/groups/public/</url>
        <releases>
          <enabled>true</enabled>
        </releases>
        <snapshots>
          <enabled>false</enabled>
        </snapshots>
      </repository>
      <repository>
        <id>snapshots.fornax-platform.org</id>
        <name>Fornax Snapshot Repository</name>
        <url>http://fornax-platform.org/nexus/content/repositories/snapshots/</url>
        <releases>
          <enabled>false</enabled>
        </releases>
        <snapshots>
          <enabled>true</enabled>
        </snapshots>
      </repository>
    </repositories>

    <pluginRepositories>
      <pluginRepository>
        <id>public.fornax-platform.org</id>
        <name>Fornax Public Repository</name>
        <url>http://fornax-platform.org/nexus/content/groups/public/</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
      </pluginRepository>
      <pluginRepository>
        <id>snapshots.fornax-platform.org</id>
        <name>Fornax Snapshot Repository</name>
        <url>http://fornax-platform.org/nexus/content/repositories/snapshots/</url>
        <releases>
          <enabled>false</enabled>
        </releases>
        <snapshots>
          <enabled>true</enabled>
        </snapshots>
      </pluginRepository>
    </pluginRepositories>
    </profile>
  </profiles>
</settings>

 For further information about the settings consult the settings guide by Maven2.

Creating a new project

Please refer the document Create new projects

Deploying new artifacts to the Fornax release repository

Sometimes it will be necessary to deploy 3rd party jars to the Fornax release repository. This is done using the Maven Deploy Plugin as follows:

 mvn deploy:deploy-file
     -DrepositoryId=releases.fornax-platform.org
     -Durl=http://fornax-platform.org/nexus/content/repositories/releases/
     -Dfile=/Users/thoms/.m2/repository/org/fitnesse/fitnesse/20090214/fitnesse-20090214.jar
     -DpomFile=/Users/thoms/.m2/repository/org/fitnesse/fitnesse/20090214/fitnesse-20090214.pom

Article Rating: 5.0 (2 voters)
2 3 4 5 6 7 8 9

I followed these steps to install maven2 into eclipse, and I can see
m2build item in External tools, but after clicking on it I get these
error message :
"Plug-in org.maven.ide.eclipse was unable to load class org.maven.ide.eclipse.launch.Maven2LaunchConfigurationTabGroup.
An error occurred while automatically activating bundle org.maven.ide.eclipse (691).
"
I can't get further, can somebosy help me?
thanks, Ondrej

Posted by Anonymous at Nov 25, 2007 17:12

Did you ever find a resolution to this issue?  I'm running into the same problem.

Posted by Anonymous at Mrz 20, 2008 22:15

9ppnvB <a href="http://svbddoaldgzz.com/">svbddoaldgzz</a>, [url=http://wqymkhsioroy.com/]wqymkhsioroy[/url], [link=http://vdhvyhxyrjfe.com/]vdhvyhxyrjfe[/link], http://itobitrulveu.com/

Posted by Anonymous at Mrz 10, 2011 14:44