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

Unable to run mvn incrementals command #3711

Closed
ravin-accelq opened this issue Aug 10, 2023 · 8 comments
Closed

Unable to run mvn incrementals command #3711

ravin-accelq opened this issue Aug 10, 2023 · 8 comments

Comments

@ravin-accelq
Copy link

ravin-accelq commented Aug 10, 2023

Service(s)

Incrementals

Summary

Hi,I'm not able to run mvn incrementals command, here is the link to POM file: https://github.com/jenkinsci/accelq-ci-connect-plugin/blob/main/pom.xml

Error message: Failed to execute goal io.jenkins.tools.incrementals:incrementals-maven-plugin:1.2:incrementalify (default-cli) on project accelq-ci-connect: Execution default-cli of goal io.jenkins.tools.incrementals:incrementals-maven-plugin:1.2:incrementalify failed.: NullPointerException -> [Help 1]

Reproduction steps

No response

@ravin-accelq ravin-accelq added the triage Incoming issues that need review label Aug 10, 2023
@dduportal dduportal added this to the infra-team-sync-2023-08-22 milestone Aug 10, 2023
@dduportal dduportal removed the triage Incoming issues that need review label Aug 10, 2023
@dduportal dduportal self-assigned this Aug 10, 2023
@dduportal
Copy link
Contributor

cc @olamy for info as you might be suffering from the same issue (or not?).

The infra team is looking into this, thanks for reporting!

@jenkins-infra jenkins-infra deleted a comment from lemeurherveCB Aug 10, 2023
@dduportal
Copy link
Contributor

Hi @accelq , just to be sure: did you follow each step described in https://www.jenkins.io/doc/developer/tutorial-improve/enable-incrementals/ ?

If yes, can you share the commands you type (so we could try reproducing your error)?

@MarkEWaite
Copy link

@accelq I see the same null pointer exception when I try to run mvn incrementals:incrementalify on your repository. That likely indicates a bug in the incrementals plugin for maven. That's not an infrastructure issue. I recommend closing this infrastructure issue or moving it to the incrementals tools repository.

However, your repository is attempting to support Jenkins versions as old as Jenkins 2.222.3 and is using Java 8. The Jenkins project dropped support for Java 8 a year ago. The Jenkins project provides security fixes for the most recent LTS (currently 2.401.3) and the most recent weekly (currently 2.418). Both those versions require Java 11 and support Java 17. Jenkins tooling generally requires Java 11 and a minimum Jenkins version of 2.361.4.

I will be surprised if you're able to use the current Jenkins tooling (like incrementals) with a plugin that is trying to support Java 8 and Jenkins versions that are many years out of date. It may work, but you're much more likely to succeed if you modernize your plugin first, then attempt to use modern features like incrementals and continuous delivery. If you want to take the modernization even further, you can see more suggestions in the Contributing to Open Source google doc.

@dduportal dduportal removed their assignment Aug 16, 2023
@ravin-accelq
Copy link
Author

hi, I've updated the plugin, using the modernize steps. I've raised ticket in incrementals repo jenkinsci/incrementals-tools#73

Still seeing the same issue, will wait for their reply

@dduportal
Copy link
Contributor

I've tried and I can reproduce the error with a JDK11 on my laptop.

If I switch to a JDK 17, I got the following error:

[ERROR] Failed to execute goal io.jenkins.tools.incrementals:incrementals-maven-plugin:1.7:incrementalify (default-cli) on project accelq-ci-connect: Execution default-cli of goal io.jenkins.tools.incrementals:incrementals-maven-plugin:1.7:incrementalify failed: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null -> [Help 1]

@timja
Copy link
Member

timja commented Aug 16, 2023

ah there's an old bug in maven-compiler-plugin that just gives a nullpointer in certain edge cases.
you get the proper error on Java 17 like you found

dduportal added a commit to dduportal/accelq-ci-connect-plugin that referenced this issue Aug 16, 2023
…ilds - jenkins-infra/helpdesk#3711

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
@dduportal
Copy link
Contributor

Hello @accelq you got a PR: jenkinsci/accelq-ci-connect-plugin#17 to fix this issue.

It feels like the documentation at https://www.jenkins.io/doc/developer/tutorial-improve/enable-incrementals/ could be updated to provides the requirements, would you be willing to add it (I would but I'm alone maintaining the Jenkins infra this week so any help is welcome)

@ravin-accelq
Copy link
Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants