Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Excerpt

Maven is a state-of-the-art Java build system replacing Ant.

Panel
Table of Contents
stylesquare

Children Display

Installation

Debian/Ubuntu

Use apt-get or similar

Windows

See the Maven installation guide

See SBForge parent pom site for details (select the relevant version).

IntelliJ

  • The Maven add-on needs to be installed. Verify this is the case under File -> Settings -> Plugins.
  • Set the M2_HOME environment variable to point to the Maven installation. either directly in IntelliJ or in the general system variables. Eg. under ubuntu add the line M2_HOME=/usr/share/maven2/ to the /etc/environment file, log out, and log in again.
  • (Optional): Configure IntelliJ to download source and javadoc for project dependencies. Find the File -> Setting -> Maven -> Importing configurationpage and check the Automatically Download Source/Javadoc options.
  • When opening new projects in IntelliJ use the Import from external model option to select a Maven project

Eclipse

See the M2Eclipse plugin.

SBForge Nexus

The SBForge provides a Nexus Repository Manager for sharing SBForge artifacts. Nexus also aggregates 3.party artifacts and repositories. See the SBForge Repository overview for details.

Using Nexus

If you wish to access the artifacts found in the SBForge MAven repository include the following section in your project pom:

Code Block
      <repositories>
        <repository>
          <id>sbforge-nexus</id>
          <url>https://sbforge.org/nexus/content/groups/public</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
      </repositories>

If you wish to access the plugins found in the SBForge Maven repository include the following section in your project pom:

Code Block
     <pluginRepositories>
        <pluginRepository>
          <id>sbforge-nexus</id>
          <url>https://sbforge.org/nexus/content/groups/public</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </pluginRepository>
      </pluginRepositories>

Adding SBProjects Nexus to settings.xml

If you need to deploy to SBForge Nexus you need to specify specify your credentials in the ~/.m2/settings.xml file as show here: settings.xml. You can encrypt the password as described here: Password Encryption.

If you already have an exist settings.xml file, you should merge the contents of the downloaded file into the existing settings.xml by hand.

SBForge parent pom

To use the SBForge specific configurations include the SBForge parent pom in your project pom:

Code Block
<parent>
    <groupId>org.sbforge</groupId>
    <artifactId>SBForge-parent</artifactId>
    <version>9</version>
</parent>

The pom includes:

  • Distributions settings for the SBForge Nexus repository manager.
  • Additional Maven site definitions.

See SBForge-parent site for details and newest version.