Jarviz 0.1.0 has been released!

I'm excited to announce the first Jarviz release. v0.1.0 is here! What is Jarviz you may ask, it's a brand new CLI tool that can inspect JAR files and provide insight on their contents.

I build tools as a hobby. Some of these tools require Java 8 as a baseline because consumers may not have upgraded to recent versions of Java. As such tools must ensure their dependencies are compatible and do not contain bytecode higher than 52 (Java 8). I use the EnforceBytecodeVersion rule for Maven or Gradle given the build tool of choice for a particular tool. Yet these rules only tell me when a dependency has a problem but not which classes cause trouble. If I want to know the classes that are bytecode 53 for a particular JAR I can simply type:

$ jarviz bytecode show --file that-jar-file.jar --bytecode-version 53 --details

That is if I have the JAR file already in the filesystem but if that were not to be the case then Jarviz may download the file with either of these commands:

$ jarviz bytecode show --url https://server/path/to/that-jar-file.jar --bytecode-version 53 --details
$ jarviz bytecode show --gav the-group:that-jar-file:the-version --bytecode-version 53 --details

Other times I'd like to know if a JAR has a particular manifest attribute (hello Automatic-Module-Name) and if so, which value it may have. I can download the JAR, unpack, and look at the manifest. Or I can browse in the IDE and look inside. That is, if I have already downloaded the JAR of if the JAR is already configured as a dependency. Easily done with Jarviz:

$ jarviz manifest query--gav the-group:that-jar-file:the-version --attribute-name Automatic-Module-Name

Moreover, sometimes I need to know if a JAR provides a particular service and which implementations are linked to it. Similarly as with the manifest I'd have to download, unpack, and search for files; or use the IDE.

$ jarviz services list--gav the-group:that-jar-file:the-version

Lookup. Download. Unpack. Inspect. These tasks can be automated and that's precisely what Jarviz does. All the aforementioned use cases can be realized by Jarviz. Other features will come in the future such as full validation for MR-JARs, additional inspections for modular JARs, and more.

As always, feedback is welcomed, feel free to file a ticket or start a discussion topic.

Keep on coding!

Image by Colin Behrens from Pixabay

Liked it? Take a second to support aalmiray on Patreon!
Become a patron at Patreon!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

ˆ Back To Top