-
Notifications
You must be signed in to change notification settings - Fork 205
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
Remove maven release plugin requirement #1295
Remove maven release plugin requirement #1295
Conversation
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 looks great! just a few minor things here and ther
Gah... I rebased from master and that pulled in a BUNCH of stuff that doesn't belong in this PR. I think I should close this PR and re-submit. |
I'm going to do another rebase and force push the branch to see if that will get the history in proper alignment. |
a24e5a4
to
7f56e4d
Compare
That's much better. However, now we're seeing |
I did what I thought was the right thing with the |
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.
Reviewed and implemented each requested change.
Still getting |
Remove requirement for "maven-release-plugin" and other improvements 1. Remove requirement for "maven-release-plugin". 2. Support recursive changes to all "pom.xml" files in the project, with the following assumptions: a. The project is a multi-module project. b. The parent pom.xml file is located in the root directory of the repo. c. The parent pom.xml contains the version. d. Sub-modules have the same version as the parent pom.xml. 3. Support plugin options, with environment variable overrides: a. `MAVEN_COMMAND || mavenCommand` - the path to the maven executable to use. Defaults to `/usr/bin/mvn`. b. `MAVEN_OPTIONS || mavenOptions` - an array of arbitrary maven options, e.g. `-DskipTests -P some-profile`. No defaults. c. `MAVEN_RELEASE_GOALS || mavenReleaseGoals` - an array of maven goals to run when publishing. Defaults to `["deploy", "site-deploy"]`. d. `MAVEN_SETTINGS || mavenSettings` - the path to the maven settings file. No defaults.
`auto` will detect if the parent `pom.xml` file has the `versions-maven-plugin` configured, and if so, use it to set the version on the parent and all child pom.xml files. If not, then auto will modify the parent and all child `pom.xml` files using a DOM parser and XML serializer. This has the effect of losing formatting. Therefore it then runs the serialized XML through the `prettier` "html" pretty-printer. This means that if the versions-maven-plugin isn't available, the pom.xml files will be pretty-printed using prettier formatter with the following default settings: * `printWidth: 120` (configurable - see below) * `tabWidth: 4` (configurable - see below) * `parser: "html"`
I had commented some git commit/push commands so I could test the plugin on some actual maven projects without the possibility of those projects having commits pushed to their repositories. I forgot to uncomment those commands.
Co-authored-by: Andrew Lisowski <lisowski54@gmail.com>
`auto` will detect if the parent `pom.xml` file has the `versions-maven-plugin` configured, and if so, use it to set the version on the parent and all child pom.xml files. If not, then auto will modify the parent and all child `pom.xml` files using a DOM parser and XML serializer. This has the effect of losing formatting. Therefore it then runs the serialized XML through the `prettier` "html" pretty-printer. This means that if the versions-maven-plugin isn't available, the pom.xml files will be pretty-printed using prettier formatter with the following default settings: * `printWidth: 120` (configurable - see below) * `tabWidth: 4` (configurable - see below) * `parser: "html"`
b5d4b45
to
dca43c0
Compare
@rbellamy odd issue. I tried just running |
Codecov Report
@@ Coverage Diff @@
## master #1295 +/- ##
==========================================
- Coverage 81.18% 81.02% -0.16%
==========================================
Files 56 56
Lines 4097 4158 +61
Branches 888 864 -24
==========================================
+ Hits 3326 3369 +43
- Misses 548 554 +6
- Partials 223 235 +12
Continue to review full report at Codecov.
|
Yeah, very odd issue - I'm glad the rebase worked for you! |
Looks like testing coverage needs some work. |
@hipstersmoothie was there something else you needed me to do before this gets merged and closed? |
The only thing holding me up from merging is that this a breaking change right? I had planned some other things for v10. I don't care too much about those though so I can merge. What label do you think should be attached to this PR? |
It is a breaking change and a significant one. A likely scenario is that someone has been using this plugin, which previously required the So yeah, probably the labels would be "major" and "enhancement". |
I guess the question at hand is - should a plugin's breaking change force a major version upgrade of the entire tool? That's a policy question that only you can answer. |
🚀 PR was released in |
Fixes #1260
Release Notes
This release removes the requirement for the
Maven Release Plugin
from maven projects. This is a breaking change but that maven plugin was quite experimental. This PR makes it a full featuredauto
experience.Remove requirement for "maven-release-plugin" and other improvements
pom.xml
files in the project, with the following assumptions:a. The project is a multi-module project.
b. The parent
pom.xml
file is located in the root directory of the repo.c. The parent
pom.xml
contains the version.d. Sub-modules have the same version as the parent
pom.xml
.a.
MAVEN_COMMAND || mavenCommand
- the path to the maven executable to use. Defaults to/usr/bin/mvn
.b.
MAVEN_OPTIONS || mavenOptions
- an array of arbitrary maven options, e.g.-DskipTests -P some-profile
. No defaults.c.
MAVEN_RELEASE_GOALS || mavenReleaseGoals
- an array of maven goals to run when publishing. Defaults to["deploy", "site-deploy"]
.d.
MAVEN_SETTINGS || mavenSettings
- the path to the maven settings file. No defaults.NOTE: The
MAVEN_USERNAME
andMAVEN_PASSWORD
environment variables are still supported, and have their counterparts as configuration options, but should are deprecated, and will be removed in a later release. This is becauseMAVEN_SETTINGS
orMAVEN_OPTIONS
can do the same work, but provide a much more flexible solution.Support both "versions-maven-plugin" and auto-native DOM/XML
auto
will detect if the parentpom.xml
file has theversions-maven-plugin
configured, and if so, use it to set the version on the parent and all childpom.xml
files. If not, then auto will modify the parent and all childpom.xml
files using a DOM parser and XML serializer. This has the effect of losing formatting. Therefore it then runs the serialized XML through theprettier
"html" pretty-printer.This means that if the
versions-maven-plugin
isn't available, thepom.xml
files will be pretty-printed using theprettier
formatter with the following default settings:printWidth: 120
(configurable - see below)tabWidth: 4
(configurable - see below)parser: "html"
Version
📦 Published PR as canary version:
under canary scope @auto-canary@9.40.0-canary.1295.16618.0
✨ Test out this PR locally via:
npm install @auto-canary/bot-list@9.40.0-canary.1295.16618.0 npm install @auto-canary/auto@9.40.0-canary.1295.16618.0 npm install @auto-canary/core@9.40.0-canary.1295.16618.0 npm install @auto-canary/all-contributors@9.40.0-canary.1295.16618.0 npm install @auto-canary/brew@9.40.0-canary.1295.16618.0 npm install @auto-canary/chrome@9.40.0-canary.1295.16618.0 npm install @auto-canary/cocoapods@9.40.0-canary.1295.16618.0 npm install @auto-canary/conventional-commits@9.40.0-canary.1295.16618.0 npm install @auto-canary/crates@9.40.0-canary.1295.16618.0 npm install @auto-canary/exec@9.40.0-canary.1295.16618.0 npm install @auto-canary/first-time-contributor@9.40.0-canary.1295.16618.0 npm install @auto-canary/gem@9.40.0-canary.1295.16618.0 npm install @auto-canary/gh-pages@9.40.0-canary.1295.16618.0 npm install @auto-canary/git-tag@9.40.0-canary.1295.16618.0 npm install @auto-canary/gradle@9.40.0-canary.1295.16618.0 npm install @auto-canary/jira@9.40.0-canary.1295.16618.0 npm install @auto-canary/maven@9.40.0-canary.1295.16618.0 npm install @auto-canary/npm@9.40.0-canary.1295.16618.0 npm install @auto-canary/omit-commits@9.40.0-canary.1295.16618.0 npm install @auto-canary/omit-release-notes@9.40.0-canary.1295.16618.0 npm install @auto-canary/released@9.40.0-canary.1295.16618.0 npm install @auto-canary/s3@9.40.0-canary.1295.16618.0 npm install @auto-canary/slack@9.40.0-canary.1295.16618.0 npm install @auto-canary/twitter@9.40.0-canary.1295.16618.0 npm install @auto-canary/upload-assets@9.40.0-canary.1295.16618.0 # or yarn add @auto-canary/bot-list@9.40.0-canary.1295.16618.0 yarn add @auto-canary/auto@9.40.0-canary.1295.16618.0 yarn add @auto-canary/core@9.40.0-canary.1295.16618.0 yarn add @auto-canary/all-contributors@9.40.0-canary.1295.16618.0 yarn add @auto-canary/brew@9.40.0-canary.1295.16618.0 yarn add @auto-canary/chrome@9.40.0-canary.1295.16618.0 yarn add @auto-canary/cocoapods@9.40.0-canary.1295.16618.0 yarn add @auto-canary/conventional-commits@9.40.0-canary.1295.16618.0 yarn add @auto-canary/crates@9.40.0-canary.1295.16618.0 yarn add @auto-canary/exec@9.40.0-canary.1295.16618.0 yarn add @auto-canary/first-time-contributor@9.40.0-canary.1295.16618.0 yarn add @auto-canary/gem@9.40.0-canary.1295.16618.0 yarn add @auto-canary/gh-pages@9.40.0-canary.1295.16618.0 yarn add @auto-canary/git-tag@9.40.0-canary.1295.16618.0 yarn add @auto-canary/gradle@9.40.0-canary.1295.16618.0 yarn add @auto-canary/jira@9.40.0-canary.1295.16618.0 yarn add @auto-canary/maven@9.40.0-canary.1295.16618.0 yarn add @auto-canary/npm@9.40.0-canary.1295.16618.0 yarn add @auto-canary/omit-commits@9.40.0-canary.1295.16618.0 yarn add @auto-canary/omit-release-notes@9.40.0-canary.1295.16618.0 yarn add @auto-canary/released@9.40.0-canary.1295.16618.0 yarn add @auto-canary/s3@9.40.0-canary.1295.16618.0 yarn add @auto-canary/slack@9.40.0-canary.1295.16618.0 yarn add @auto-canary/twitter@9.40.0-canary.1295.16618.0 yarn add @auto-canary/upload-assets@9.40.0-canary.1295.16618.0