Skip to content

Commit

Permalink
Merge pull request #116 from egineering-llc/release/3.0.0
Browse files Browse the repository at this point in the history
Release/3.0.0
  • Loading branch information
Bryan Varner authored Dec 23, 2019
2 parents c86b708 + d48833c commit e979095
Show file tree
Hide file tree
Showing 14 changed files with 199 additions and 408 deletions.
51 changes: 32 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ It does so by:
* Enforcing [gitflow](http://nvie.com/posts/a-successful-git-branching-model/) version heuristics in [Maven](http://maven.apache.org/) projects.
* Coercing Maven to gracefully support the gitflow workflow without imposing complex CI job configurations or complex Maven setups.
* Setting distributionManagement repositories (for things like [maven-deploy-plugin](https://maven.apache.org/plugins/maven-deploy-plugin/)) based upon the current git branch.
* 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)
* 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)
* 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.
* Enabling the decoupling of repository deployment and execution environment delivery based on the current git branch.
* Allowing for long-running non-release branches to be deployed to snapshots, automatically reversioning the artifacts based off the branch name.
Expand Down Expand Up @@ -98,19 +98,12 @@ All of the solutions to these issues are implemented independently in different
<version>${gitflow.helper.plugin.version}</version>
<extensions>true</extensions>
<configuration>
<!--
These repository definitions expect either a configured repository id, or an inline definition
like 'id::layout::url::unique'
For example:
release::default::https://some.server.path/content/repositories/test-releases::false
-->
<!-- Tell the plugins what repositories to use (by id) -->
<releaseDeploymentRepository>localnexus-releases</releaseDeploymentRepository>
<stageDeploymentRepository>localnexus-stage</stageDeploymentRepository>
<snapshotDeploymentRepository>localnexus-snapshots</snapshotDeploymentRepository>
<!-- Allow branches starting with feature/poc to be published as automagically versioned branch-name-SNAPSHOT artifacts -->
<otherDeployBranchPattern>(origin/)feature/poc/.*</otherDeployBranchPattern>
<otherDeployBranchPattern>(origin/)?feature/poc/.*</otherDeployBranchPattern>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -207,38 +200,58 @@ plugins in the build process (deploy, site-deploy, etc.) will use the repositori

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

When using this plugin, the `<distributionManagement>` repository definitions can be completely removed from your pom.xml
The following configuration block:
When using this plugin, the `<distributionManagement>` repository definitions should be removed from your pom.xml
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.

<distributionManagement>
<snapshotRepository>
<id>snapshots</id>
<layout>default</layout>
<url>https://some.server.path/content/repositories/snapshots</url>
<uniqueVersion>true</uniqueVersion>
</snapshotRepository>
<repository>
<id>releases</id>
<layout>default</layout>
<url>https://some.server.path/content/repositories/releases</url>
<uniqueVersion>false</uniqueVersion>
</repository>
</distributionManagement>
Can be replaced with the following plugin configuration, which also introduces the stage repository.
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.
Below is an example configuration for the gitflow-helper-maven-plugin.

<project...>
...
<repositories>
<repository>
<id>snapshots</id>
<url>https://some.server.path/content/repositories/snapshots</url>
<snapshots><enabled>true</enabled></snapshots>
<releases><enabled>false</enabled></releases>
</repository>
<repository>
<id>test-releases</id>
<url>https://some.server.path/content/repositories/test-releases</url>
<snapshots><enabled>false</enabled></snapshots>
<releases><enabled>true</enabled></releases>
</repository>
<repository>
<id>releases</id>
<url>https://some.server.path/content/repositories/releases</url>
<snapshots><enabled>false</enabled></snapshots>
<releases><enabled>true</enabled></releases>
</repository>
</repositories>
...
<build>
<plugins>
<plugin>
<groupId>com.e-gineering</groupId>
<artifactId>gitflow-helper-maven-plugin</artifactId>
<version>${gitflow.helper.plugin.version}</version>
<configuration>
<releaseDeploymentRepository>releases::default::https://some.server.path/content/repositories/releases::false</releaseDeploymentRepository>
<stageDeploymentRepository>stage::default::https://some.server.path/content/repositories/stage::false</stageDeploymentRepository>
<snapshotDeploymentRepository>snapshots::default::https://some.server.path/content/repositories/snapshots::true</snapshotDeploymentRepository>
<releaseDeploymentRepository>releases</releaseDeploymentRepository>
<stageDeploymentRepository>stage</stageDeploymentRepository>
<snapshotDeploymentRepository>snapshots</snapshotDeploymentRepository>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -405,7 +418,7 @@ You can then connect a remote debugger and step through the plugin code.
## Building with IntelliJ IDEA notes
### To Debug Test Code:
Configure the Maven commandline to include
`-DforkMode=never` You will likely get warnings when you run maven with this argument.
`-DforkCount=0`

### To inspect code-coverage results from Integration Tests:
* Select the **Analyze** -> **Show Coverage Data** menu.
Expand Down
46 changes: 12 additions & 34 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<modelVersion>4.0.0</modelVersion>

<prerequisites>
<maven>3.1</maven>
<maven>3.6.0</maven>
</prerequisites>

<groupId>com.e-gineering</groupId>
<artifactId>gitflow-helper-maven-plugin</artifactId>
<version>2.2.0</version>
<version>3.0.0</version>

<packaging>maven-plugin</packaging>

Expand Down Expand Up @@ -49,8 +49,8 @@
</scm>

<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<it.repository.basedir>${project.build.directory}/it-repositories</it.repository.basedir>
<version.gitflow.plugin>${project.version}</version.gitflow.plugin>
Expand Down Expand Up @@ -78,52 +78,30 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.1.0</version>
<version>3.6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-api</artifactId>
<version>1.11.1</version>
<version>1.11.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-manager-plexus</artifactId>
<version>1.11.1</version>
<version>1.11.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-gitexe</artifactId>
<version>1.11.1</version>
<version>1.11.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.1</version>
<version>3.6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-aether-provider</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-util</artifactId>
<version>0.9.0.M2</version>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -196,7 +174,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.1</version>
<version>0.8.4</version>
<executions>
<execution>
<id>default-prepare-agent</id>
Expand Down Expand Up @@ -224,7 +202,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<version>2.22.2</version>
<configuration>
<systemProperties>
<argLine>${argLine}</argLine>
Expand All @@ -237,7 +215,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.0</version>
<version>2.22.2</version>
<executions>
<execution>
<configuration>
Expand Down
Loading

0 comments on commit e979095

Please sign in to comment.