Skip to content

Commit 9951638

Browse files
authored
Merge pull request #267 from ipfs-shipyard/fix/java-21
As we agreed, keep build-time requirements on LTS tools: * Java 21+ * Maven 3.9.6 (see https://maveniverse.eu/blog/2026/01/15/maven-components-and-maximum-java-bytecode/) - in reality latest patch release (as of now 3.9.12) is preferred Also document that this project classpath run time requirement is: * Java 11+
2 parents 39c25e4 + b584c7d commit 9951638

3 files changed

Lines changed: 36 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v6
18-
- name: Set up JDK 11
18+
- name: Set up JDK 21
1919
uses: actions/setup-java@v5
2020
with:
2121
distribution: temurin
22-
java-version: 11
22+
java-version: 21
2323
cache: 'maven'
2424
- name: Install and run IPFS
2525
run: ./install-run-ipfs.sh

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,15 @@ for Maven, add the following sections to your pom.xml (replacing $LATEST_VERSION
4747

4848
### Building
4949

50+
Build time requirements:
51+
* Java 21
52+
* Maven 3.9.6+ (latest patch release is recommended)
53+
5054
* Clone this repository
51-
* Run `mvn install`
55+
* Run `./mvnw install`
5256
* Copy `target/ipfs-$VERSION.jar` into your project. Appropriate versions of other [dependencies](#dependencies) are also included in `dist/lib/`.
53-
* To copy the project and all dependency JARs to directory, execute `mvn eu.maveniverse.maven.plugins:toolbox:gav-copy -DsourceSpec="resolveTransitive(gav(com.github.ipfs:java-ipfs-http-client:v1.4.5-SNAPSHOT))" -DsinkSpec="flat(.)"` in that given directory.
54-
* Run tests using `mvn test` (invocation above will run them as well).
57+
* To copy the project and all dependency JARs to directory, execute `./mvnw eu.maveniverse.maven.plugins:toolbox:gav-copy -DsourceSpec="resolveTransitive(gav(com.github.ipfs:java-ipfs-http-client:v1.4.5-SNAPSHOT))" -DsinkSpec="flat(.)"` in that given directory.
58+
* Run tests using `./mvnw test` (invocation above will run them as well).
5559

5660
### Running tests
5761

@@ -101,6 +105,9 @@ More example usage found [here](./src/main/java/io/ipfs/api/demo)
101105

102106
## Dependencies
103107

108+
Run time requirements:
109+
* Java 11+
110+
104111
Current versions of dependencies are listed in the `pom.xml`, their corresponding source repositories are:
105112

106113
* [multibase](https://github.com/multiformats/java-multibase)

pom.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,30 @@
6969

7070
<build>
7171
<plugins>
72+
<plugin>
73+
<groupId>org.apache.maven.plugins</groupId>
74+
<artifactId>maven-enforcer-plugin</artifactId>
75+
<version>3.6.2</version>
76+
<configuration>
77+
<rules>
78+
<requireMavenVersion>
79+
<version>3.9.6</version>
80+
</requireMavenVersion>
81+
<requireJavaVersion>
82+
<version>21</version>
83+
</requireJavaVersion>
84+
</rules>
85+
</configuration>
86+
<executions>
87+
<execution>
88+
<id>enforce</id>
89+
<goals>
90+
<goal>enforce</goal>
91+
</goals>
92+
<phase>validate</phase>
93+
</execution>
94+
</executions>
95+
</plugin>
7296
<plugin>
7397
<groupId>org.apache.maven.plugins</groupId>
7498
<artifactId>maven-compiler-plugin</artifactId>

0 commit comments

Comments
 (0)