-
Notifications
You must be signed in to change notification settings - Fork 366
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
Activated profiles should not always deactivate POM profiles that are active by default #4270
Activated profiles should not always deactivate POM profiles that are active by default #4270
Conversation
rewrite-maven/src/test/java/org/openrewrite/maven/MavenParserTest.java
Outdated
Show resolved
Hide resolved
rewrite-maven/src/test/java/org/openrewrite/maven/MavenParserTest.java
Outdated
Show resolved
Hide resolved
rewrite-maven/src/test/java/org/openrewrite/maven/MavenParserTest.java
Outdated
Show resolved
Hide resolved
Hi. We're back on this. Has there been any work on profile deactivation: I searched a bit in PRs and issues. 'profile deactivation', 'profile disabling', and 'deactivation' didn't turn up anything. |
@timtebeek I pinky promise not to sidetrack (far) on this, but got a quick solve for this (and in -java-17, -java-21)?
My skills, internet, AI, and colleagues have all failed so far. We're primarily a Maven shop. Trying to regress before pushing the changes. I did check your build guidance. |
8e78595
to
494402f
Compare
rewrite-maven/src/main/java/org/openrewrite/maven/MavenSettings.java
Outdated
Show resolved
Hide resolved
Hi @crankydillo I've been traveling since Wednesday, getting home Sunday. I'll try to have a more detailed look next week. As for your IDE setup, one tip is to create a copy of this file to limit what modules are loaded. That could help speed up development as well. Lines 1 to 7 in 537d023
I don't recall any work towards explicit profile deactivation. What kind of usage patterns do you see there beyond what Maven already does for us when you execute the rewrite-maven-plugin with those profiles enabled/disabled? |
Sorry, I missed this question. It's probably best for me to just add a test for this. I'll get that done soon. I don't think I pushed it as part of this PR (because it currently fails:). Update: I have already pushed it. It's just |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- rewrite-gradle/src/main/groovy/RewriteSettings.groovy
- lines 31-36
rewrite-maven/src/main/java/org/openrewrite/maven/tree/Profile.java
Outdated
Show resolved
Hide resolved
288f3ef
to
910f121
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- rewrite-gradle/src/main/groovy/RewriteSettings.groovy
- lines 31-36
Thanks for the fresh work on this @crankydillo ; let me know when this is ready for review, as currently it's still marked as a draft. |
I have it as draft, because there's still a bit of work (see here). I'll finish that up if you think the approach looks good. Update: I'll just go ahead and do that. Should have it out of draft by tomorrow! |
407616b
to
1db298d
Compare
00da607
to
0e58942
Compare
rewrite-maven/src/test/java/org/openrewrite/maven/MavenParserTest.java
Outdated
Show resolved
Hide resolved
0e58942
to
5a40cf9
Compare
5a40cf9
to
1f36d4d
Compare
rewrite-maven/src/test/java/org/openrewrite/maven/MavenParserTest.java
Outdated
Show resolved
Hide resolved
assertThat(err.getMessage()).contains("Problem parsing a/pom.xml"); // brittle:(, but class above is broad | ||
} | ||
|
||
@Issue("TODO: create issue") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is related to my understanding of this Maven doc. It is related, but not the same as what I've written up in #4269, so thinking about creating a new issue for it. If you think I've misunderstood something or this test is invalid, we can just remove. This is not a current use-case for us.
Thanks for the rework @crankydillo ! Much appreciate the narrower scope as that makes this easier to review. Quick headsup though that I'll be mostly out this coming week ahead of JFall, but hope to revisit the week after. |
:bump |
rewrite-maven/src/test/java/org/openrewrite/maven/MavenParserTest.java
Outdated
Show resolved
Hide resolved
…est.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- rewrite-gradle/src/main/groovy/RewriteGradleProject.groovy
- lines 81-81
Sorry to keep coming back to this, but I need to know if you will make a call on this soon. It has been in your 'ready-to-review' column for quite some time:) We have lots of complicated POMs and our workaround for this (using a hack settings.xml with mirrors) is not working in many, many cases. I'm now working on hack 4 attempt to work around this. Honestly, I'm starting to think if forking and somehow keeping up to date is better than my hack attempts:). But having been bitten by that multiple times, I'm trying desperately to avoid it. |
Understandable @crankydillo ! Maybe @MBoegers can fit in a review? I'm out this week, and it's been hard to get to everything. |
On my list for tomorrow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your patience and the rework here @crankydillo ! Took a lot longer to review than I'd have hoped, but I'm happy with the solution you ended up with. I've added some light polish and with that we're good to merge I think, as soon as the tests pass.
These versions resolve with Maven. If I'm misuing the test APIs, I can create a sample project.