SBPROJECTS will be offline Wednesday between 7:30 and 8:30

SBForge with all its applications will be down for security updates during a time interval of about 10-20 minutes in the interval mentioned above.

Skip to end of metadata
Go to start of metadata

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

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:

      <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:

     <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:

<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.

2 Comments

  1. Should the SBforge-parent version number be 5?

    1. The current newest version is 9. See change notes for details.