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
33 changes: 33 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path

name: Maven Package

on:
release:
types: [created]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Update version
run: mvn versions:set -DnewVersion=${GITHUB_REF:11}

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s ${{ github.workspace }}/settings.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 30 additions & 0 deletions .m2/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">

<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>

<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>github</id>
<name>GitHub cicirello Apache Maven Packages</name>
<url>https://maven.pkg.github.com/cicirello/JavaPermutationTools</url>
</repository>
</repositories>
</profile>
</profiles>

<servers>
<server>
<id>github</id>
<username>${env.GITHUB_ACTOR}</username>
<password>${env.GITHUB_TOKEN}</password>
</server>
</servers>
</settings>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ https://www.cicirello.org/
[![DOI](https://zenodo.org/badge/139182095.svg)](https://zenodo.org/badge/latestdoi/139182095)
![build](https://github.com/cicirello/JavaPermutationTools/workflows/build/badge.svg)
![GitHub](https://img.shields.io/github/license/cicirello/JavaPermutationTools)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/cicirello/JavaPermutationTools)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/cicirello/JavaPermutationTools)](https://github.com/cicirello/JavaPermutationTools/releases)

## How to Cite

Expand Down
157 changes: 157 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
<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.cicirello</groupId>
<artifactId>jpt</artifactId>
<version>2.0.1</version>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<type>jar</type>
<scope>test</scope>
<optional>true</optional>
</dependency>
</dependencies>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<build>
<directory>${project.basedir}/dist</directory>
<outputDirectory>${project.basedir}/bin</outputDirectory>
<finalName>${project.artifactId}-${project.version}</finalName>
<testOutputDirectory>${project.basedir}/testbin</testOutputDirectory>
<sourceDirectory>${project.basedir}/src</sourceDirectory>
<scriptSourceDirectory>${project.basedir}/src/scripts</scriptSourceDirectory>
<testSourceDirectory>${project.basedir}/tests</testSourceDirectory>
<resources>
<resource>
<directory>${project.basedir}/src/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>${project.basedir}/tests/resources</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<windowtitle>JavaPermutationTools - A Java API for computation on permutations</windowtitle>
<doctitle>JavaPermutationTools - A Java API for computation on permutations</doctitle>
<author>false</author>
<version>false</version>
<overview>${project.build.sourceDirectory}/overview.html</overview>
<notimestamp>true</notimestamp>
<links>
<link>https://docs.oracle.com/javase/8/docs/api</link>
</links>
<bottom><![CDATA[Copyright &copy; 2005-2020 <a href=\"https://www.cicirello.org/\" target=_top>Vincent A. Cicirello</a>. All rights reserved.]]></bottom>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<includes>
<include>**/*TestCases.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<reportOutputDirectory>${project.basedir}/docs/api</reportOutputDirectory>
<destDir>api</destDir>
<outputDirectory>${project.basedir}/docs/api</outputDirectory>
<windowtitle>JavaPermutationTools - A Java API for computation on permutations</windowtitle>
<doctitle>JavaPermutationTools - A Java API for computation on permutations</doctitle>
<author>false</author>
<version>false</version>
<overview>${project.build.sourceDirectory}/overview.html</overview>
<notimestamp>true</notimestamp>
<links>
<link>https://docs.oracle.com/javase/8/docs/api</link>
</links>
<bottom><![CDATA[Copyright &copy; 2005-2020 <a href=\"https://www.cicirello.org/\" target=_top>Vincent A. Cicirello</a>. All rights reserved.]]></bottom>
</configuration>
</plugin>
</plugins>
</reporting>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub cicirello Apache Maven Packages</name>
<url>https://maven.pkg.github.com/cicirello/JavaPermutationTools</url>
</repository>
</distributionManagement>

<name>JavaPermutationTools</name>
<description>JavaPermutationTools (JPT) is a library for
computation on permutations and sequences.</description>
<url>https://jpt.cicirello.org/</url>
<licenses>
<license>
<name>GNU General Public License, Version 3.0</name>
<url>https://www.gnu.org/licenses/gpl-3.0.en.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<organization>
<name>Vincent A. Cicirello</name>
<url>https://www.cicirello.org/</url>
</organization>
<developers>
<developer>
<name>Vincent A. Cicirello</name>
<url>https://www.cicirello.org/</url>
</developer>
</developers>

<issueManagement>
<system>github</system>
<url>https://github.com/cicirello/JavaPermutationTools/issues</url>
</issueManagement>
</project>