https://github.com/elide-dev/jpms
JPMS libraries and repository
https://github.com/elide-dev/jpms
java java-modules jpms
Last synced: 12 days ago
JSON representation
JPMS libraries and repository
- Host: GitHub
- URL: https://github.com/elide-dev/jpms
- Owner: elide-dev
- License: apache-2.0
- Created: 2024-03-08T00:33:25.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-16T21:19:47.000Z (17 days ago)
- Last Synced: 2025-04-20T09:44:03.625Z (13 days ago)
- Topics: java, java-modules, jpms
- Language: XML
- Homepage: https://jpms.pkg.st
- Size: 337 MB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: .github/SECURITY.md
- Governance: .github/GOVERNANCE.md
Awesome Lists containing this project
README
![]()
![]()
![]()
![]()
![]()
![]()
# JPMS Attic Repository
> Latest Release: `1.0.9`
- [GitHub Repo](https://github.com/javamodules/attic)
- [Docs](https://javamodules.dev)This repository provides sub-module library overrides for popular Java libraries which don't yet provide JPMS support
(at least until some PRs are merged!). There is a Maven repository which contains these artifacts, too, so you can
safely use them in your projects.#### Pending PRs
Tracking issue [here][6] provides the best tracker. Once these PRs are merged and changes are released, this repo
becomes obsolete.### What's in the box?
- **[`com.google.errorprone`][2]:** **Error Prone Compiler** "is a static analysis tool for Java that catches common
programming mistakes at compile time," built by Google. Error Prone's annotations module is JPMS-enabled at the
embedded sub-module, and is used by Guava. The [PR enabling JPMS support in Error Prone Annotations][3] has been
filed, merged, and released, as [`2.26.1`](https://github.com/google/error-prone/releases/tag/v2.26.1).- **[`com.google.guava`][11]:** **Google Guava** is Google's core Java commons, used throughout Google's code and the
wider JVM ecosystem. Guava is an immensely popular artifact, with tons of fantastic utilities. JPMS support is [in
draft][12].- **[`com.google.j2objc`][4]:** **J2ObjC** is a Java to Objective-C cross-compiling layer used by Google to effectively
share Java logic on iOS and macOS platforms. J2ObjC itself is very complex and powerful, but here we have just
JPMS-enabled the `annotations` module, which is used by Guava. The [PR enabling JPMS support for J2ObjC
annotations][5] has been filed, merged, and released as
[`3.0.0`](https://github.com/google/j2objc/commit/a883dd3f90d51d5ccad4aa3af8feaaeed6560109).- **[`com.google.protobuf`][4]:** **Protocol Buffers** (a.k.a., protobuf) are Google's language-neutral,
platform-neutral, extensible mechanism for serializing structured data. JPMS support is [in draft][17].- **[`io.leangen.geantyref`][18]:** **Geantyref** is a fork of the excellent GenTyRef library, adding support for
working with AnnotatedTypes introduced in Java 8 plus many nifty features. JPMS support has been [proposed][19], but
not yet merged or released.- **[`kotlinx.collections.immutable`][20]:** **KotlinX Immutable Collections** is a library provided as part of the
_Kotlin Extensions_ suite, maintained by the JetBrains team. It provides immutable and persistent collection types in
Kotlin. JPMS support is in [draft][21], but not yet merged or released.- **[`org.apache.maven.resolver`][22]:** **Maven Resolver** is how Maven and many other build tools resolve graphs of
dependencies, and perform downloads of dependency artifacts. JPMS support is in early draft; no PR has been filed yet.- **[`org.checkerframework`][0]:** **Checker Framework** is a type-checking framework for Java. The `checker-qual`
package is used by Guava, so it is included here transitively. Checker Framework added a JPMS module definition in a
[recent PR][1], so this is sub-moduled at `master`. At the time of this writing no release has taken place.- **[`org.reactivestreams`][16]:** **Reactive Streams** is a universal JVM API for building reactive software in an
implementation-agnostic manner.### How do I use it?
Add this domain as a repository within any JVM build tool: [Maven][7], [Gradle][8], [Bazel][9], [sbt][10]. For example:
> [!NOTE]
> **Filing issues:** Please file issues for this repo on [`elide-dev/jpms`](https://github.com/elide-dev/jpms/issues).#### Maven
**In a `pom.xml`:**
```xml
jpms-attic
JPMS Attic
https://jpms.pkg.st/repository
```
**In a `settings.xml`:**
```xml
jpms-attic
true
pkgst-jpms
Pkgst JPMS
https://jpms.pkg.st/repository
```
#### Gradle
##### Groovy
```groovy
repositories {
maven {
url "https://jpms.pkg.st/repository"
}
}
```##### Kotlin
```kotlin
repositories {
maven {
url = uri("https://jpms.pkg.st/repository")
}
}
```### Libraries
You should use a JPMS-enabled library version which has no conflict with Maven Central. Reference the table below to
pick a library.**Libraries marked `Central` have seen releases in Maven Central,** and so are no longer needed through this repository.
| Coordinate | Version |
| -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `com.google.errorprone:error_prone_annotations` |  |
| `com.google.guava:guava` |  |
| `com.google.j2objc:j2objc-annotations` |  |
| `com.google.protobuf:protobuf-java` |  |
| `com.google.protobuf:protobuf-javalite` |  |
| `com.google.protobuf:protobuf-util` |  |
| `com.google.protobuf:protobuf-kotlin` |  |
| `com.google.protobuf:protobuf-kotlin-lite` |  |
| `io.leangen.geantyref:geantyref` |  |
| `org.apache.maven.resolver:maven-resolver-api` |  |
| `org.apache.maven.resolver:maven-resolver-connector-basic` |  |
| `org.apache.maven.resolver:maven-resolver-generator-gnupg` |  |
| `org.apache.maven.resolver:maven-resolver-impl` |  |
| `org.apache.maven.resolver:maven-resolver-named-locks` |  |
| `org.apache.maven.resolver:maven-resolver-spi` |  |
| `org.apache.maven.resolver:maven-resolver-transport-classpath` |  |
| `org.apache.maven.resolver:maven-resolver-transport-file` |  |
| `org.apache.maven.resolver:maven-resolver-transport-jdk` |  |
| `org.apache.maven.resolver:maven-resolver-transport-jetty` |  |
| `org.apache.maven.resolver:maven-resolver-util` |  |
| `org.checkerframework:checker-qual` |  |
| `org.jetbrains.kotlinx:kotlinx-collections-immutable` |  |
| `org.reactivestreams:reactive-streams` |  |### Using the modules
Use the modules in your `module-info.java`:
| Coordinate | Module |
| -------------------------------------------------------------- | ----------------------------------------------- |
| `com.google.errorprone:error_prone_annotations` | `com.google.errorprone.annotations` |
| `com.google.guava:guava` | `com.google.common` |
| `com.google.j2objc:j2objc-annotations` | `com.google.j2objc.annotations` |
| `com.google.protobuf:protobuf-java` | `com.google.protobuf` |
| `com.google.protobuf:protobuf-javalite` | `com.google.protobuf` |
| `com.google.protobuf:protobuf-util` | `com.google.protobuf.util` |
| `com.google.protobuf:protobuf-kotlin` | `com.google.protobuf.kotlin` |
| `com.google.protobuf:protobuf-kotlin-lite` | `com.google.protobuf.kotlin` |
| `io.leangen.geantyref:geantyref` | `io.leangen.geantyref` |
| `org.apache.maven.resolver:maven-resolver-api` | `org.apache.maven.resolver` |
| `org.apache.maven.resolver:maven-resolver-connector-basic` | `org.apache.maven.resolver.connector.basic` |
| `org.apache.maven.resolver:maven-resolver-generator-gnupg` | `org.apache.maven.resolver.generator.gnupg` |
| `org.apache.maven.resolver:maven-resolver-impl` | `org.apache.maven.resolver.impl` |
| `org.apache.maven.resolver:maven-resolver-named-locks` | `org.apache.maven.resolver.named` |
| `org.apache.maven.resolver:maven-resolver-spi` | `org.apache.maven.resolver.spi` |
| `org.apache.maven.resolver:maven-resolver-transport-classpath` | `org.apache.maven.resolver.transport.classpath` |
| `org.apache.maven.resolver:maven-resolver-transport-file` | `org.apache.maven.resolver.transport.file` |
| `org.apache.maven.resolver:maven-resolver-transport-jdk` | `org.apache.maven.resolver.transport.jdk` |
| `org.apache.maven.resolver:maven-resolver-transport-jetty` | `org.apache.maven.resolver.transport.jetty` |
| `org.apache.maven.resolver:maven-resolver-util` | `org.apache.maven.resolver.util` |
| `org.checkerframework:checker-qual` | `org.checkerframework.checker.qual` |
| `org.jetbrains.kotlinx:kotlinx-collections-immutable` | `kotlinx.collections.immutable` |
| `org.reactivestreams:reactive-streams` | `org.reactivestreams` |> By and large, where a module already had an `Automatic-Module-Name`, it has been preserved.
### BOMs & Catalogs
This repository additionally provides [Maven BOM][13], [Gradle Version Catalog][14], and [Gradle Platform][15]
artifacts. These simplify and enforce the use of the right library versions. See below for use.| Type | Coordinate | Version |
| --------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Maven BOM][13] | `dev.javamodules:jpms-bom` |  |
| [Gradle Catalog][14] | `dev.javamodules:jpms-catalog` |  |
| [Gradle Platform][15] | `dev.javamodules:jpms-platform` |  |#### Using the Version Catalog
To use the version catalog from Gradle, follow the setup steps below. These code samples are provided in Kotlin:
**`settings.gradle.kts`**:
```kotlin
dependencyResolutionManagement {
repositories {
mavenCentral()maven {
name = "jpms-attic"
url = uri("https://jpms.pkg.st/repository")
}
}versionCatalogs {
create("attic") {
from("dev.javamodules:jpms-catalog:1.0.9")
}
}
}
```**`build.gradle.kts`**:
```kotlin
dependencies {
api(attic.guava)
}
```#### Using the Gradle Platform
To use the Gradle Platform to constrain your versions, map the repository as usual, then:
```kotlin
dependencies {
api(platform("dev.javamodules:jpms-platform:1.0.9"))
}
```The Version Catalog also provides a mapping:
```kotlin
dependencies {
api(platform(attic.javamodules.platform))
}
```### Limitations
This repo does not currently publish source or javadoc JARs. It's not that it couldn't, it's just that mounting
classifier-equipped JARs in local repositories is annoying.### Sample Projects
Sample projects are provided in the [samples](./samples) directory, which show how to hook up the repository and
override libraries.### Coming soon
Future badges

### Licensing
This repo is open source, licensed under [Apache 2.0](./LICENSE.txt). The libraries listed in this repo may have their
own licenses; it is up to you to comply with these. These libraries are only published here for the purpose of early
testing and development against new code; no warranty is provided of any kind.[0]: https://github.com/typetools/checker-framework
[1]: https://github.com/typetools/checker-framework/pull/6326
[2]: https://github.com/sgammon/error-prone
[3]: https://github.com/google/error-prone/pull/4311
[4]: https://github.com/google/j2objc
[5]: https://github.com/google/j2objc/pull/2302
[6]: https://github.com/elide-dev/jpms/issues/1
[7]: https://maven.apache.org/guides/mini/guide-multiple-repositories.html
[8]: https://docs.gradle.org/current/userguide/declaring_repositories.html
[9]: https://github.com/bazelbuild/rules_jvm_external/blob/master/docs/api.md#maven_install-repositories
[10]: https://www.scala-sbt.org/1.x/docs/Resolvers.html
[11]: https://github.com/google/guava
[12]: https://github.com/sgammon/guava/pull/14
[13]: https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#bill-of-materials-bom-poms
[14]: https://docs.gradle.org/current/userguide/platforms.html
[15]: https://docs.gradle.org/current/userguide/dependency_version_alignment.html
[16]: https://github.com/reactive-streams/reactive-streams-jvm
[17]: https://github.com/protocolbuffers/protobuf/pull/16178
[18]: https://github.com/leangen/geantyref
[19]: https://github.com/leangen/geantyref/pull/29
[20]: https://github.com/Kotlin/kotlinx.collections.immutable
[21]: https://github.com/Kotlin/kotlinx.collections.immutable/pull/175
[22]: https://maven.apache.org/resolver/