Fix JitPack builds
Jitpack is a useful maven repository to develop against unreleased code hosted on github. The default maven version on jitpack (3.6.1) fails to build commonmark-java main with
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project commonmark-test-util: The plugin
org.apache.maven.plugins:maven-compiler-plugin:3.13.0 requires Maven version 3.6.3
These changes ensure the maven version used by jitpack is compatible with the current maven-compiler-plugin.
Jitpack builds stopped working as of 682bdb09932a4846c389e9db43eba1b857e219cd, where the compiler plugin was last updated. I've also setup a mini repro in https://github.com/nextjournal/commonmark-java-jitpack-repro to test different versions against jitpack.
Thanks! From the docs it looks like if there's a maven wrapper it will use that version: https://jitpack.io/docs/BUILDING/#maven-projects
Can you try adding maven wrapper instead of a custom configuration file? The wrapper might be useful in general.
https://github.com/commonmark/commonmark-java/pull/336/commits/0e979ef8f2fcd657214bf37fdd99aea8073068cf seems to work:
Build starting...
Start: Wed Aug 28 08:06:16 UTC 2024 db64a082563e
Git:
0e979ef
commit 0e979ef8f2fcd657214bf37fdd99aea8073068cf
Author: Andrea Amantini
Date: Wed Aug 28 10:05:02 2024 +0200
Use maven wrapper instead of configuring jitpack
Init SDKMan
Found Android manifest
Android SDK version: . Build tools:
Maven wrapper script found
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /home/jitpack/.m2/wrapper/dists/apache-maven-3.6.3/5542c391
Java version: 11.0.2, vendor: Oracle Corporation, runtime: /usr/lib/jvm/jdk-11
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "4.14.63-xxxx-std-ipv6-64", arch: "amd64", family: "unix"
Running: ./mvnw clean install -DskipTests
....
The wrapper script was generated via mvn wrapper:wrapper -Dmaven=3.6.3.
@robinst should this fix get merged, could you consider merging main into the footnotes branch(es) afterwards? That would allow testing out the new extensions before they are released.
@zampino Thanks.
could you consider merging main into the footnotes branch(es) afterwards?
Done!