Skip to content

Commit 1a1450e

Browse files
authored
Merge pull request #38 from cicirello/development
Documentation and workflow updates
2 parents b729b2a + bd846ce commit 1a1450e

File tree

7 files changed

+175
-295
lines changed

7 files changed

+175
-295
lines changed

.github/workflows/maven-publish.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2-
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
3-
41
name: Maven Package
52

63
on:
74
release:
85
types: [created]
96

107
jobs:
11-
build:
8+
publish:
129

1310
runs-on: ubuntu-latest
1411

@@ -39,7 +36,7 @@ jobs:
3936
run: mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}
4037

4138
- name: Publish to Apache Maven Central
42-
run: mvn deploy
39+
run: mvn deploy -PossrhDeploy
4340
env:
4441
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
4542
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
@@ -51,17 +48,8 @@ jobs:
5148
java-version: 1.8
5249
server-id: github
5350

54-
- name: Temporary multi-pom hack
55-
run: mv -f pomgh.xml pom.xml
56-
57-
- name: Build with Maven
58-
run: mvn -B package --file pom.xml
59-
60-
- name: Update package version
61-
run: mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}
62-
6351
- name: Publish to GitHub Packages Apache Maven
64-
run: mvn deploy
52+
run: mvn deploy -PgithubDeploy
6553
env:
6654
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6755

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616
### Fixed
1717

1818

19+
## [2.1.3] - 2020-09-16
20+
21+
### Changed
22+
* Revised workflow for publishing packages to publish to both Maven Central and Github Packages using one pom.xml.
23+
* Documentation updates
24+
25+
26+
## [2.1.2] - 2020-09-15
27+
28+
### Other
29+
* Working on getting workflow for publishing to maven central working properly. No functional difference from previous release.
30+
31+
32+
## [2.1.1] - 2020-09-15
33+
34+
### Other
35+
* Working on getting workflow for publishing to maven central working properly. No functional difference from previous release.
36+
37+
1938
## [2.1.0] - 2020-09-15
2039
### Added
2140
* Automated generation of sitemap.xml via GitHub actions for the documentation website.

README.md

Lines changed: 62 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ https://www.cicirello.org/
66

77
[![DOI](http://joss.theoj.org/papers/10.21105/joss.00950/status.svg)](https://doi.org/10.21105/joss.00950)
88
[![DOI](https://zenodo.org/badge/139182095.svg)](https://zenodo.org/badge/latestdoi/139182095)
9+
10+
[![Maven Central](https://img.shields.io/maven-central/v/org.cicirello/jpt.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.cicirello/jpt)
11+
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/cicirello/JavaPermutationTools?logo=GitHub)](https://github.com/cicirello/JavaPermutationTools/releases)
12+
913
[![build](https://github.com/cicirello/JavaPermutationTools/workflows/build/badge.svg)](https://github.com/cicirello/JavaPermutationTools/actions?query=workflow%3Abuild)
1014
[![GitHub](https://img.shields.io/github/license/cicirello/JavaPermutationTools)](https://github.com/cicirello/JavaPermutationTools/blob/master/LICENSE)
11-
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/cicirello/JavaPermutationTools?logo=GitHub)](https://github.com/cicirello/JavaPermutationTools/releases)
1215

1316
## How to Cite
1417

@@ -18,29 +21,34 @@ If you use this library in your research, please cite the following paper:
1821
1922
## Overview
2023

21-
The JavaPermutationTools (JPT) API provides Java classes that enable representing and generating
22-
permutations and sequences, as well as performing computation on permutations and sequences.
23-
It includes implementations of a variety of permutation distance metrics as well as distance
24-
metrics on sequences (i.e., Strings, arrays, and other ordered data types).
24+
The JavaPermutationTools (JPT) library provides Java classes and interfaces, etc that
25+
enable representing and generating permutations and sequences, as well as performing
26+
computation on permutations and sequences. It includes implementations of a variety
27+
of permutation distance metrics as well as distance metrics on sequences (i.e., Strings,
28+
arrays, and other ordered data types).
2529

26-
JPT is organized into the following packages:
27-
* __org.cicirello.permutations__: Permutation class and a class for iterating over permutations.
28-
* __org.cicirello.permutations.distance__: Collection of permutation distance metric implementations.
29-
* __org.cicirello.sequences__: Classes that perform a variety of operations on sequences (such as arrays, etc).
30-
* __org.cicirello.sequences.distance__: Collection of distance metrics on Strings and other sequences.
31-
* __org.cicirello.math.la__ : Linear algebra related classes.
32-
* __org.cicirello.math.rand__ : Classes related to efficient, or specialized, random number generation.
33-
* __org.cicirello.math.stats__: Statistics related classes.
30+
## Repository Organization
3431

35-
Javadoc documentation is in the /docs folder as well as at https://jpt.cicirello.org/
32+
The GitHub repository is organized as follows:
33+
* The [/build](build) directory contains an ant build file, and other resources related to building the library.
34+
* The [/dist](dist) directory contains the compiled jar files of the library.
35+
* The [/docs](docs) directory contains the javadoc documentation in a sub-directory [/docs/api](docs/api). The /docs directory is also the location of the website for the project hosted via GitHub pages at https://jpt.cicirello.org/.
36+
* The [/examples](examples) directory contains several example programs that use the library, and which demonstrate usage of various features.
37+
* The [/replication](replication) directory includes source code that recreates results found in publications associated with the library.
38+
* The [/src](src) directory contains all of the source code.
39+
* The [/tests](tests) directory contains JUnit test cases for all functionality of the library.
3640

37-
Source code is found in the /src folder. JUnit test classes are found in the /tests folder, which
38-
mirrors the package structure of /src.
41+
## Java 8
3942

40-
Compiled jar files of the library are in the /dist folder.
43+
The library supports Java 8 or higher, including both Oracle JDK 8 and OpenJDK 8.
4144

42-
The /examples folder includes source code to illustrate how to use the library. The /replication
43-
folder includes source code that recreates results found in publications associated with the library.
45+
## Versioning Scheme
46+
47+
The JPT uses [Semantic Versioning](https://semver.org/) with version
48+
numbers of the form: MAJOR.MINOR.PATCH, where differences in MAJOR
49+
correspond to incompatible API changes, differences in MINOR correspond
50+
to introduction of backwards compatible new functionality, and PATCH
51+
corresponds to backwards compatible bug fixes.
4452

4553
## Building the Library (with ant)
4654

@@ -75,6 +83,41 @@ The replication directory additionally contains more complex examples that repli
7583
experiments from published papers that have used the library. Those directories contain
7684
READMEs that provide more detail on the examples, including on running the examples.
7785

86+
## Importing the Library from Maven Central
87+
88+
Add this to the dependencies section of your pom.xml, replacing the version number
89+
with the version you want to use (note that the library has been available in Maven
90+
Central since version 2.1.2).
91+
92+
```XML
93+
<dependency>
94+
<groupId>org.cicirello</groupId>
95+
<artifactId>jpt</artifactId>
96+
<version>2.1.2</version>
97+
</dependency>
98+
```
99+
100+
## Importing the Library from Github Packages
101+
102+
If you'd prefer to import from Github Packages, rather than Maven Central,
103+
then: (1) add the dependency as indicated in previous section above,
104+
and (2) add the following to the repositories section of your pom.xml:
105+
106+
```XML
107+
<repository>
108+
<id>github</id>
109+
<name>GitHub cicirello Apache Maven Packages</name>
110+
<url>https://maven.pkg.github.com/cicirello/JavaPermutationTools</url>
111+
<releases><enabled>true</enabled></releases>
112+
<snapshots><enabled>true</enabled></snapshots>
113+
</repository>
114+
```
115+
116+
## License
117+
118+
The JPT library is licensed under the [GNU General Public License 3.0](https://www.gnu.org/licenses/gpl-3.0.en.html).
119+
120+
78121
## Contribute
79122

80123
Report bugs, suggestions, feature requests, etc via the [issues tracker](https://github.com/cicirello/JavaPermutationTools/issues). If you would

dist/jpt-2.0.1.jar

0 Bytes
Binary file not shown.

pom.xml

Lines changed: 90 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -9,51 +9,60 @@
99
<version>2.1.0</version>
1010
<packaging>jar</packaging>
1111

12-
<name>JavaPermutationTools</name>
13-
<description>JavaPermutationTools (JPT) is a library for
14-
computation on permutations and sequences.</description>
15-
<url>https://jpt.cicirello.org/</url>
12+
<name>JavaPermutationTools</name>
13+
<description>JavaPermutationTools (JPT) is a library for
14+
computation on permutations and sequences.
15+
JPT provides Java classes that enable representing and
16+
generating permutations and sequences, as well as
17+
performing computation on permutations and sequences.
18+
It includes implementations of a variety of permutation
19+
distance metrics as well as distance metrics on sequences
20+
(i.e., Strings, arrays, and other ordered data types).</description>
21+
<url>https://jpt.cicirello.org/</url>
1622

17-
<licenses>
18-
<license>
19-
<name>GPL-3.0-or-later</name>
20-
<url>https://www.gnu.org/licenses/gpl-3.0.en.html</url>
21-
<distribution>repo</distribution>
22-
<comments>
23-
JavaPermutationTools (JPT): A library for computation on permutations and sequences.
24-
Copyright (C) 2005-2020 Vincent A. Cicirello.
25-
26-
JavaPermutationTools is free software: you can redistribute it and/or modify
27-
it under the terms of the GNU General Public License as published by
28-
the Free Software Foundation, either version 3 of the License, or
29-
(at your option) any later version.
23+
<licenses>
24+
<license>
25+
<name>GPL-3.0-or-later</name>
26+
<url>https://www.gnu.org/licenses/gpl-3.0.en.html</url>
27+
<distribution>repo</distribution>
28+
<comments>
29+
JavaPermutationTools (JPT): A library for computation on permutations and sequences.
30+
Copyright (C) 2005-2020 Vincent A. Cicirello.
3031

31-
JavaPermutationTools is distributed in the hope that it will be useful,
32-
but WITHOUT ANY WARRANTY; without even the implied warranty of
33-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34-
GNU General Public License for more details.
32+
JavaPermutationTools is free software: you can redistribute it and/or modify
33+
it under the terms of the GNU General Public License as published by
34+
the Free Software Foundation, either version 3 of the License, or
35+
(at your option) any later version.
3536

36-
You should have received a copy of the GNU General Public License
37-
along with this program. If not, see https://www.gnu.org/licenses/.
38-
</comments>
39-
</license>
40-
</licenses>
41-
42-
<developers>
43-
<developer>
44-
<name>Vincent A Cicirello</name>
45-
<email>[email protected]</email>
46-
<url>https://www.cicirello.org/</url>
47-
<organization>Cicirello.Org</organization>
48-
<organizationUrl>https://www.cicirello.org/</organizationUrl>
49-
</developer>
50-
</developers>
37+
JavaPermutationTools is distributed in the hope that it will be useful,
38+
but WITHOUT ANY WARRANTY; without even the implied warranty of
39+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40+
GNU General Public License for more details.
5141

52-
<organization>
53-
<name>Cicirello.Org</name>
42+
You should have received a copy of the GNU General Public License
43+
along with this program. If not, see https://www.gnu.org/licenses/.
44+
</comments>
45+
</license>
46+
</licenses>
47+
48+
<developers>
49+
<developer>
50+
<name>Vincent A Cicirello</name>
51+
<email>[email protected]</email>
5452
<url>https://www.cicirello.org/</url>
55-
</organization>
53+
<organization>Cicirello.Org</organization>
54+
<organizationUrl>https://www.cicirello.org/</organizationUrl>
55+
</developer>
56+
</developers>
57+
58+
<organization>
59+
<name>Cicirello.Org</name>
60+
<url>https://www.cicirello.org/</url>
61+
</organization>
5662

63+
<profiles>
64+
<profile>
65+
<id>ossrhDeploy</id>
5766
<distributionManagement>
5867
<repository>
5968
<id>ossrh</id>
@@ -66,18 +75,53 @@
6675
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
6776
</snapshotRepository>
6877
</distributionManagement>
69-
78+
<build>
79+
<plugins>
80+
<plugin>
81+
<groupId>org.apache.maven.plugins</groupId>
82+
<artifactId>maven-gpg-plugin</artifactId>
83+
<version>1.6</version>
84+
<executions>
85+
<execution>
86+
<id>sign-artifacts</id>
87+
<phase>verify</phase>
88+
<goals>
89+
<goal>sign</goal>
90+
</goals>
91+
<configuration>
92+
<gpgArguments>
93+
<arg>--pinentry-mode</arg>
94+
<arg>loopback</arg>
95+
</gpgArguments>
96+
</configuration>
97+
</execution>
98+
</executions>
99+
</plugin>
100+
</plugins>
101+
</build>
102+
</profile>
103+
<profile>
104+
<id>githubDeploy</id>
105+
<distributionManagement>
106+
<repository>
107+
<id>github</id>
108+
<name>GitHub cicirello Apache Maven Packages</name>
109+
<url>https://maven.pkg.github.com/cicirello/JavaPermutationTools</url>
110+
</repository>
111+
</distributionManagement>
112+
</profile>
113+
</profiles>
70114

71-
<issueManagement>
72-
<system>github</system>
73-
<url>https://github.com/cicirello/JavaPermutationTools/issues</url>
74-
</issueManagement>
115+
<issueManagement>
116+
<system>github</system>
117+
<url>https://github.com/cicirello/JavaPermutationTools/issues</url>
118+
</issueManagement>
75119

76-
<scm>
120+
<scm>
77121
<connection>scm:git:git://github.com/cicirello/JavaPermutationTools.git</connection>
78122
<developerConnection>scm:git:ssh://github.com:cicirello/JavaPermutationTools.git</developerConnection>
79123
<url>http://github.com/cicirello/JavaPermutationTools/tree/master</url>
80-
</scm>
124+
</scm>
81125

82126

83127
<dependencies>
@@ -168,26 +212,6 @@
168212
</includes>
169213
</configuration>
170214
</plugin>
171-
<plugin>
172-
<groupId>org.apache.maven.plugins</groupId>
173-
<artifactId>maven-gpg-plugin</artifactId>
174-
<version>1.6</version>
175-
<executions>
176-
<execution>
177-
<id>sign-artifacts</id>
178-
<phase>verify</phase>
179-
<goals>
180-
<goal>sign</goal>
181-
</goals>
182-
<configuration>
183-
<gpgArguments>
184-
<arg>--pinentry-mode</arg>
185-
<arg>loopback</arg>
186-
</gpgArguments>
187-
</configuration>
188-
</execution>
189-
</executions>
190-
</plugin>
191215
</plugins>
192216
</build>
193217

0 commit comments

Comments
 (0)