Split package scanner

Tool to scan existing JAR/WAR files for split packages

Лицензия

Лицензия

Категории

Категории

Java Языки программирования Jakarta Server Pages Jakarta EE The Web Tier
Группа

Группа

org.adoptopenjdk
Идентификатор

Идентификатор

jsplitpkgscan
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

Split package scanner
Tool to scan existing JAR/WAR files for split packages
Ссылка на сайт

Ссылка на сайт

https://github.com/AdoptOpenJDK/jsplitpkgscan
Система контроля версий

Система контроля версий

https://github.com/AdoptOpenJDK/jsplitpkgscan

Скачать jsplitpkgscan

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.adoptopenjdk/jsplitpkgscan/ -->
<dependency>
    <groupId>org.adoptopenjdk</groupId>
    <artifactId>jsplitpkgscan</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.adoptopenjdk/jsplitpkgscan/
implementation 'org.adoptopenjdk:jsplitpkgscan:1.0.0'
// https://jarcasting.com/artifacts/org.adoptopenjdk/jsplitpkgscan/
implementation ("org.adoptopenjdk:jsplitpkgscan:1.0.0")
'org.adoptopenjdk:jsplitpkgscan:jar:1.0.0'
<dependency org="org.adoptopenjdk" name="jsplitpkgscan" rev="1.0.0">
  <artifact name="jsplitpkgscan" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.adoptopenjdk', module='jsplitpkgscan', version='1.0.0')
)
libraryDependencies += "org.adoptopenjdk" % "jsplitpkgscan" % "1.0.0"
[org.adoptopenjdk/jsplitpkgscan "1.0.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

OpenJDK split package scanner

GNU General Public License, version 2, with the Classpath Exception Supported Versions Build Status Maven Central

This project contains a proposal for OpenJDK split package scanner addition.

The diving force starting this tool was the lack of tooling to prepare existing class path based modules for later migration to modules. For split packages with the current JDK, they will be shown by the jdeps tool as of today, but not class path based modules so far.

The jsplitpgkscan utility will search for split packages within all given .jar files and the modules known to the JDK itself and report them.

Build and run

To build the tool you need to have a actual JDK build that you can get from https://jdk.java.net/12, https://adoptopenjdk.net or other providers. Make sure that you have at least version jdk-12 installed.

To build use:

./gradlew clean build

After the build was sucessful you can now start it using:

java -p build/libs -m jsplitpkgscan

The usage is as follows

Usage: jsplitpkgscan <options> <path ...>]
<path> can be a pathname to a JAR/WAR/RAR file or exploded JAR/WAR/RAR file.
Possible options include:
  -h -? --help                  Print this usage message
  -a                            Report all packages for each found JAR/RAR/WAR
                                file or exploded directory
  -d <directory>                Directory containing JAR/RAR/WAR files or
                                exploded directories to scan
                                (scans subdirectories as well)
  -f <file>                     File containing a list of JAR/RAR/WAR files
                                or exploded directories to scan
  -p <package prefix>           Package prefix to report only split packages
                                that matches this prefix
  --dot-output <dir>            Destination directory for DOT file output

In order to create your own distribution using jlink you can enter the following command if you have JAVA_HOME set:

$JAVA_HOME/bin/jlink --module-path $JAVA_HOME/jmods:build/libs --add-modules jsplitpkgscan \
  --launcher jsplitpkgscan=jsplitpkgscan --output /tmp/jsplitpkgscan

For using the tool from inside you’re code, you can access it looking it up a an java.util.spi.ToolProvider implementation as follows:

int rc = ToolProvider.findFirst("jsplitpgkscan")
                     .ifPresent(tool -> tool.run(System.out, System.err, "-h")

Create DOT graphic

To get a .png graphic for any .dot file output for directed graphs you could use:

dot -Tpng summary.dot -O -Gratio=0.5

If your experience problems due undirected graphs you could also use this command:

twopi -Tpng summary.dot -O -Gratio=0.5 -Goverlap=false

Contribute

Contributions are always welcome.

License

org.adoptopenjdk

AdoptOpenJDK

The Community and code behind the Build Farm which produces high quality, FREE OpenJDK (Java) binaries.

Версии библиотеки

Версия
1.0.0