Jsrlib is a software library that acts as a librarian for Java Specification Requests (JSRs). It can answer questions like:
- which JSRs specify a given Java package or class?
- which Java package names are specified by JSRs?
- which JSRs are part of Java EE 7?
Jsrlib runs queries against local data (JsrData.json, JsrMetadata.json) and performs downloads by screen scraping https://www.jcp.org.
mvn package
export CLASSPATH="target/classes:target/test-classes:$(mvn dependency:build-classpath | grep -v '^\[')"
List JSRs that specify a given package:
java org.secnod.jsr.cli.Tool query package javax.ws.rs
Then download it:
java org.secnod.jsr.cli.Tool download jsr 370 .
./JSR-370-jaxrs2_1finalspec.pdf
List all variants of JSR 318:
java org.secnod.jsr.cli.Tool list jsr 318
Then download the interceptors variant:
java org.secnod.jsr.cli.Tool download jsr 318-interceptors .
./JSR-318-interceptors-Intercept.pdf
For help on further usage:
java org.secnod.jsr.cli.Tool
The screen scraper downloads JSRs licensed for evalutation. It does not display the license agreement for the JSRs at https://www.jcp.org.
It is the responsibility of users to familarize themselves with the licensing options of the JSRs they download using this software.
Only a subset of all JSRs have data in JsrData.json.
JSRs are identified by (number, variant?) where the variant is optional.
Examples:
But a JSR should be indentified by (number, variant?, release?) where variant and release are optional.
Examples:
- JSR 154 is specifies both Servlet API 2.4 for J2EE 1.4 in its Final Release and Servlet API 2.5 for JavaEE 5 in its Maintenance Release.
- JSR 907 specifies multiple
versions of Java Transaction API:
- 1.2 for Java EE 7 and Java EE 8
- 1.1 for Java EE 5 and Java EE 6
- 1.0.1B, 1.0.1 and 1.0.1a for J2EE
Currently Jsrlib picks the latest final or maintenance release of a JSR.
Jsrlib has no knowledge of JavaEE profiles. For instance, in JavaEE 6, the web profile only includes a subset of the EJB functionality specified in JSR 318 as "EJB 3.1 Lite".
See https://en.wikipedia.org/wiki/Java_Platform%2C_Enterprise_Edition#Web_profile for an overview of the web profiles.
mvn -DskipITs=false verify