Module name for Java 9+ #11

Add this line to MANIFEST.MF:

Automatic-Module-Name: com.github.f4b6a3.ulid
This commit is contained in:
Fabio Lima 2021-07-17 14:02:34 -03:00
parent 105a0c7072
commit d3277fe372
3 changed files with 39 additions and 12 deletions

View File

@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file.
## [Unreleased]
Nothing.
## [3.1.1] - 2021-07-17
### Added
- Added module name for Java 9+
## [3.1.0] - 2021-02-13
@ -32,7 +36,7 @@ Adds static methods for extracting information from ULIDs.
This version breaks compatibility. It is a rewrite from scratch.
Now the `uuid-creator` can generate two types of ULID: default (non-monotonic) and monotonic. Until version 2.3.3 this library only generated monotonic ULIDs.
Now the `ulid-creator` can generate two types of ULID: default (non-monotonic) and monotonic. Until version 2.3.3 this library only generated monotonic ULIDs.
### Added
@ -51,9 +55,9 @@ Now the `uuid-creator` can generate two types of ULID: default (non-monotonic) a
### Changed
- Rewrited `ulid-creator`
- Rewrited all `README.md`
- Rewrited all test cases
- Rewrote `UlidCreator`
- Rewrote all `README.md`
- Rewrote all test cases
### Removed
@ -65,7 +69,7 @@ Now the `uuid-creator` can generate two types of ULID: default (non-monotonic) a
- Removed class `InvalidUlidException`, replaced by `IllegalArgumentException`
- Removed interface `RandomStrategy`, replaced by `RandomGenerator`
- Removed class `DefaultRandomStrategy`, replaced by `DefaultRandomGenerator`
- Removed class `OtherRandomStrategy``
- Removed class `OtherRandomStrategy`
- Removed interface `TimestampStrategy`
- Removed class `DefaultTimestampStrategy`
- Removed class `FixedTimestampStrategy`
@ -225,7 +229,8 @@ Project created as an alternative Java implementation of [ULID spec](https://git
- Added `LICENSE`
- Added test cases
[unreleased]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-3.1.0...HEAD
[unreleased]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-3.1.1...HEAD
[3.1.0]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-3.1.0...ulid-creator-3.1.1
[3.1.0]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-3.0.1...ulid-creator-3.1.0
[3.0.1]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-3.0.0...ulid-creator-3.0.1
[3.0.0]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-2.3.3...ulid-creator-3.0.0

View File

@ -2,7 +2,7 @@
# ULID Creator
A Java library for generating [ULIDs](https://github.com/ulid/spec).
A Java library for generating [ULIDs](https://github.com/ulid/spec) (Universally Unique Lexicographically Sortable Identifier).
* Generated in lexicographical order;
* Can be stored as a UUID/GUID;
@ -35,11 +35,13 @@ Add these lines to your `pom.xml`.
<dependency>
<groupId>com.github.f4b6a3</groupId>
<artifactId>ulid-creator</artifactId>
<version>3.1.0</version>
<version>3.1.1</version>
</dependency>
```
See more options in [maven.org](https://search.maven.org/artifact/com.github.f4b6a3/ulid-creator).
Module name: `com.github.f4b6a3.ulid`.
### ULID
The ULID is a 128 bit long identifier. The first 48 bits represent the count of milliseconds since Unix Epoch, 1970-01-01. The remaining 80 bits are generated by a secure random number generator.
@ -211,7 +213,7 @@ UlidFactory factory = UlidCreator.getDefaultFactory().withRandomGenerator(awesom
Ulid ulid = factory.create();
```
(*) since it provides a void method like `nextBytes(byte[])`.
(*) as long as it provides a void method like `nextBytes(byte[])`.
Benchmark
------------------------------------------------------

24
pom.xml
View File

@ -8,7 +8,7 @@
<name>ulid-creator</name>
<url>http://github.com/f4b6a3/ulid-creator</url>
<description>A Java library for generating and handling ULIDs.</description>
<description>A Java library for generating and handling ULIDs (Universally Unique Lexicographically Sortable Identifier).</description>
<licenses>
@ -25,10 +25,11 @@
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jdk.version>8</jdk.version>
<module.name>com.github.f4b6a3.ulid</module.name>
<maven.compiler.source>${jdk.version}</maven.compiler.source>
<maven.compiler.target>${jdk.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
@ -60,6 +61,25 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>${module.name}</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>