Skip to content

Commit 75b7cad

Browse files
committed
Updated the readme
1 parent 91f883d commit 75b7cad

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

README.md

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,15 @@ All of the solutions to these issues are implemented independently in different
6262
<goal>retarget-deploy</goal>
6363
<goal>tag-master</goal>
6464
<goal>promote-master</goal>
65-
</goals>
66-
</execution>
67-
<execution>
68-
<id>git-branch-based-property</id>
69-
<goals>
70-
<goal>set-property</goal>
65+
<goal>set-properties</goal>
7166
</goals>
7267
<configuration>
73-
<key>a.property.name</key>
74-
<masterBranchValue>prod</masterBranchValue>
75-
<releaseBranchValue>${some.arbitrary.value.resolved.at.runtime}</releaseBranchValue>
76-
<hotfixBranchValue>emer</masterBranchValue>
77-
<developmentBranchValue>dev</developmentBranchValue>
78-
<otherBranchValue>foo</otherBranchValue>
79-
<undefinedBranchValue>local.build</undefinedBranchValue>
68+
<masterBranchPropertyFile>foo/bar/prod.props</masterBranchPropertyFile>
69+
<hotfixBranchPropertyFile>foo/bar/emer.props</hotfixBranchPropertyFile>
70+
<releaseBranchPropertyFile>foo/bar/test.props</releaseBranchPropertyFile>
71+
<developmentBranchPropertyFile>foo/bar/dev.props</developmentBranchPropertyFile>
72+
<otherBranchPropertyFile>foo/bar/ci.props</otherBranchPropertyFile>
73+
<undefinedBranchPropertyFile>foo/bar/local.props</undefinedBranchPropertyFile>
8074
</configuration>
8175
</execution>
8276
</executions>
@@ -277,18 +271,15 @@ that the first build deployed into. Once they're attached to the project, the `j
277271
the artifacts built by the first job into a jboss application server.
278272

279273

280-
## Goal: `set-property` (Dynamically Set a Maven Project Property)
274+
## Goal: `set-properties` (Dynamically Set a Maven Project / System Properties)
281275

282276
Some situations with automated testing (and integration testing in particular) demand changing configuration properties
283277
based upon the branch type being built. This is a common necessity when configuring automated DB refactorings as part of
284278
a build, or needing to setup / configure datasources for automated tests to run against.
285279

286-
This goal allows configuration of a single project property. If more than one property is needed, it would
287-
likely be advantageous to leverage the properties-maven-plugin:read-project-properties goal to read the properties from
288-
a file. The filename/url paths loaded by the properties-maven-plugin can reference a property configured by this
289-
gitflow-helper-maven-plugin:set-property goal. Since there is another clear path to load many properties based upon the
290-
value of a single property, the gitflow-helper-maven-plugin only sets a single property.
280+
The `set-properties` goal allows for setting project (or system) properties, dynamically based on the detected git
281+
branch being built. Properties can be specified as a Properties collection in plugin configuration, or can be loaded
282+
from a property file during the build. Both property key names and property values will have placeholders resolved.
291283

292-
Configuration consists of defining the property key value, which can itself contain property references, as well as
293-
values for each type of branch. Any branch without a defined value will have the property resolve to `""`, an empty
294-
string.
284+
Multiple executions can be configured, and each execution can target different scopes (system or project), and can load
285+
properties from files with an assigned keyPrefix, letting you name-space properties from execution ids.

0 commit comments

Comments
 (0)