SBML.org — the global portal for all things SBML

Maven Configuration

Contents

For Maven users it is very convenient to import JSBML into their project. On this page we describe the most common ways of including JSBML as a dependency into Maven POM files and give concrete examples of how to do so.

Including the latest stable version of JSBML using Maven

If you are already using Maven in your project, you can add JSBML as a dependency. As of December 2016, JSBML is deployed on maven central so there is no need to specify a repository. Add the following lines into your pom.xml:


  <dependencies>
    <dependency>
      <groupId>org.sbml.jsbml</groupId>
      <artifactId>jsbml</artifactId>
      <version>1.4</version>
    </dependency>
  </dependencies>

The 'jsbml' artifact will include 'jsbml-core' plus all L3 packages. Like this there is not need to list all the packages by hand and when a new one is developed, you will get it without having to make too much change to your pom files.

Current JSBML latest stable release is: '1.4'

Including support for selected SBML Level 3 packages or JSBML modules

If you don't use the jsbml artifact and want to include only few L3 packages (not recommended), below are the exact dependencies for everything:


  <properties>
    <jsbml.version>1.4</jsbml.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.sbml.jsbml</groupId>
      <artifactId>jsbml-core</artifactId>
      <version>${jsbml.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sbml.jsbml.ext</groupId>
      <artifactId>jsbml-arrays</artifactId>
      <version>${jsbml.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sbml.jsbml.ext</groupId>
      <artifactId>jsbml-comp</artifactId>
      <version>${jsbml.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sbml.jsbml.ext</groupId>
      <artifactId>jsbml-distrib</artifactId>
      <version>${jsbml.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sbml.jsbml.ext</groupId>
      <artifactId>jsbml-dyn</artifactId>
      <version>${jsbml.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sbml.jsbml.ext</groupId>
      <artifactId>jsbml-fbc</artifactId>
      <version>${jsbml.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sbml.jsbml.ext</groupId>
      <artifactId>jsbml-groups</artifactId>
      <version>${jsbml.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sbml.jsbml.ext</groupId>
      <artifactId>jsbml-layout</artifactId>
      <version>${jsbml.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sbml.jsbml.ext</groupId>
      <artifactId>jsbml-multi</artifactId>
      <version>${jsbml.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sbml.jsbml.ext</groupId>
      <artifactId>jsbml-qual</artifactId>
      <version>${jsbml.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sbml.jsbml.ext</groupId>
      <artifactId>jsbml-render</artifactId>
      <version>${jsbml.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sbml.jsbml.ext</groupId>
      <artifactId>jsbml-req</artifactId>
      <version>${jsbml.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sbml.jsbml.ext</groupId>
      <artifactId>jsbml-spatial</artifactId>
      <version>${jsbml.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sbml.jsbml.modules</groupId>
      <artifactId>jsbml-tidy</artifactId>
      <version>${jsbml.version}</version>
    </dependency>
  </dependencies> 

Including the latest JSBML snapshot from the repository

In order to import the latest snapshot from the JSBML repository rather than the latest stable version, you can do so by including the following into your POM file:

In your list of repositories just add

<repository>
  <id>JSBML-SNAPSHOT</id>
  <name>The JSBML Snapshot repository</name>
  <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>

In your projects depending on JSBML, just add this dependency:

<dependency> 
  <groupId>org.sbml.jsbml</groupId> 
   <artifactId>jsbml</artifactId> 
   <version>1.5-SNAPSHOT</version> 
 </dependency>

Current JSBML development release is: '1.5-SNAPSHOT'

Retrieved from "http://sbml.org/Software/JSBML/docs/Maven_Configuration"

This page was last modified 21:07, 19 August 2018.



Please use our issue tracking system for any questions or suggestions about this website. This page was last modified 21:07, 19 August 2018.