Skip to content

Commit

Permalink
Merge in useful parts from #115 (contributed by @divinenickname)
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jun 30, 2024
1 parent 4bd4b29 commit 093c702
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,17 @@ Maven coordinates are:
<dependency>
<groupId>com.fasterxml.uuid</groupId>
<artifactId>java-uuid-generator</artifactId>
<version>5.0.0</version>
<version>5.1.0</version>
</dependency>
```


Gradle:

```groovy
implementation 'com.fasterxml.uuid:java-uuid-generator:5.1.0'
```

#### Third-party Dependencies by JUG

The only dependency for JUG is the logging library:
Expand Down Expand Up @@ -150,25 +157,25 @@ it is rather slower than JUG version: for more information, read
JUG jar built under `target/`:

```
target/java-uuid-generator-5.0.0-SNAPSHOT.jar
target/java-uuid-generator-5.1.0-SNAPSHOT.jar
```

can also be used as a simple Command-line UUID generation tool.

To see usage you can do something like:

java -jar target/java-uuid-generator-5.0.0-SNAPSHOT.jar
java -jar target/java-uuid-generator-5.1.0-SNAPSHOT.jar

and get full instructions, but to generate 5 Random-based UUIDs, you would use:

java -jar target/java-uuid-generator-5.0.0-SNAPSHOT.jar -c 5 r
java -jar target/java-uuid-generator-5.1.0-SNAPSHOT.jar -c 5 r

(where `-c` (or `--count`) means number of UUIDs to generate, and `r` means Random-based version)

NOTE: this functionality is included as of JUG 4.1 -- with earlier versions you would need a bit longer invocation as Jar metadata did not specify "Main-Class".
If so, you would need to use

java -cp target/java-uuid-generator-5.0.0-SNAPSHOT.jar com.fasterxml.uuid.Jug -c 5 r
java -cp target/java-uuid-generator-5.1.0-SNAPSHOT.jar com.fasterxml.uuid.Jug -c 5 r

## Compatibility

Expand Down
4 changes: 3 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,14 @@ https://stackoverflow.com/questions/37958104/maven-javadoc-no-source-files-for-p
<Export-Package>
com.fasterxml.uuid;version="${project.version}",
com.fasterxml.uuid.ext;version="${project.version}",
com.fasterxml.uuid.impl;version="${project.version}"
com.fasterxml.uuid.impl;version="${project.version}",
com.fasterxml.uuid.jug;version="${project.version}"
</Export-Package>
<Import-Package>
com.fasterxml.uuid;version="[${project.version},${project.version}]",
com.fasterxml.uuid.ext;version="[${project.version},${project.version}]",
com.fasterxml.uuid.impl;version="[${project.version},${project.version}]",
com.fasterxml.uuid.jug;version="[${project.version},${project.version}]",
org.slf4j;version="[${slf4j.version},2)"
</Import-Package>
<Private-Package />
Expand Down

0 comments on commit 093c702

Please sign in to comment.