Skip to content

[MJARSIGNER-65][MJARSIGNER-66][MJARSIGNER-67] Update parent POM to 39, Java minimum to 1.8, maven minimum to 3.2.5#2

Closed
elharo wants to merge 3 commits into
masterfrom
39
Closed

[MJARSIGNER-65][MJARSIGNER-66][MJARSIGNER-67] Update parent POM to 39, Java minimum to 1.8, maven minimum to 3.2.5#2
elharo wants to merge 3 commits into
masterfrom
39

Conversation

@elharo

@elharo elharo commented Apr 8, 2023

Copy link
Copy Markdown

This project had gotten quite far behind so this ended up pulling in a lot of other upgrades too.

@elharo elharo requested a review from michael-o April 8, 2023 18:00
@elharo elharo added dependencies Pull requests that update a dependency file security labels Apr 8, 2023
@slachiewicz

Copy link
Copy Markdown
Member

missing jira

|| endsWithIgnoreCase( entryName, ".RSA" ) || endsWithIgnoreCase( entryName, ".EC" );
protected static boolean isSignatureFile(String entryName) {
if (entryName.regionMatches(true, 0, "META-INF", 0, 8)) {
entryName = entryName.replace('\\', '/');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This replacement is invalid, it should be dropped.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Please file an issue for that. These lines are changing only because parent pom 39 requires reformatting. Byte code should be identical.

entryName = entryName.replace( '\\', '/' );
protected static boolean isManifestFile(String entryName) {
if (entryName.regionMatches(true, 0, "META-INF", 0, 8)) {
entryName = entryName.replace('\\', '/');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

ditto

Comment thread pom.xml
<surefire.version>2.21.0</surefire.version>
<mavenVersion>3.0</mavenVersion>
<javaVersion>7</javaVersion>
<mavenVersion>3.2.5</mavenVersion>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In will be good to have changing Maven version and JDK requirement in separate change with separate issue.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I can expand the issue, but it's not really possible. Changing the parent pom required changing a bunch of other things.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

java version upgrade must be separate issue

@elharo elharo changed the title Update parent POM to 39 [MJARSIGNER-65] Update parent POM to 39 Apr 8, 2023
@elharo

elharo commented Apr 8, 2023

Copy link
Copy Markdown
Author

JIRA added

@elharo

elharo commented Apr 8, 2023

Copy link
Copy Markdown
Author

I can file another issue but it has to be one PR.

@elharo elharo changed the title [MJARSIGNER-65] Update parent POM to 39 [MJARSIGNER-65][MJARSIGNER-66} Update parent POM to 39, Java minimum to 1.8, maven minimum to 3.2.5 Apr 8, 2023
@elharo elharo changed the title [MJARSIGNER-65][MJARSIGNER-66} Update parent POM to 39, Java minimum to 1.8, maven minimum to 3.2.5 [MJARSIGNER-65][MJARSIGNER-66] Update parent POM to 39, Java minimum to 1.8, maven minimum to 3.2.5 Apr 8, 2023
@slachiewicz

Copy link
Copy Markdown
Member

Missing Jira in commit message - not only in PR header. We add one commit to change pom, one another to reformat and then another to ignore formatting.
Squash will merge all commits i to one and You will not be able to distinguish planned changes to formatting

@elharo

elharo commented Apr 9, 2023

Copy link
Copy Markdown
Author

Reformatting is, perhaps unfortunately, a fundamental and unavoidable part of the upgrade to parent pom 39 due to the way the new parent pom is configured. Without the reformat the build is broken. Now that I think about it, splitting this into separate commits as I have done in some of these upgrade PRs means that the build is broken at the commit that changes the parent pom version. That's going to make git bisect unreliable if we ever need to use it, and I shouldn't have done that. A single commit per project is what we need for these upgrades.

@elharo elharo changed the title [MJARSIGNER-65][MJARSIGNER-66] Update parent POM to 39, Java minimum to 1.8, maven minimum to 3.2.5 [MJARSIGNER-65][MJARSIGNER-66][MJARSIGNER-67] Update parent POM to 39, Java minimum to 1.8, maven minimum to 3.2.5 Apr 9, 2023
@slachiewicz

Copy link
Copy Markdown
Member

we have different practice in other our repos. First commit with parent update - usualy also cleanup to plugins, remove redundant after upgrade entries.
Then Fix commit with reformat only
then 3th commit to ignore above commit for git blame

@slachiewicz

Copy link
Copy Markdown
Member

image

and 3th commit: https://github.com/apache/maven/commit/19c897de6fea72e023a504ad4d5928e066ab7c52

@slachiewicz

Copy link
Copy Markdown
Member

About Java 8 upgrade - also separate from parent upgrade to avoid user confusion - agreed long time ago with Robert and followed in other repos.

@slachiewicz

Copy link
Copy Markdown
Member

Or if @michael-o says that this PR is ok - ok, no need to correct.

@michael-o michael-o left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not first upgrade Maven? Then upgrade parent with reformat and not intermediate commits and then the rest? Result is three commits.

@elharo

elharo commented Apr 9, 2023

Copy link
Copy Markdown
Author

Maybe that would work. I'm not sure. My general approach is that anything that gets pulled in as a requirement of whatever I'm trying to do (upgrade to 39) is fine as part of that upgrade. I have limited appetite for a combinatorial explosion of all possible orders of individual changes, and I do think we need to pay attention to the amount of time we're burning on super strict commit processes.

@slachiewicz

Copy link
Copy Markdown
Member

Replaced by #5 #6 #7

@michael-o

Copy link
Copy Markdown
Member

Should we delete the branch?

@slachiewicz

Copy link
Copy Markdown
Member

i'll leave this to @elharo maybe he wants to pickup something more from his branch

@asfgit asfgit deleted the 39 branch December 25, 2023 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants