Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,33 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 11, 17, 19 ]
java: [ 11, 17, 21, 25 ]
name: Java ${{ matrix.java }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
distribution: temurin
- name: Build with Maven
run: cd org.pathvisio.lib; mvn clean install -Dgpg.skip -Dmaven.javadoc.skip=true

code-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up JDK 11
uses: actions/setup-java@v5
with:
java-version: 11
distribution: temurin
- name: Build with Maven
run: cd org.pathvisio.lib; mvn clean install -Dgpg.skip -Pjacoco
- name: push JaCoCo stats to codecov.io
run: bash <(curl -s https://codecov.io/bash)
uses: codecov/codecov-action@v5
with:
directory: 'org.pathvisio.lib'
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
84 changes: 43 additions & 41 deletions org.pathvisio.lib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,31 @@
</scm>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
<snapshotRepository>
<id>central</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
</snapshotRepository>
<repository>
<id>central</id>
<url>https://central.sonatype.com/</url>
<layout>default</layout>
</repository>
</distributionManagement>


<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.9.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
Expand All @@ -76,10 +77,10 @@
</Import-Package>
<Require-Bundle>
org.apache.servicemix.bundles.jdom;bundle-version="2.0.6",
org.bridgedb;bundle-version="3.0.20",
org.bridgedb.bio;bundle-version="3.0.20",
org.bridgedb.rdb;bundle-version="3.0.20",
org.apache.commons.commons-collections4;bundle-version="4.4"
org.bridgedb;bundle-version="3.0.29",
org.bridgedb.bio;bundle-version="3.0.29",
org.bridgedb.rdb;bundle-version="3.0.29",
org.apache.commons.commons-collections4;bundle-version="4.5.0"
</Require-Bundle>
</instructions>
</configuration>
Expand All @@ -96,7 +97,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<version>3.5.0</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
Expand All @@ -106,7 +107,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.14.1</version>
<configuration>
<source>11</source>
<target>11</target>
Expand All @@ -115,7 +116,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.4.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -128,7 +129,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version>
<version>3.12.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -149,7 +150,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>3.2.8</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -162,12 +163,12 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<version>3.5.4</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<version>0.8.14</version>
<executions>
<execution>
<id>start-agent</id>
Expand Down Expand Up @@ -197,35 +198,36 @@
<dependency>
<groupId>org.bridgedb</groupId>
<artifactId>org.bridgedb</artifactId>
<version>3.0.23</version>
<version>3.0.29</version>
</dependency>
<dependency>
<groupId>org.bridgedb</groupId>
<artifactId>org.bridgedb.bio</artifactId>
<version>3.0.23</version>
<version>3.0.29</version>
</dependency>
<dependency>
<groupId>org.bridgedb</groupId>
<artifactId>org.bridgedb.rdb</artifactId>
<version>3.0.23</version>
<version>3.0.29</version>
</dependency>
<!-- Apache Commons -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.4</version>
<version>4.5.0</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<!-- JUnit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
</dependency>
<!-- JUnit -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.14.1</version>
<scope>test</scope>
</dependency>
<!-- Apache Commons -->
</dependencies>

<developers>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected GPML2013aWriter(String xsdFile, Namespace nsGPML) {
* @param validate if true, validate the dom structure before writing. If
* there is a validation error, or the xsd is not in the
* classpath, an exception will be thrown.
* @throws ConverterException
* @throws ConverterException when an {@link IOException} when the XML code is sent to the output stream
*/
@Override
public void writeToXml(PathwayModel pathwayModel, OutputStream output, boolean validate) throws ConverterException {
Expand Down Expand Up @@ -120,7 +120,7 @@ public void writeToXml(PathwayModel pathwayModel, OutputStream output, boolean v
* @param file the file to which the JDOM document should be saved.
* @param validate if true, validate the dom structure before writing to
* file.
* @throws ConverterException
* @throws ConverterException when an {@link IOException} happened during the creation of a {@link FileOutputStream}
*/
@Override
public void writeToXml(PathwayModel pathwayModel, File file, boolean validate) throws ConverterException {
Expand All @@ -138,7 +138,7 @@ public void writeToXml(PathwayModel pathwayModel, File file, boolean validate) t
* pathwayModel {@link PathwayModel} data.
*
* @param pathwayModel the pathway model to be written.
* @throws ConverterException
* @throws ConverterException when an {@link IOException} happened during the creation of a Jdom
*/
@Override
public Document createJdom(PathwayModel pathwayModel) throws ConverterException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public interface GPMLFormatWriter extends GPMLFormatVersion {
*
* @param pathwayModel the pathway model.
* @return
* @throws ConverterException
* @throws ConverterException when an exception happened during the conversion
*/
Document createJdom(PathwayModel pathwayModel) throws ConverterException;

Expand All @@ -44,7 +44,7 @@ public interface GPMLFormatWriter extends GPMLFormatVersion {
* @param pathwayModel the pathway model.
* @param file the file to write to.
* @param validate if true, validate.
* @throws ConverterException
* @throws ConverterException when an exception happened during the conversion
*/
void writeToXml(PathwayModel pathwayModel, File file, boolean validate) throws ConverterException;

Expand All @@ -54,7 +54,7 @@ public interface GPMLFormatWriter extends GPMLFormatVersion {
* @param pathwayModel the pathway model.
* @param out the output stream.
* @param validate if true, validate.
* @throws ConverterException
* @throws ConverterException when an exception happened during the conversion
*/
void writeToXml(PathwayModel pathwayModel, OutputStream out, boolean validate) throws ConverterException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@
******************************************************************************/
package org.pathvisio.libgpml.conversion;

import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.File;
import java.io.IOException;
import java.net.URL;

import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.pathvisio.libgpml.io.ConverterException;
import org.pathvisio.libgpml.model.GPML2013aWriter;
import org.pathvisio.libgpml.model.GPML2021Writer;
import org.pathvisio.libgpml.model.PathwayModel;

import junit.framework.TestCase;

/**
* Test for reading and writing of a single GPML2021 file, for
* troubleshooting and resolving specific issues.
*
* @author finterly
*/
public class TestConversionToGPML2013a extends TestCase {
class TestConversionToGPML2013a {
private PathwayModel pathwayModel;
private String inputFile = "example-v2021.gpml";
private URL url = Thread.currentThread().getContextClassLoader().getResource(inputFile);
Expand All @@ -46,8 +46,8 @@ public class TestConversionToGPML2013a extends TestCase {
* @throws ConverterException
* @throws IOException
*/
@Before
public void setUp() throws IOException, ConverterException {
@BeforeEach
void setUp() throws IOException, ConverterException {
File file = new File(url.getPath());
assertTrue(file.exists());
pathwayModel = new PathwayModel();
Expand All @@ -61,7 +61,7 @@ public void setUp() throws IOException, ConverterException {
* @throws IOException
*/
@Test
public void testWrite() throws IOException, ConverterException {
void write() throws Exception {
File tmp = File.createTempFile(inputFile + "_testwriteGPML2013a_", ".gpml");
GPML2013aWriter.GPML2013aWRITER.writeToXml(pathwayModel, tmp, true);
System.out.println(tmp);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@
******************************************************************************/
package org.pathvisio.libgpml.conversion;

import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.File;
import java.io.IOException;
import java.net.URL;

import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.pathvisio.libgpml.io.ConverterException;
import org.pathvisio.libgpml.model.GPML2013aWriter;
import org.pathvisio.libgpml.model.GPML2021Writer;
import org.pathvisio.libgpml.model.PathwayModel;

import junit.framework.TestCase;

/**
* Test for reading and writing of a single GPML2013a file, for
* troubleshooting and resolving specific issues.
*
* @author finterly
*/
public class TestConversionToGPML2021 extends TestCase {
class TestConversionToGPML2021 {
private PathwayModel pathwayModel;
private String inputFile = "example-v2013a.gpml";
private URL url = Thread.currentThread().getContextClassLoader().getResource(inputFile);
Expand All @@ -46,8 +46,8 @@ public class TestConversionToGPML2021 extends TestCase {
* @throws ConverterException
* @throws IOException
*/
@Before
public void setUp() throws IOException, ConverterException {
@BeforeEach
void setUp() throws IOException, ConverterException {
File file = new File(url.getPath());
assertTrue(file.exists());
pathwayModel = new PathwayModel();
Expand All @@ -61,7 +61,7 @@ public void setUp() throws IOException, ConverterException {
* @throws IOException
*/
@Test
public void testWrite() throws IOException, ConverterException {
void write() throws Exception {
File tmp = File.createTempFile(inputFile + "_testwriteGPML2013a_", ".gpml");
GPML2013aWriter.GPML2013aWRITER.writeToXml(pathwayModel, tmp, true);
System.out.println(tmp);
Expand Down
Loading