question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JitPack fails building Pioneer: "invalid flag: -Xlint:all,-exports"

See original GitHub issue

JitPack fails building Pioneer (v1.7.1), from the build log:

Build starting...
Start: Thu Oct 6 19:51:58 UTC 2022 8b68c77c4f3c
Git:
v1.7.1-0-g6a7a129
commit 6a7a129abc53a5670137e9f0e74b673ce59376be
Author: Mihály Verhás 
Date:   Tue May 24 17:48:10 2022 +0200

    Small fixes for Sonar (#640)
    

Init SDKMan
Found gradle
Gradle build script
Found gradle version: 7.4.
Using gradle wrapper
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Downloading https://services.gradle.org/distributions/gradle-7.4-bin.zip
.10%.20%.30%.40%.50%.60%.70%.80%.90%.100%

------------------------------------------------------------
Gradle 7.4
------------------------------------------------------------

Build time:   2022-02-08 09:58:38 UTC
Revision:     f0d9291c04b90b59445041eaa75b2ee744162586

Kotlin:       1.5.31
Groovy:       3.0.9
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          1.8.0_292 (Private Build 25.292-b10)
OS:           Linux 4.14.63-xxxx-std-ipv6-64 amd64

0m3.857s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~16.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)
Getting tasks: ./gradlew tasks --all
Tasks: publishToMavenLocal,
Found javadoc task
Running: ./gradlew clean -Pgroup=com.github.junit-pioneer -Pversion=v1.7.1 -xtest assemble publishToMavenLocal
> Task :buildSrc:compileJava NO-SOURCE
> Task :buildSrc:compileGroovy NO-SOURCE
> Task :buildSrc:processResources NO-SOURCE
> Task :buildSrc:classes UP-TO-DATE
> Task :buildSrc:jar
> Task :buildSrc:assemble
> Task :buildSrc:compileTestJava NO-SOURCE
> Task :buildSrc:compileTestGroovy NO-SOURCE
> Task :buildSrc:processTestResources NO-SOURCE
> Task :buildSrc:testClasses UP-TO-DATE
> Task :buildSrc:test NO-SOURCE
> Task :buildSrc:check UP-TO-DATE
> Task :buildSrc:build
Maven publication 'maven' pom metadata warnings (silence with 'suppressPomMetadataWarningsFor(variant)'):
  - Variant jacksonApiElements:
      - Declares capability org.junit-pioneer:junit-pioneer-jackson:v1.7.1 which cannot be mapped to Maven
  - Variant jacksonRuntimeElements:
      - Declares capability org.junit-pioneer:junit-pioneer-jackson:v1.7.1 which cannot be mapped to Maven
These issues indicate information that is lost in the published 'pom' metadata file, which may be an issue if the published library is consumed by an old Gradle version or Apache Maven.
The 'module' metadata file, which is used by Gradle 6+ is not affected.
> Task :clean
> Task :generateModuleInfo
> Task :addDependenciesModuleInfo
> Task :compileJava FAILED
6 actionable tasks: 6 executed
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> invalid flag: -Xlint:all,-exports

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 13s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Archive: org.junit-pioneer:junit-pioneer:unspecified
Publication: org.junit-pioneer:junit-pioneer:unspecified
Build tool exit code: 0
Looking for artifacts...
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Looking for pom.xml in build directory and ~/.m2
Found artifact: org.junit-pioneer:junit-pioneer:unspecified
2022-10-06T19:53:03.067307525Z
Exit code: 0

⚠️ ERROR: No build artifacts found
Expected artifacts in: $HOME/.m2/repository/org/junit-pioneer/junit-pioneer/unspecified

I assume this is because we are building with 11 (targeting 8), whereas JitPack is using 8, which doesn’t know the Xlint key exports.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
nipafxcommented, Nov 8, 2022

@beatngu13 Should we not configure JitPack to run the modular build?

0reactions
beatngu13commented, Oct 9, 2022

JitPack allows user to use unpublished (in terms of Maven Central) Jupiter versions, such as a specific branch or commit, without checking out the project and building it locally. In the past, we were trying to make JitPack work, too (e.g. #482).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sign artifacts conditionally · Issue #482 · junit-pioneer ... - GitHub
This is because publishToMavenLocal fails as it tries to sign the artifacts ... JitPack fails building Pioneer: "invalid flag: -Xlint:all ...
Read more >
Xlint:unchecked to my Android Gradle based project?
This is what worked for me: (in your project's build.gradle) allprojects { gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.
Read more >
FAQ - JitPack.io
Possible reasons: 1. 404 - File not found. Build failed, tag does not exist or there is no such file in build artifacts....
Read more >
Problem using JavaCompile compiler arg Xstdout - Old Forum
Task: Using the Gradle Java Plugin I want to redirect all java ... This resulted in an error message “invalid flag: -Xstdout” with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found