-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Maven plugin support for configurable SNAPSHOT branch
Currently, the Maven has an undocumented requirement for a "dev-snapshot" branch for committing the next SNAPSHOT version after release. These changes: 1. Add a new environment variable `MAVEN_SNAPSHOT_BRANCH` that can be used to configure the SNAPSHOT branch. 2. Document all environment variables used by this plugin directly. *NOTE: environment variables used in a `pom.xml` or `settings.xml` or other Maven configuration files are NOT documented here.*
- Loading branch information
G. Richard Bellamy
committed
May 21, 2020
1 parent
62c4482
commit 6a0c98d
Showing
2 changed files
with
38 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ Release a Java project to a [maven](https://maven.apache.org/) instance. | |
|
||
This plugin is not included with the `auto` CLI installed via NPM. To install: | ||
|
||
```sh | ||
```shell script | ||
npm i --save-dev @auto-it/maven | ||
# or | ||
yarn add -D @auto-it/maven | ||
|
@@ -20,6 +20,15 @@ yarn add -D @auto-it/maven | |
} | ||
``` | ||
|
||
## Environment Variables | ||
|
||
| Name | Description | Default value | | ||
| ----------------------- | ------------------------------------------------------------------------------------------------ | -------------- | | ||
| `MAVEN_USERNAME` | The deploy username used to login to the repository. | `null` | | ||
| `MAVEN_PASSWORD` | The deploy password used to login to the repository. | `null` | | ||
| `MAVEN_SETTINGS` | The maven `settings.xml` file used by maven. | `null` | | ||
| `MAVEN_SNAPSHOT_BRANCH` | The branch on which the `SNAPSHOT` version lives. Must be different than the Auto "base branch." | `dev-snapshot` | | ||
|
||
## Maven Project Configuration | ||
|
||
Your project must be using the maven release plugin. Make sure the the latest `maven-release-plugin` is in your `pom.xml`. | ||
|
@@ -33,39 +42,39 @@ Your project must be using the maven release plugin. Make sure the the latest `m | |
<preparationGoals>initialize</preparationGoals> | ||
<goals>deploy</goals> | ||
</configuration> | ||
</plugin | ||
</plugin> | ||
``` | ||
|
||
You will also need all of the following configuration blocks for all parts of `auto` to function: | ||
You will also need all the following configuration blocks for all parts of `auto` to function: | ||
|
||
1. Author | ||
|
||
```xml | ||
<developers> | ||
<developer> | ||
<name>Andrew Lisowski</name> | ||
<email>[email protected]</email> | ||
</developer> | ||
</developers> | ||
``` | ||
```xml | ||
<developers> | ||
<developer> | ||
<name>Andrew Lisowski</name> | ||
<email>[email protected]</email> | ||
</developer> | ||
</developers> | ||
``` | ||
|
||
2. SCM | ||
|
||
```xml | ||
<scm> | ||
<connection>scm:git:https://${env.GH_USER}:${env.GH_TOKEN}@github.com/Fuego-Tools/java-test-project.git</connection> | ||
<developerConnection>scm:git:https://${env.GH_USER}:${env.GH_TOKEN}@github.com/Fuego-Tools/java-test-project.git</developerConnection> | ||
<url>https://github.com/Fuego-Tools/java-test-project</url> | ||
<tag>HEAD</tag> | ||
</scm> | ||
``` | ||
```xml | ||
<scm> | ||
<connection>scm:git:https://${env.GH_USER}:${env.GH_TOKEN}@github.com/Fuego-Tools/java-test-project.git</connection> | ||
<developerConnection>scm:git:https://${env.GH_USER}:${env.GH_TOKEN}@github.com/Fuego-Tools/java-test-project.git</developerConnection> | ||
<url>https://github.com/Fuego-Tools/java-test-project</url> | ||
<tag>HEAD</tag> | ||
</scm> | ||
``` | ||
|
||
::: message is-info | ||
Don't forget to set enviornment variables `GH_USER`, `GH_TOKEN` | ||
::: | ||
::: message is-info | ||
Don't forget to set enviornment variables `GH_USER`, `GH_TOKEN` | ||
::: | ||
|
||
3. Version | ||
|
||
```xml | ||
<version>1.0.0-SNAPSHOT</version> | ||
``` | ||
```xml | ||
<version>1.0.0-SNAPSHOT</version> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters