Skip to content

Commit

Permalink
modified ant and maven configuration files to be able to deploy to so…
Browse files Browse the repository at this point in the history
…natype/maven central
  • Loading branch information
niko-rodrigue committed Nov 29, 2016
1 parent 6ee3fd6 commit 172fe36
Show file tree
Hide file tree
Showing 22 changed files with 811 additions and 454 deletions.
65 changes: 61 additions & 4 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<?xml version="1.0"?>
<!--
$Id$
$URL$
This file is part of JSBML. Please visit http://sbml.org/Software/JSBML
for the latest version of JSBML and more information about SBML.
Expand All @@ -19,7 +16,6 @@
in the file named "LICENSE.txt" included with this software distribution
and also available online as http://sbml.org/Software/JSBML/License.
Version: $Rev$
-->
<project
default="usage"
Expand Down Expand Up @@ -111,6 +107,15 @@
<fileset dir="${build.dir}" includes="*.jar *.zip"/>
</path>

<!-- don't commit the repo url for releases to avoid messing it up as much as possible -->
<!-- <property name="maven.repo.url" value="scp://shell.sourceforge.net/home/project-web/jsbml/htdocs/m2repo_snapshots"/> -->
<property name="maven.repo.url" value="https://oss.sonatype.org/service/local/staging/deploy/maven2"/>
<!-- https://oss.sonatype.org/service/local/staging/deploy/maven2 releases -->
<!-- <property name="maven.repo.url" value="file:///homes/maven/public_html/m2repo"/> -->
<property name="maven.repo.id" value="ossrh"/>
<!-- local test instance url file:///homes/maven/public_html/m2repo, sourceforge: jsbml-maven-repo-sf -->


</target>

<!-- =================================================================== -->
Expand Down Expand Up @@ -613,6 +618,58 @@

</target>

<!-- =================================================================== -->
<!-- Install jsbml in the local repo -->
<!-- =================================================================== -->
<target
name="maven-install"
description="Install jsbml localy"
depends="init"
>
<exec executable="mvn">
<arg value="javadoc:jar"/>
<arg value="source:jar"/>
<arg value="install"/>
</exec>

<!-- TODO - add the jsbml artifact as well ?
-->

</target>

<!-- =================================================================== -->
<!-- Deploy jsbml in a remote repo -->
<!-- =================================================================== -->
<target
name="maven-deploy"
description="Deploy jsbml remotely"
depends="init"
>
<!-- mvn javadoc:jar source:jar deploy
-->
<exec executable="mvn">
<arg value="javadoc:jar"/>
<arg value="source:jar"/>
<arg value="deploy"/>
</exec>

<!-- deploy a pseudo jar file to be able to have all dependencies defined in one go ? -->
<!-- mvn deploy:deploy-file -DpomFile=./dev/maven/pom.xml -Dfile=./dev/maven/jsbml-pom.jar -->

<exec executable="mvn">
<arg value="gpg:sign-and-deploy-file"/>
<arg value="-DpomFile=dev/maven/pom.xml"/>
<arg value="-Dfile=dev/maven/jsbml-pom.jar"/>
<arg value="-Dsources=dev/maven/jsbml-pom-sources.jar"/>
<arg value="-Djavadoc=dev/maven/jsbml-pom-javadoc.jar"/>
<arg value="-Durl=${maven.repo.url}"/>
<arg value="-DrepositoryId=${maven.repo.id}"/>
</exec>

<!-- mvn test jar:test-jar to generate the test jar files to be able to run the tests in a new project -->

</target>


<!-- =================================================================== -->
<!-- Cleans everything -->
Expand Down
234 changes: 38 additions & 196 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Id$
$URL$
$Id: pom.xml 2496 2016-04-21 13:35:14Z niko-rodrigue $
$URL: svn+ssh://[email protected]/p/jsbml/code/tags/jsbml-1.0/core/pom.xml $
This file is part of JSBML. Please visit http://sbml.org/Software/JSBML
for the latest version of JSBML and more information about SBML.
Expand All @@ -19,194 +19,56 @@
in the file named "LICENSE.txt" included with this software distribution
and also available online as http://sbml.org/Software/JSBML/License.
Version: $Rev$
Version: $Rev: 2496 $
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.sbml.jsbml.core</groupId>
<artifactId>jsbml</artifactId>
<version>1.0-SNAPSHOT</version>
<groupId>org.sbml.jsbml</groupId>
<artifactId>jsbml-core</artifactId>
<description>JSBML</description>
<packaging>jar</packaging>

<parent>
<groupId>org.sbml.jsbml</groupId>
<artifactId>jsbml-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
<relativePath>../</relativePath>
</parent>
<!--
<scm>
<connection>scm:svn:http://127.0.0.1/dummy</connection>
<developerConnection>scm:svn:https://127.0.0.1/dummy</developerConnection>
<tag>HEAD</tag>
<url>http://127.0.0.1/dummy</url>
</scm>
-->

<build>

<directory>dist</directory>
<outputDirectory>dist/classes</outputDirectory>
<finalName>${artifactId}-${version}</finalName>
<testOutputDirectory>dist/test-classes</testOutputDirectory>
<sourceDirectory>src</sourceDirectory>
<scriptSourceDirectory>scripts</scriptSourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
<resources>
<resource>
<directory>resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>test/org/sbml/jsbml/xml/test</directory>
</testResource>
</testResources>

<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.4</version>
</extension>
</extensions>

<plugins>
<!--
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
<revisionOnScmFailure>unknownbuild</revisionOnScmFailure>
</configuration>
</plugin>
-->
<!--
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
-->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>process-resources</phase>
<configuration>
<tasks>
<property name="version" value="${version}"/>
<property name="name" value="${artifactId}"/>
<ant antfile="build.xml" target="bigjar"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.7.0</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<id>add-jar</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>build/${artifactId}-${version}-with-dependencies.jar</file>
<type>jar</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<groups>deployment,deployment-validation,jar-deployment</groups>
<skipTests>true</skipTests>
<testFailureIgnore>false</testFailureIgnore>
<argLine>-Dfile.encoding=UTF-8 -DDATA_FOLDER=${project.basedir}/test/org/sbml/jsbml/xml/test/data/ -ea</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<workspace>${basedir}</workspace>
<workspaceCodeStylesURL>http://http://jsbmlmavenrepotest.sourceforge.net/codetemplates.xml</workspaceCodeStylesURL>
</configuration>
</plugin>
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.4</version>
</dependency>
</dependencies>
</plugin>
-->
</plugins>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<!-- <groups>deployment,deployment-validation,jar-deployment</groups> -->
<!-- <skipTests>true</skipTests> -->
<testFailureIgnore>false</testFailureIgnore>
<argLine>-Dfile.encoding=UTF-8 -ea</argLine>
<includes>
<include>Tests.java</include>
</includes>
</configuration>
</plugin>
</plugins>

</build>

<repositories>
<repository>
<id>biojava-maven-repo</id>
<name>BioJava repository</name>
<url>http://www.biojava.org/download/maven/</url>
</repository>
<!--
<repository>
<id>ebi-repo</id>
<name>The EBI internal repository</name>
<url>http://www.ebi.ac.uk/~maven/m2repo</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
-->
<repository>
<id>biojava-maven-repo</id>
<name>BioJava repository</name>
<url>https://github.com/biojava/maven-repo/raw/master/</url>
</repository>
<repository>
<id>ebi-repo</id>
<name>The EBI internal repository</name>
<url>http://www.ebi.ac.uk/~maven/m2repo</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

<dependencies>
Expand All @@ -230,13 +92,6 @@
<artifactId>biojava3-ontology</artifactId>
<version>3.1.0</version>
</dependency>
<!--
<dependency>
<groupId>org.biojava</groupId>
<artifactId>biojava3-core</artifactId>
<version>3.0.1</version>
</dependency>
-->
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
Expand Down Expand Up @@ -272,18 +127,5 @@
<version>0.2.4</version>
</dependency>
</dependencies>

<distributionManagement>
<repository>
<id>jsbmlmavenrepotest.sourceforge.net</id>
<name>JSBML Maven2 repository</name>
<url>scp://shell.sourceforge.net/home/project-web/jsbmlmavenrepotest/htdocs/releaseRepository</url>
</repository>
<snapshotRepository>
<id>jsbmlmavenrepotest.sourceforge.net</id>
<name>JSBML Maven2 SNAPSHOT repository</name>
<url>scp://shell.sourceforge.net/home/project-web/jsbmlmavenrepotest/htdocs/snapshotRepository</url>
</snapshotRepository>
</distributionManagement>


</project>
2 changes: 1 addition & 1 deletion core/src/org/sbml/jsbml/JSBML.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class JSBML {
/**
* The current version number of JSBML.
*/
private static final String jsbmlVersion = "1.0-rc1"; // TODO: replace automatically this version number with [BUILD.NUMBER]
private static final String jsbmlVersion = "1.0"; // TODO: replace automatically this version number with [BUILD.NUMBER]

public static final int LEVEL_MISMATCH = -7;
public static final int OPERATION_FAILED = -3;
Expand Down
Binary file added dev/maven/jsbml-pom-javadoc.jar
Binary file not shown.
Binary file added dev/maven/jsbml-pom-sources.jar
Binary file not shown.
Binary file added dev/maven/jsbml-pom.jar
Binary file not shown.
Loading

0 comments on commit 172fe36

Please sign in to comment.