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

Avoid MCOMPILER-485 in compiler plugin 3.10.0 #506

Merged
merged 1 commit into from
Feb 22, 2022

Conversation

MarkEWaite
Copy link
Contributor

@MarkEWaite MarkEWaite commented Feb 22, 2022

Avoid MCOMPILER-485 in compiler plugin 3.10.0

Maven 3.10.0 added a feature to create missing package-info files. The feature incorrectly uses Windows-style directory separators on Windows. Other parts of the code expect to always see Unix style directory separators.

Disable the new feature so that it does not break compilation. See Jenkins developer mailing list conversation for details.

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

I'm not expert enough in Maven development to create the integration test to confirm the issue is resolved. I assume it would require a Java package that does not have a package-info file and then a check on Windows that some internal path to the generated package-info file is using Windows directory separators.

Maven 3.10.0 added a feature to create missing package-info files.
The feature incorrectly uses Windows-style directory separators on
Windows.  Other parts of the code expect to always see Unix style
directory separators.

Disable the new feature so that it does not break compilation.

https://groups.google.com/g/jenkinsci-dev/c/077VYgtSLXo/m/6JQjJs7-AQAJ
@jglick
Copy link
Member

jglick commented Feb 22, 2022

Amending #504.

Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this fix the problem in git-plugin?

@jglick jglick added the bug label Feb 22, 2022
@timja
Copy link
Member

timja commented Feb 22, 2022

I see the fix is merged, @olamy will it be released soon? ❤️

@olamy
Copy link
Member

olamy commented Feb 22, 2022

I see the fix is merged, @olamy will it be released soon? ❤️

does this break Jenkins build or not? (sorry I do not have windauze to test that)
if yes simply configure the the m-c-p parameter createMissingPackageInfoClass to false (https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#createMissingPackageInfoClass)

As Jenkins is not yet build with Java 11 (neither using really soon jpms features) there is probably nothing urgent here ;)

@olamy
Copy link
Member

olamy commented Feb 22, 2022

LOL I did not even read the content of the PR but only the comment 🤣
so all good job by @MarkEWaite

@jglick
Copy link
Member

jglick commented Feb 22, 2022

@olamy any idea when apache/maven-compiler-plugin#95 will be released?

@jglick jglick merged commit ec2cef6 into jenkinsci:master Feb 22, 2022
@jglick
Copy link
Member

jglick commented Feb 22, 2022

Released this as 4.36, along with a mojo fix from @basil.

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

Successfully merging this pull request may close these issues.

4 participants