Skip to content

Commit 3aa642c

Browse files
committed
Reordered the goal documentation to match the lifecycle bindings.
Added documentation for 'update-stage-dependencies'.
1 parent 2402ca0 commit 3aa642c

File tree

1 file changed

+32
-15
lines changed

1 file changed

+32
-15
lines changed

README.md

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ It does so by:
1212
* Enabling the decoupling of repository deployment and execution environment delivery based on the current git branch.
1313
* Automated deployment, promotion, and delivery of projects without the [maven-release-plugin](http://maven.apache.org/maven-release/maven-release-plugin/) or some other [*almost there* solution](https://axelfontaine.com/blog/final-nail.html).
1414
* Customizing maven project and system properties based upon the current branch being built. This allows test cases to target different execution environments without changing the artifact results.
15+
* Enabling automatic purging and resolving (force update) of 'release' and 'hotfix' release versioned dependencies resolved from the 'stage' repository.
1516

1617
# Why would I want to use this?
1718

@@ -64,13 +65,14 @@ All of the solutions to these issues are implemented independently in different
6465
<goals>
6566
<goal>enforce-versions</goal>
6667
<goal>retarget-deploy</goal>
68+
<goal>update-stage-dependencies</goal>
69+
<goal>set-properties</goal>
6770
<goal>tag-master</goal>
6871
<goal>promote-master</goal>
69-
<goal>set-properties</goal>
7072
</goals>
7173
<configuration>
7274
<masterBranchPropertyFile>foo/bar/prod.props</masterBranchPropertyFile>
73-
<supportBranchPropertyFile>foo/bar/support.props</supportBranchPropertyFile>
75+
<supportBranchPropertyFile>foo/bar/support.props</supportBranchPropertyFile>
7476
<hotfixBranchPropertyFile>foo/bar/emer.props</hotfixBranchPropertyFile>
7577
<releaseBranchPropertyFile>foo/bar/test.props</releaseBranchPropertyFile>
7678
<developmentBranchPropertyFile>foo/bar/dev.props</developmentBranchPropertyFile>
@@ -180,6 +182,34 @@ Can be replaced with the following plugin configuration, which also introduces t
180182
...
181183
</build>
182184

185+
186+
## Goal: `set-properties` (Dynamically Set Maven Project / System Properties)
187+
188+
Some situations with automated testing (and integration testing in particular) demand changing configuration properties
189+
based upon the branch type being built. This is a common necessity when configuring automated DB refactorings as part of
190+
a build, or needing to setup / configure datasources for automated tests to run against.
191+
192+
The `set-properties` goal allows for setting project (or system) properties, dynamically based on the detected git
193+
branch being built. Properties can be specified as a Properties collection in plugin configuration, or can be loaded
194+
from a property file during the build. Both property key names and property values will have placeholders resolved.
195+
196+
Multiple executions can be configured, and each execution can target different scopes (system or project), and can load
197+
properties from files with an assigned keyPrefix, letting you name-space properties from execution ids.
198+
199+
200+
## Goal: `update-stage-dependencies` (Force update of dependency staged Releases)
201+
202+
The maven `-U` command line switch does a fine job of updating SNAPSHOT versions from snapshot repositories, there is no
203+
built-in way to force maven to re-resolve non-snapshot release versions. This goal addresses that shortcoming in a fairly
204+
straight-forward manner. Any release version dependency of the project which was provided to the local repository by a
205+
remote repository with the same ID as the `<stageDeploymentRepository>`, will be purged from the local repository and
206+
re-resolved (so you get the latest version from either the stage repository, or your release repository).
207+
208+
It is **very important** if you're using this goal, that the **`stageDeploymentReposity` have a unique repository/server id**.
209+
If you use the same ID for release, snapshot, and stage, every time you exeucte this goal, every release version
210+
dependency will be purged and re-resolved.
211+
212+
183213
## Goal: `tag-master` ("Automagic" Tagging for Master Branch Releases)
184214

185215
In a gitflow environment, a commit to a master branch should trigger a job to build on the master branch, which would result in the release being tagged if successful.
@@ -271,16 +301,3 @@ it's building. The attach-deploy will 'clean' the maven project, then download t
271301
that the first build deployed into. Once they're attached to the project, the `jboss-as:deploy-only` goal will deliver
272302
the artifacts built by the first job into a jboss application server.
273303

274-
275-
## Goal: `set-properties` (Dynamically Set Maven Project / System Properties)
276-
277-
Some situations with automated testing (and integration testing in particular) demand changing configuration properties
278-
based upon the branch type being built. This is a common necessity when configuring automated DB refactorings as part of
279-
a build, or needing to setup / configure datasources for automated tests to run against.
280-
281-
The `set-properties` goal allows for setting project (or system) properties, dynamically based on the detected git
282-
branch being built. Properties can be specified as a Properties collection in plugin configuration, or can be loaded
283-
from a property file during the build. Both property key names and property values will have placeholders resolved.
284-
285-
Multiple executions can be configured, and each execution can target different scopes (system or project), and can load
286-
properties from files with an assigned keyPrefix, letting you name-space properties from execution ids.

0 commit comments

Comments
 (0)