Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JitPack builds #336

Merged
merged 2 commits into from
Sep 6, 2024
Merged

Fix JitPack builds #336

merged 2 commits into from
Sep 6, 2024

Conversation

zampino
Copy link
Contributor

@zampino zampino commented Aug 27, 2024

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 682bdb0, 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.

The default maven version on jitpack (3.6.1) fails to build
commonmark-java 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
@robinst
Copy link
Collaborator

robinst commented Aug 27, 2024

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.

script generated with 'mvn wrapper:wrapper -Dmaven=3.6.3'
@zampino
Copy link
Contributor Author

zampino commented Aug 28, 2024

0e979ef 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.

@zampino
Copy link
Contributor Author

zampino commented Aug 29, 2024

@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.

@robinst robinst merged commit 591b452 into commonmark:main Sep 6, 2024
5 checks passed
@robinst
Copy link
Collaborator

robinst commented Sep 6, 2024

@zampino Thanks.

could you consider merging main into the footnotes branch(es) afterwards?

Done!

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants