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

JitPack build for main failed #51

Closed
bpieber opened this issue Nov 23, 2022 · 8 comments
Closed

JitPack build for main failed #51

bpieber opened this issue Nov 23, 2022 · 8 comments

Comments

@bpieber
Copy link

bpieber commented Nov 23, 2022

I would like to use the latest code in the main branch in a Maven project. I tried to get it from https://jitpack.io/#petitparser/java-petitparser using the following in pom.xlm

    <repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>com.github.petitparser</groupId>
            <artifactId>java-petitparser</artifactId>
            <version>main-SNAPSHOT</version>
        </dependency>
    </dependencies>

However, I get the following error:
[ERROR] Failed to execute goal on project learning-petitparser: Could not resolve dependencies for project com.modelligent:learning-petitparser:jar:1.0.0-SNAPSHOT: Could not find artifact com.github.petitparser:java-petitparser:jar:main-1f87c1e664-1 in jitpack.io (https://jitpack.io) -> [Help 1]

It looks like the last build ran into a failure:
https://jitpack.io/com/github/petitparser/java-petitparser/main-1f87c1e664-1/build.log

Cheers,
Bernhard

@bpieber
Copy link
Author

bpieber commented Nov 23, 2022

I cloned petitparser/java-petitparser and ran mvn clean install locally. As I expected I got a BUILD SUCCESS result. I use Apache Maven 3.8.1 bundled with IntelliJ. JitPack used 3.6.1 for its build.

Here is the error message from the build.log:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project petitparser-core: Fatal error compiling: invalid flag: --release -> [Help 1]

FWIW, googling brought up this:
https://stackoverflow.com/questions/49105941/intellij-maven-project-fatal-error-compiling-invalid-flag-release

Reading this, maybe JitPack needs to be told somehow to use Java 11? It used Java 8 for the build. However, as you may have noted, I am somewhat out of my depth here.

Cheers,
Bernhard

@bpieber
Copy link
Author

bpieber commented Nov 23, 2022

Maybe it is a general JitPack problem?
jitpack/jitpack.io#5301

Cheers,
Bernhard

@renggli
Copy link
Member

renggli commented Jun 3, 2024

I've increased the JavaSDK version to 8 and then 17, but now there is a different error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.7.0:jar (attach-javadocs) on project petitparser: The plugin org.apache.maven.plugins:maven-javadoc-plugin:3.7.0 requires Maven version 3.6.3 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginIncompatibleException

@vintaerj
Copy link

No updates about this issue ?

@renggli
Copy link
Member

renggli commented Jul 15, 2024

I am not familiar with Maven or JitPack, happy to merge a pull request if somebody has an idea how to fix the issue?

@ScottiSws
Copy link
Contributor

ScottiSws commented Oct 26, 2024

Sorry for the duplicate issue. I hope I can make it up to you with a pull request for your main branch that fixes it. I added Maven Wrapper so you can now choose the version of Maven to build with.

#77

You can see the working version here.
https://jitpack.io/#ScottiSws/java-petitparser

@renggli
Copy link
Member

renggli commented Oct 26, 2024

It looks like the wrapper fixes this. Thank you!

@renggli renggli closed this as completed Oct 26, 2024
@ScottiSws
Copy link
Contributor

You're very welcome.

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

No branches or pull requests

4 participants