Skip to content

Commit e979095

Browse files
author
Bryan Varner
authored
Merge pull request #116 from egineering-llc/release/3.0.0
Release/3.0.0
2 parents c86b708 + d48833c commit e979095

14 files changed

+199
-408
lines changed

README.md

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ It does so by:
77
* Enforcing [gitflow](http://nvie.com/posts/a-successful-git-branching-model/) version heuristics in [Maven](http://maven.apache.org/) projects.
88
* Coercing Maven to gracefully support the gitflow workflow without imposing complex CI job configurations or complex Maven setups.
99
* Setting distributionManagement repositories (for things like [maven-deploy-plugin](https://maven.apache.org/plugins/maven-deploy-plugin/)) based upon the current git branch.
10-
* SCM tagging builds for master and support branches. You can use the project SCM definition, or if you omit it, you can resolve the CI server's repository connection information. (Zero Maven scm configuration necessary)
10+
* SCM tagging builds for master and support branches. You can use the project SCM definition, or if you omit it, you canO resolve the CI server's repository connection information. (Zero Maven scm configuration necessary)
1111
* Promoting existing tested (staged) artifacts for release, rather than re-building the artifacts. Eliminates the risk of accidental master merges or commits resulting in untested code being released, and provides digest hash traceability for the history of artifacts.
1212
* Enabling the decoupling of repository deployment and execution environment delivery based on the current git branch.
1313
* Allowing for long-running non-release branches to be deployed to snapshots, automatically reversioning the artifacts based off the branch name.
@@ -98,19 +98,12 @@ All of the solutions to these issues are implemented independently in different
9898
<version>${gitflow.helper.plugin.version}</version>
9999
<extensions>true</extensions>
100100
<configuration>
101-
<!--
102-
These repository definitions expect either a configured repository id, or an inline definition
103-
like 'id::layout::url::unique'
104-
105-
For example:
106-
107-
release::default::https://some.server.path/content/repositories/test-releases::false
108-
-->
101+
<!-- Tell the plugins what repositories to use (by id) -->
109102
<releaseDeploymentRepository>localnexus-releases</releaseDeploymentRepository>
110103
<stageDeploymentRepository>localnexus-stage</stageDeploymentRepository>
111104
<snapshotDeploymentRepository>localnexus-snapshots</snapshotDeploymentRepository>
112105
<!-- Allow branches starting with feature/poc to be published as automagically versioned branch-name-SNAPSHOT artifacts -->
113-
<otherDeployBranchPattern>(origin/)feature/poc/.*</otherDeployBranchPattern>
106+
<otherDeployBranchPattern>(origin/)?feature/poc/.*</otherDeployBranchPattern>
114107
</configuration>
115108
<executions>
116109
<execution>
@@ -207,38 +200,58 @@ plugins in the build process (deploy, site-deploy, etc.) will use the repositori
207200

208201
**The repository properties should follow the following format**, `id::layout::url::uniqueVersion`.
209202

210-
When using this plugin, the `<distributionManagement>` repository definitions can be completely removed from your pom.xml
211-
The following configuration block:
203+
When using this plugin, the `<distributionManagement>` repository definitions should be removed from your pom.xml
204+
This block, is replaced by defining 'normal' repositories which are then referenced by the `<id>` and used by the gitflow-helper-maven-plugin to retarget artifact repository deployment and resolution.
212205

213206
<distributionManagement>
214207
<snapshotRepository>
215208
<id>snapshots</id>
216209
<layout>default</layout>
217210
<url>https://some.server.path/content/repositories/snapshots</url>
218-
<uniqueVersion>true</uniqueVersion>
219211
</snapshotRepository>
220212
<repository>
221213
<id>releases</id>
222214
<layout>default</layout>
223215
<url>https://some.server.path/content/repositories/releases</url>
224-
<uniqueVersion>false</uniqueVersion>
225216
</repository>
226217
</distributionManagement>
227218
228-
Can be replaced with the following plugin configuration, which also introduces the stage repository.
219+
Keep in mind repositories can be defined in a user settings.xml as part of your development profiles to keep from repeating yourself in project files.
220+
Below is an example configuration for the gitflow-helper-maven-plugin.
229221

230222
<project...>
231223
...
224+
<repositories>
225+
<repository>
226+
<id>snapshots</id>
227+
<url>https://some.server.path/content/repositories/snapshots</url>
228+
<snapshots><enabled>true</enabled></snapshots>
229+
<releases><enabled>false</enabled></releases>
230+
</repository>
231+
<repository>
232+
<id>test-releases</id>
233+
<url>https://some.server.path/content/repositories/test-releases</url>
234+
<snapshots><enabled>false</enabled></snapshots>
235+
<releases><enabled>true</enabled></releases>
236+
</repository>
237+
<repository>
238+
<id>releases</id>
239+
<url>https://some.server.path/content/repositories/releases</url>
240+
<snapshots><enabled>false</enabled></snapshots>
241+
<releases><enabled>true</enabled></releases>
242+
</repository>
243+
</repositories>
244+
...
232245
<build>
233246
<plugins>
234247
<plugin>
235248
<groupId>com.e-gineering</groupId>
236249
<artifactId>gitflow-helper-maven-plugin</artifactId>
237250
<version>${gitflow.helper.plugin.version}</version>
238251
<configuration>
239-
<releaseDeploymentRepository>releases::default::https://some.server.path/content/repositories/releases::false</releaseDeploymentRepository>
240-
<stageDeploymentRepository>stage::default::https://some.server.path/content/repositories/stage::false</stageDeploymentRepository>
241-
<snapshotDeploymentRepository>snapshots::default::https://some.server.path/content/repositories/snapshots::true</snapshotDeploymentRepository>
252+
<releaseDeploymentRepository>releases</releaseDeploymentRepository>
253+
<stageDeploymentRepository>stage</stageDeploymentRepository>
254+
<snapshotDeploymentRepository>snapshots</snapshotDeploymentRepository>
242255
</configuration>
243256
<executions>
244257
<execution>
@@ -405,7 +418,7 @@ You can then connect a remote debugger and step through the plugin code.
405418
## Building with IntelliJ IDEA notes
406419
### To Debug Test Code:
407420
Configure the Maven commandline to include
408-
`-DforkMode=never` You will likely get warnings when you run maven with this argument.
421+
`-DforkCount=0`
409422

410423
### To inspect code-coverage results from Integration Tests:
411424
* Select the **Analyze** -> **Show Coverage Data** menu.

pom.xml

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<modelVersion>4.0.0</modelVersion>
44

55
<prerequisites>
6-
<maven>3.1</maven>
6+
<maven>3.6.0</maven>
77
</prerequisites>
88

99
<groupId>com.e-gineering</groupId>
1010
<artifactId>gitflow-helper-maven-plugin</artifactId>
11-
<version>2.2.0</version>
11+
<version>3.0.0</version>
1212

1313
<packaging>maven-plugin</packaging>
1414

@@ -49,8 +49,8 @@
4949
</scm>
5050

5151
<properties>
52-
<maven.compiler.source>1.7</maven.compiler.source>
53-
<maven.compiler.target>1.7</maven.compiler.target>
52+
<maven.compiler.source>1.8</maven.compiler.source>
53+
<maven.compiler.target>1.8</maven.compiler.target>
5454
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5555
<it.repository.basedir>${project.build.directory}/it-repositories</it.repository.basedir>
5656
<version.gitflow.plugin>${project.version}</version.gitflow.plugin>
@@ -78,52 +78,30 @@
7878
<dependency>
7979
<groupId>org.apache.maven</groupId>
8080
<artifactId>maven-core</artifactId>
81-
<version>3.1.0</version>
81+
<version>3.6.0</version>
8282
<scope>provided</scope>
8383
</dependency>
84-
<dependency>
85-
<groupId>org.apache.maven</groupId>
86-
<artifactId>maven-compat</artifactId>
87-
<version>3.1.0</version>
88-
<scope>provided</scope>
89-
</dependency>
90-
<dependency>
91-
<groupId>org.apache.maven</groupId>
92-
<artifactId>maven-plugin-api</artifactId>
93-
<version>3.1.0</version>
94-
</dependency>
9584
<dependency>
9685
<groupId>org.apache.maven.scm</groupId>
9786
<artifactId>maven-scm-api</artifactId>
98-
<version>1.11.1</version>
87+
<version>1.11.2</version>
9988
</dependency>
10089
<dependency>
10190
<groupId>org.apache.maven.scm</groupId>
10291
<artifactId>maven-scm-manager-plexus</artifactId>
103-
<version>1.11.1</version>
92+
<version>1.11.2</version>
10493
</dependency>
10594
<dependency>
10695
<groupId>org.apache.maven.scm</groupId>
10796
<artifactId>maven-scm-provider-gitexe</artifactId>
108-
<version>1.11.1</version>
97+
<version>1.11.2</version>
10998
</dependency>
11099
<dependency>
111100
<groupId>org.apache.maven.plugin-tools</groupId>
112101
<artifactId>maven-plugin-annotations</artifactId>
113-
<version>3.1</version>
102+
<version>3.6.0</version>
114103
<scope>provided</scope>
115104
</dependency>
116-
<dependency>
117-
<groupId>org.apache.maven</groupId>
118-
<artifactId>maven-aether-provider</artifactId>
119-
<version>3.1.0</version>
120-
<scope>provided</scope>
121-
</dependency>
122-
<dependency>
123-
<groupId>org.eclipse.aether</groupId>
124-
<artifactId>aether-util</artifactId>
125-
<version>0.9.0.M2</version>
126-
</dependency>
127105
</dependencies>
128106

129107
<build>
@@ -196,7 +174,7 @@
196174
<plugin>
197175
<groupId>org.jacoco</groupId>
198176
<artifactId>jacoco-maven-plugin</artifactId>
199-
<version>0.8.1</version>
177+
<version>0.8.4</version>
200178
<executions>
201179
<execution>
202180
<id>default-prepare-agent</id>
@@ -224,7 +202,7 @@
224202
<plugin>
225203
<groupId>org.apache.maven.plugins</groupId>
226204
<artifactId>maven-surefire-plugin</artifactId>
227-
<version>2.22.0</version>
205+
<version>2.22.2</version>
228206
<configuration>
229207
<systemProperties>
230208
<argLine>${argLine}</argLine>
@@ -237,7 +215,7 @@
237215
<plugin>
238216
<groupId>org.apache.maven.plugins</groupId>
239217
<artifactId>maven-failsafe-plugin</artifactId>
240-
<version>2.22.0</version>
218+
<version>2.22.2</version>
241219
<executions>
242220
<execution>
243221
<configuration>

0 commit comments

Comments
 (0)