Skip to content

Commit cf5087d

Browse files
authored
Merge pull request #155 from cicirello/v3-dev
major release 3.0.0
2 parents 17ee162 + 9d39794 commit cf5087d

File tree

74 files changed

+241
-7378
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+241
-7378
lines changed

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
java-version: '11'
2626

2727
- name: Build docs with Maven
28-
run: mvn javadoc:javadoc
28+
run: mvn compile javadoc:javadoc
2929

3030
- name: Copy to Documentation Website Location
3131
run: |
@@ -48,7 +48,7 @@ jobs:
4848
- name: Commit documentation changes
4949
run: |
5050
if [[ `git status --porcelain` ]]; then
51-
git config --global user.name 'Vincent A Cicirello'
51+
git config --global user.name 'Vincent A. Cicirello'
5252
git config --global user.email '[email protected]'
5353
git add -A
5454
git commit -m "Automated API website updates."

.github/workflows/maven-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,6 @@ jobs:
6161
gh release upload ${TAG} target/${{ env.artifact_name }}-${{ steps.get_version.outputs.VERSION }}.jar
6262
gh release upload ${TAG} target/${{ env.artifact_name }}-${{ steps.get_version.outputs.VERSION }}-sources.jar
6363
gh release upload ${TAG} target/${{ env.artifact_name }}-${{ steps.get_version.outputs.VERSION }}-javadoc.jar
64+
gh release upload ${TAG} target/${{ env.artifact_name }}-${{ steps.get_version.outputs.VERSION }}-jar-with-dependencies.jar
6465
env:
6566
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.lift.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
build = "mvn"
22

3+
jdk11 = true
4+
35
# don't run eslint... it is for js and will detect false positives
46
# in javadoc directories.
57

@@ -23,6 +25,6 @@ ignore = ["PREDICTABLE_RANDOM"]
2325

2426
ignoreFiles = """
2527
docs/api/jquery/
26-
tests/
28+
src/test/
2729
*.js
2830
"""

CHANGELOG.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased] - 2021-09-10
7+
## [Unreleased] - 2021-09-24
88

99
### Added
1010

@@ -19,6 +19,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
### CI/CD
2020

2121

22+
## [3.0.0] - 2021-09-24
23+
24+
### Changed
25+
* Minimum supported Java version is now Java 11+.
26+
* The library now uses Java modules, providing the
27+
module `org.cicirello.jpt`, which includes the
28+
existing packages `org.cicirello.permutations` and
29+
`org.cicirello.sequences`, as well as their
30+
subpackages.
31+
* The randomization and other math utilities, previously
32+
contained in the package `org.cicirello.math` and its
33+
subpackages have been moved to a new library
34+
[ρμ](https://rho-mu.cicirello.org), within a module
35+
`org.cicirello.rho_mu`. That module is now a dependency
36+
of jpt, declared with a `requires transitive` to ease the
37+
transition for existing users of JPT (they should only
38+
need a `requires org.cicirello.jpt` to get access to
39+
that functionality as well).
40+
* Similar to the above, the package `org.cicirello.util`
41+
has been moved out of JPT to a new library
42+
[org.cicirello.core](https://core.cicirello.org), within
43+
a module `org.cicirello.core`. The package name of
44+
`org.cicirello.util` has been kept. This new module is
45+
now a dependency of JPT. And just as in the case with the
46+
math and randomization utilities, JPT declares the module
47+
requires with `requires transitive` to ease the transition
48+
of existing users.
49+
* We will now also publish a `jar-with-dependencies` for those
50+
users of the library who do not use a dependency manager. This
51+
fat jar contains the library and all dependencies. This fat
52+
jar is not modularized (unlike the regular jar), as Java
53+
only allows a single module per jar. However, it is still
54+
built for a Java 11 target.
55+
56+
2257
## [2.6.5] - 2021-09-10
2358

2459
### Other

README.md

Lines changed: 57 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Copyright (C) 2018-2021 [Vincent A. Cicirello](https://www.cicirello.org/).
77

88
Website: https://jpt.cicirello.org/
99

10+
API documentation: https://jpt.cicirello.org/api
11+
1012
| __Publications About the Library__ | [![DOI](http://joss.theoj.org/papers/10.21105/joss.00950/status.svg)](https://doi.org/10.21105/joss.00950) |
1113
| :--- | :--- |
1214
| __Packages and Releases__ | [![Maven Central](https://img.shields.io/maven-central/v/org.cicirello/jpt.svg?label=Maven%20Central&logo=apachemaven)](https://search.maven.org/artifact/org.cicirello/jpt) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/cicirello/JavaPermutationTools?logo=GitHub)](https://github.com/cicirello/JavaPermutationTools/releases) |
@@ -29,16 +31,13 @@ computation on permutations and sequences. It includes implementations of a vari
2931
of permutation distance metrics as well as distance metrics on sequences (i.e., Strings,
3032
arrays, and other ordered data types).
3133

32-
## Repository Organization
33-
34-
The GitHub repository is organized as follows:
35-
* The [/src](src) directory contains all of the source code for JavaPermutationTools.
36-
* The [/tests](tests) directory contains JUnit test cases for all functionality of the library.
37-
* The [/docs](docs) directory contains the javadoc documentation in a sub-directory /docs/api. The /docs directory is also the location of the website for the project hosted via GitHub pages at https://jpt.cicirello.org/.
34+
## Java 11+
3835

39-
## Java 8
36+
Beginning with version 3.0.0, the library supports Java 11+. Our development process
37+
utilizes OpenJDK 11, and all jar files released via Maven Central, GitHub Packages,
38+
and GitHub Releases are built with a Java 11 target.
4039

41-
The library supports Java 8 or higher, including both Oracle JDK 8 and OpenJDK 8.
40+
Versions prior to 3.0.0 previously required Java 8+.
4241

4342
## Versioning Scheme
4443

@@ -73,17 +72,53 @@ comments is not advised. Some of the example in the examples repository are
7372
based on the experiments from published papers that have either used the library
7473
directly, or which led to some of the code in the library.
7574

75+
## Java Modules
76+
77+
This library provides a Java module, `org.cicirello.jpt`. To use in your project,
78+
add the following to your `module-info.java`:
79+
80+
```Java
81+
module your.module.name.here {
82+
requires org.cicirello.jpt;
83+
}
84+
```
85+
86+
This module includes the `org.cicirello.permutations` and `org.cicirello.sequences`
87+
packages as well as their subpackages. See the [API documentation](https://jpt.cicirello.org/api)
88+
for details.
89+
90+
Beginning with version 3.0.0, randomization and other math utilities, and some
91+
generic utilities, have been
92+
moved to a pair of new libraries [ρμ](https://github.com/cicirello/rho-mu)
93+
and [org.cicirello.core](https://github.com/cicirello/core), which are
94+
now dependencies of JavaPermutationTools. Your dependency manager (see next section)
95+
will handle downloading these for you.
96+
97+
To ease the transition of users of the library who may have been relying on those
98+
utilities, we have configured the `module-info.java` for the `org.cicirello.jpt` module to
99+
require these transitively so that your application should only need to
100+
require `org.cicirello.jpt` to access the functionality of those new modules.
101+
However, it is possible that you __may__ actually need the following to access
102+
some of that functionality, such as the RandomIndexer class, or other math or utility classes:
103+
104+
```Java
105+
module your.module.name.here {
106+
requires org.cicirello.jpt;
107+
requires org.cicirello.rho_mu;
108+
requires org.cicirello.core;
109+
}
110+
```
111+
76112
## Importing the Library from Maven Central
77113

78114
Add this to the dependencies section of your pom.xml, replacing the version number
79-
with the version you want to use (note that the library has been available in Maven
80-
Central since version 2.1.2).
115+
with the version you want to use.
81116

82117
```XML
83118
<dependency>
84119
<groupId>org.cicirello</groupId>
85120
<artifactId>jpt</artifactId>
86-
<version>2.6.0</version>
121+
<version>3.0.0</version>
87122
</dependency>
88123
```
89124

@@ -109,13 +144,20 @@ If you don't use a dependency manager that supports importing from Maven Central
109144
or if you simply prefer to download manually, prebuilt jars are also attached to
110145
each [GitHub Release](https://github.com/cicirello/JavaPermutationTools).
111146

147+
In addition to the regular jar of the library, we also regularly publish a
148+
`jar-with-dependencies`. The `jar-with-dependencies` is built for a Java 11 target,
149+
but does not contain any module declarations (unlike the regular jar file which does).
150+
Therefore, the `jar-with-dependencies` should be used on the classpath.
151+
112152
## License
113153

114154
The JPT library is licensed under the [GNU General Public License 3.0](https://www.gnu.org/licenses/gpl-3.0.en.html).
115155

116-
117156
## Contribute
118157

119-
Report bugs, suggestions, feature requests, etc via the [issues tracker](https://github.com/cicirello/JavaPermutationTools/issues). If you would
120-
like to directly contribute new code, you may also fork the repository,
121-
and create pull requests.
158+
If you would like to contribute in any way, such
159+
as reporting bugs, suggesting new functionality, or code contributions
160+
such as bug fixes or implementations of new functionality, then start
161+
by reading the [contribution guidelines](https://github.com/cicirello/.github/blob/main/CONTRIBUTING.md).
162+
This project has adopted
163+
the [Contributor Covenant Code of Conduct](https://github.com/cicirello/.github/blob/main/CODE_OF_CONDUCT.md).

docs/index.html

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,35 @@ <h3>Importing from Maven Central</h3>
187187
<pre><code>&lt;dependency&gt;
188188
&lt;groupId&gt;org.cicirello&lt;/groupId&gt;
189189
&lt;artifactId&gt;jpt&lt;/artifactId&gt;
190-
&lt;version&gt;2.6.1&lt;/version&gt;
190+
&lt;version&gt;3.0.0&lt;/version&gt;
191191
&lt;/dependency&gt;
192192
</code></pre>
193193
<p>Just replace the version number with your desired version of the library.</p>
194194
</section>
195195
<section>
196+
<h3>Java Modules</h3>
197+
<p>The library provides a Java module, org.cicirello.jpt. To use in your project, add the
198+
following to your module-info.java:</p>
199+
<pre><code>
200+
module your.module.name.here {
201+
requires org.cicirello.jpt;
202+
}
203+
</code></pre>
204+
<p>This module includes the org.cicirello.permutations and org.cicirello.sequences
205+
packages as well as their subpackages. See the <a href="https://jpt.cicirello.org/api">API documentation</a>
206+
for details.</p>
207+
<p>Beginning with version 3.0.0, randomization and other math utilities, and some
208+
generic utilities, have been moved to a pair of new
209+
libraries <a href="https://rho-mu.cicirello.org/">&rho;&mu;</a>
210+
and <a href="https://core.cicirello.org/">org.cicirello.core</a>, which are
211+
now dependencies of JavaPermutationTools. Your dependency manager (see previous section)
212+
will handle downloading these for you.</p>
213+
<p>To ease the transition of users of the library who may have been relying on those
214+
utilities, we have configured the module-info.java for the org.cicirello.jpt module to
215+
require these transitively so that your application should only need to
216+
require org.cicirello.jpt to access the functionality of those new modules.</p>
217+
</section>
218+
<section>
196219
<h3>Semantic Versioning</h3>
197220
<p>The JPT uses <a href="https://semver.org/">Semantic Versioning</a> with
198221
version numbers of the form: MAJOR.MINOR.PATCH, where differences in MAJOR

pom.xml

Lines changed: 52 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>org.cicirello</groupId>
88
<artifactId>jpt</artifactId>
9-
<version>2.2.0</version>
9+
<version>3.0.0</version>
1010
<packaging>jar</packaging>
1111

1212
<name>JavaPermutationTools</name>
@@ -172,36 +172,31 @@
172172
<scope>test</scope>
173173
<optional>true</optional>
174174
</dependency>
175+
<dependency>
176+
<groupId>org.cicirello</groupId>
177+
<artifactId>rho-mu</artifactId>
178+
<version>1.1.0</version>
179+
</dependency>
180+
<dependency>
181+
<groupId>org.cicirello</groupId>
182+
<artifactId>core</artifactId>
183+
<version>1.0.0</version>
184+
</dependency>
175185
</dependencies>
176186

177187
<properties>
178188
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
179-
<maven.compiler.source>1.8</maven.compiler.source>
180-
<maven.compiler.target>1.8</maven.compiler.target>
189+
<maven.compiler.release>11</maven.compiler.release>
181190
</properties>
182191

183192
<build>
184-
<sourceDirectory>${project.basedir}/src</sourceDirectory>
185-
<scriptSourceDirectory>${project.basedir}/src/scripts</scriptSourceDirectory>
186-
<testSourceDirectory>${project.basedir}/tests</testSourceDirectory>
187-
<resources>
188-
<resource>
189-
<directory>${project.basedir}/src/resources</directory>
190-
</resource>
191-
</resources>
192-
<testResources>
193-
<testResource>
194-
<directory>${project.basedir}/tests/resources</directory>
195-
</testResource>
196-
</testResources>
197193
<plugins>
198194
<plugin>
199195
<groupId>org.apache.maven.plugins</groupId>
200196
<artifactId>maven-compiler-plugin</artifactId>
201197
<version>3.8.1</version>
202198
<configuration>
203-
<source>1.8</source>
204-
<target>1.8</target>
199+
<release>11</release>
205200
</configuration>
206201
</plugin>
207202
<plugin>
@@ -230,21 +225,17 @@
230225
</execution>
231226
</executions>
232227
<configuration>
233-
<source>1.8</source>
234228
<failOnWarnings>true</failOnWarnings>
235229
<failOnError>true</failOnError>
236-
<additionalJOptions>
237-
<additionalJOption>--no-module-directories</additionalJOption>
238-
</additionalJOptions>
239230
<windowtitle>JavaPermutationTools - A Java library for computation on permutations</windowtitle>
240231
<doctitle>JavaPermutationTools - A Java library for computation on permutations</doctitle>
241232
<author>false</author>
242233
<version>false</version>
243234
<nosince>true</nosince>
244-
<overview>${project.build.sourceDirectory}/overview.html</overview>
245235
<notimestamp>true</notimestamp>
246236
<links>
247-
<link>https://docs.oracle.com/javase/8/docs/api</link>
237+
<link>https://rho-mu.cicirello.org/api</link>
238+
<link>https://core.cicirello.org/api</link>
248239
</links>
249240
<bottom><![CDATA[Copyright &copy; 2005-2021 <a href=\"https://www.cicirello.org/\" target=_top>Vincent A. Cicirello</a>. All rights reserved.]]></bottom>
250241
</configuration>
@@ -263,6 +254,43 @@
263254
</includes>
264255
</configuration>
265256
</plugin>
257+
<plugin>
258+
<groupId>org.apache.maven.plugins</groupId>
259+
<artifactId>maven-shade-plugin</artifactId>
260+
<version>3.2.4</version>
261+
<configuration>
262+
<shadedArtifactAttached>true</shadedArtifactAttached>
263+
<shadedClassifierName>jar-with-dependencies</shadedClassifierName>
264+
<filters>
265+
<filter>
266+
<artifact>*:*</artifact>
267+
<excludes>
268+
<exclude>module-info.class</exclude>
269+
</excludes>
270+
</filter>
271+
<filter>
272+
<artifact>org.cicirello:core</artifact>
273+
<excludes>
274+
<exclude>META-INF/MANIFEST.MF</exclude>
275+
</excludes>
276+
</filter>
277+
<filter>
278+
<artifact>org.cicirello:rho-mu</artifact>
279+
<excludes>
280+
<exclude>META-INF/MANIFEST.MF</exclude>
281+
</excludes>
282+
</filter>
283+
</filters>
284+
</configuration>
285+
<executions>
286+
<execution>
287+
<phase>package</phase>
288+
<goals>
289+
<goal>shade</goal>
290+
</goals>
291+
</execution>
292+
</executions>
293+
</plugin>
266294
</plugins>
267295
</build>
268296
</project>

0 commit comments

Comments
 (0)