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 unintentionally bundling with JUnit 3 β†’ disable copy plugin by default #57

Merged
merged 2 commits into from
Jun 23, 2024

Conversation

Philzen
Copy link
Contributor

@Philzen Philzen commented Jun 22, 2024

After having applied the latest updates to my project, i was surprised finding a JUnit 3 jar in src/main/resources/META-INF/rewrite/classpath/ (blast from the past πŸ˜† ).

If not actively removed this:

  1. increases the compiled project's JAR by ~400 % (in my case it went from ~20Kb to ~127Kb)
  2. adds a legacy dependency to the classpath that most probably most consumers of the starter template won't need
  3. would increase the likelihood that the JUnit3 JAR accidentally gets added to the repo on git add .

Therefore i propose to keep the copy plugin disabled by default, as this makes for a better DX when traded off against the above points.

Point 3. begs the question whether src/main/resources/META-INF/rewrite/classpath/ shouldn't also be added to .gitignore?

@timtebeek timtebeek self-requested a review June 23, 2024 11:51
@timtebeek
Copy link
Contributor

timtebeek commented Jun 23, 2024

Thanks for the feedback! This was intentionally added as an example in

I've updated the PR to make it clear what the plugin adds, and when to enable the plugin, as junit:junit isn't used by default.

Had doubted to add a link to the docs there; but at the very least the docs could point out how to configure this with Maven and point here.
https://docs.openrewrite.org/authoring-recipes/modifying-methods-with-javatemplate#add-parameters-to-setcustomerinfo
https://docs.openrewrite.org/authoring-recipes/multiple-versions

@timtebeek timtebeek added the documentation Improvements or additions to documentation label Jun 23, 2024
@timtebeek timtebeek merged commit 3ade071 into moderneinc:main Jun 23, 2024
3 checks passed
Philzen added a commit to Philzen/rewrite-TestNG-to-JUnit5 that referenced this pull request Jun 24, 2024
* Disable bundling with JUnit 3 by default

* Clarify when to configure and use dependency plugin

---------

Co-authored-by: Tim te Beek <[email protected]>
Philzen added a commit to Philzen/rewrite-TestNG-to-JUnit5 that referenced this pull request Jun 24, 2024
* Disable bundling with JUnit 3 by default

* Clarify when to configure and use dependency plugin

---------

Co-authored-by: Tim te Beek <[email protected]>
Philzen added a commit to Philzen/rewrite-TestNG-to-JUnit5 that referenced this pull request Jun 24, 2024
* Disable bundling with JUnit 3 by default

* Clarify when to configure and use dependency plugin

---------

Co-authored-by: Tim te Beek <[email protected]>
Philzen added a commit to Philzen/rewrite-TestNG-to-JUnit5 that referenced this pull request Jun 24, 2024
* Disable bundling with JUnit 3 by default

* Clarify when to configure and use dependency plugin

---------

Co-authored-by: Tim te Beek <[email protected]>
Philzen added a commit to Philzen/rewrite-TestNG-to-JUnit5 that referenced this pull request Jun 24, 2024
* Disable bundling with JUnit 3 by default

* Clarify when to configure and use dependency plugin

---------

Co-authored-by: Tim te Beek <[email protected]>
Philzen added a commit to Philzen/rewrite-TestNG-to-JUnit5 that referenced this pull request Jun 24, 2024
* Disable bundling with JUnit 3 by default

* Clarify when to configure and use dependency plugin

---------

Co-authored-by: Tim te Beek <[email protected]>
Philzen added a commit to Philzen/rewrite-TestNG-to-JUnit5 that referenced this pull request Jun 24, 2024
* Disable bundling with JUnit 3 by default

* Clarify when to configure and use dependency plugin

---------

Co-authored-by: Tim te Beek <[email protected]>
Philzen added a commit to Philzen/rewrite-TestNG-to-JUnit5 that referenced this pull request Jun 24, 2024
* Disable bundling with JUnit 3 by default

* Clarify when to configure and use dependency plugin

---------

Co-authored-by: Tim te Beek <[email protected]>
Philzen added a commit to Philzen/rewrite-TestNG-to-JUnit5 that referenced this pull request Jun 24, 2024
* Disable bundling with JUnit 3 by default

* Clarify when to configure and use dependency plugin

---------

Co-authored-by: Tim te Beek <[email protected]>
@Philzen Philzen deleted the patch-1 branch November 7, 2024 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants