Skip to content

Commit

Permalink
resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelin Gießelmann committed Dec 12, 2023
2 parents b3c76c1 + 7e2dc2b commit 091a152
Show file tree
Hide file tree
Showing 34 changed files with 585 additions and 374 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ jobs:
- name: Check out repository
uses: actions/checkout@v3

- name: Set up JDK 7
uses: actions/setup-java@v2
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 7
distribution: 'temurin'
java-version: 8

- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.8.4
maven-version: 3.9.4

- name: Cache Maven packages
uses: actions/cache@v3
Expand All @@ -34,5 +34,5 @@ jobs:
- uses: actions/upload-artifact@v3
if: failure()
with:
name: it-build-logs
name: ${{ runner.os }}-it-build-logs
path: target/it/*/*.log
Binary file modified .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
8 changes: 4 additions & 4 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## v1.20.0 (2023-06-01)

* Fixed creation of the release branch in `hotfix-finish` goal - [#391](https://github.com/aleksandr-m/gitflow-maven-plugin/issues/391)
* Improved console error logs - [#383](https://github.com/aleksandr-m/gitflow-maven-plugin/issues/383)
* Added option to skip merging into development branch in `release-finish` goal - [#237](https://github.com/aleksandr-m/gitflow-maven-plugin/issues/237)
* Added back merge to `release` goal - [#375](https://github.com/aleksandr-m/gitflow-maven-plugin/pull/375)
* Updated dependencies - [#365](https://github.com/aleksandr-m/gitflow-maven-plugin/pull/365)

## v1.19.0 (2022-10-13)

* Fixed snapshot checking with up-to-date project info - [#345](https://github.com/aleksandr-m/gitflow-maven-plugin/issues/345)
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

The Maven plugin that supports various Git workflows, including Vincent Driessen's [successful Git branching model](https://nvie.com/posts/a-successful-git-branching-model/) and [GitHub Flow](https://guides.github.com/introduction/flow/).

Currently a Java implementation of Git version control system [JGit](https://github.com/eclipse/jgit) doesn't support [`.gitattributes`](https://git-scm.com/book/en/Customizing-Git-Git-Attributes).
Currently a Java implementation of Git version control system [JGit](https://eclipse.dev/jgit/) doesn't support [`.gitattributes`](https://git-scm.com/book/en/Customizing-Git-Git-Attributes).

This plugin runs Git and Maven commands from the command line ensuring that all Git features work properly.

Expand All @@ -23,7 +23,7 @@ The plugin is available from Maven Central.
<plugin>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-plugin</artifactId>
<version>1.19.0</version>
<version>1.20.0</version>
<configuration>
<!-- optional configuration -->
</configuration>
Expand Down Expand Up @@ -289,7 +289,9 @@ The `gitflow:release-start` goal has `fromCommit` parameter which allows to star
The `gitflow:release-start` and `gitflow:release-finish` goals have `useSnapshotInRelease` parameter which allows to start the release with SNAPSHOT version and finish it without this value in project version. By default the value is `false`.
For example, if the release version is `1.0.2` and `useSnapshotInRelease` is set to `true` and using `gitflow:release-start` goal then the release version will be `1.0.2-SNAPSHOT` and when finishing the release with `gitflow:release-finish` goal, the release version will be `1.0.2`

The `gitflow:release` and `gitflow:release-start` goals have `skipReleaseMergeProdBranch` parameter which prevents merging the release branch into the production branch. The default value is `false`.
The `gitflow:release` and `gitflow:release-finish` goals have `skipReleaseMergeProdBranch` parameter which prevents merging the release branch into the production branch. The default value is `false`.

The `gitflow:release-finish` goal has `skipReleaseMergeDevBranch` parameter which prevents merging the release branch into the development branch. The default value is `false`.

The `gitflow:hotfix-start` and `gitflow:hotfix-finish` goals have `useSnapshotInHotfix` parameter which allows to start the hotfix with SNAPSHOT version and finish it without this value in the version. By default the value is `false`.
For example, if the hotfix version is `1.0.2.1` and `useSnapshotInHotfix` is set to `true` and using `gitflow:hotfix-start` goal then the hotfix version will be `1.0.2.1-SNAPSHOT` and when finishing the release with `gitflow:hotfix-finish` goal, the release version will be `1.0.2.1`
Expand All @@ -298,7 +300,9 @@ The `gitflow:hotfix-finish` goal supports the parameter `skipMergeDevBranch` whi

The `gitflow:hotfix-finish` goal supports the parameter `skipMergeProdBranch` which prevents merging the hotfix branch into the production branch and deletes the hotfix branch leaving only the tagged commit. Useful, along with `skipMergeDevBranch`, to allow hotfixes to very old code that are not applicable to current development.

The `gitflow:release-finish` and `gitflow:hofix-finish` goals have `noBackMerge` and `noBackMergeHotfix` parameters respectively. They control which branch is merged to development branch. If set to `true` then release or hotfix branch will be merged to development branch. If set to `false` and tag is present (`skipTag` parameter is set to `false`) then tag will be merged. If there is no tag then production branch will be merged to development branch.
The `gitflow:release-finish` and `gitflow:hotfix-finish` goals have `noBackMerge` and `noBackMergeHotfix` parameters respectively. They control which branch is merged to development branch. If set to `true` then release or hotfix branch will be merged to development branch. If set to `false` and tag is present (`skipTag` parameter is set to `false`) then tag will be merged. If there is no tag then production branch will be merged to development branch.

The `gitflow:release` goal has `noBackMerge` parameter, which controls which branch is merged to development branch. If set to `true` then merge will be skipped. If set to `false` and tag is present (`skipTag` is set to `false`) then tag will be merged. If there is no tag then production branch will be merged to development branch.

### Versioning

Expand Down
63 changes: 36 additions & 27 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<artifactId>gitflow-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>gitflow-maven-plugin</name>
<version>1.20.2-SNAPSHOT</version>
<version>1.20.1-SNAPSHOT</version>

<description>The Git-Flow Maven Plugin supports various Git workflows, including Vincent Driessen's successful Git branching model and GitHub Flow. This plugin runs Git and Maven commands from the command line. Supports Eclipse Plugins build with Tycho.</description>

Expand All @@ -30,7 +30,7 @@
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
Expand Down Expand Up @@ -63,26 +63,26 @@
</distributionManagement>

<properties>
<java.version>1.7</java.version>
<java.version>8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven-plugin-plugin.version>3.6.0</maven-plugin-plugin.version>
<maven-plugin-plugin.version>3.9.0</maven-plugin-plugin.version>
</properties>

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<artifactId>maven-plugin-report-plugin</artifactId>
<version>${maven-plugin-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.9</version>
<version>3.4.5</version>
<reportSets>
<reportSet>
<reports>
<report>license</report>
<report>licenses</report>
<report>scm</report>
</reports>
</reportSet>
Expand All @@ -99,7 +99,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.11.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
Expand All @@ -109,15 +109,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.1</version>
<version>3.5.0</version>
<configuration>
<source>${java.version}</source>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
<version>3.12.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -142,6 +142,20 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.sisu</groupId>
<artifactId>sisu-maven-plugin</artifactId>
<version>0.3.5</version>
<executions>
<execution>
<id>index-project</id>
<goals>
<goal>main-index</goal>
<goal>test-index</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand All @@ -153,7 +167,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.1.0</version>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -178,7 +192,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -198,7 +212,7 @@
<plugins>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<version>3.2.2</version>
<version>3.6.0</version>
<configuration>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
Expand All @@ -224,41 +238,36 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.5</version>
<version>3.9.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>1.5.15</version><!-- cannot go to 3.X without breaking java7 compatibiltiy -->
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.6.4</version>
<version>3.9.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-interactivity-api</artifactId>
<version>1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.release</groupId>
<artifactId>maven-release-manager</artifactId>
<version>2.5.3</version>
<version>3.0.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.release</groupId>
<artifactId>maven-release-oddeven-policy</artifactId>
<version>2.5.3</version>
<version>3.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.10.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
7 changes: 7 additions & 0 deletions src/it/release-finish-8-it/expected-development-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-test</artifactId>
<packaging>pom</packaging>
<version>0.0.1</version>
</project>
7 changes: 7 additions & 0 deletions src/it/release-finish-8-it/expected-production-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-test</artifactId>
<packaging>pom</packaging>
<version>0.0.3</version>
</project>
6 changes: 6 additions & 0 deletions src/it/release-finish-8-it/gitignorefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build.log
expected-development-pom.xml
expected-production-pom.xml
invoker.properties
init.bsh
verify.bsh
41 changes: 41 additions & 0 deletions src/it/release-finish-8-it/init.bsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import org.codehaus.plexus.util.FileUtils;

try {
new File(basedir, "gitignorefile").renameTo(new File(basedir, ".gitignore"));

Process p = Runtime.getRuntime().exec("git --git-dir=" + basedir + "/.git --work-tree=" + basedir + " init");
p.waitFor();

Process p = Runtime.getRuntime().exec("git --git-dir=" + basedir + "/.git --work-tree=" + basedir + " config user.email '[email protected]'");
p.waitFor();
Process p = Runtime.getRuntime().exec("git --git-dir=" + basedir + "/.git --work-tree=" + basedir + " config user.name 'a'");
p.waitFor();

p = Runtime.getRuntime().exec("git --git-dir=" + basedir + "/.git --work-tree=" + basedir + " add .");
p.waitFor();

p = Runtime.getRuntime().exec("git --git-dir=" + basedir + "/.git --work-tree=" + basedir + " commit -m init");
p.waitFor();

p = Runtime.getRuntime().exec("git --git-dir=" + basedir + "/.git --work-tree=" + basedir + " branch develop");
p.waitFor();

p = Runtime.getRuntime().exec("git --git-dir=" + basedir + "/.git --work-tree=" + basedir + " checkout -b release/0.0.3");
p.waitFor();

File pomfile = new File(basedir, "pom.xml");
String pomfilestr = FileUtils.fileRead(pomfile, "UTF-8");
pomfilestr = pomfilestr.replaceAll("0.0.1", "0.0.3");
FileUtils.fileWrite(basedir + "/pom.xml", "UTF-8", pomfilestr);

p = Runtime.getRuntime().exec("git --git-dir=" + basedir + "/.git --work-tree=" + basedir + " add .");
p.waitFor();

p = Runtime.getRuntime().exec("git --git-dir=" + basedir + "/.git --work-tree=" + basedir + " commit -m 0.0.3");
p.waitFor();

} catch (Exception e) {
e.printStackTrace();
return false;
}
return true;
3 changes: 3 additions & 0 deletions src/it/release-finish-8-it/invoker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
invoker.goals=${project.groupId}:${project.artifactId}:${project.version}:release-finish -DpushRemote=false -DskipReleaseMergeDevBranch

invoker.description=Test release-finish with skipReleaseMergeDevBranch parameter.
7 changes: 7 additions & 0 deletions src/it/release-finish-8-it/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-test</artifactId>
<packaging>pom</packaging>
<version>0.0.1</version>
</project>
Loading

0 comments on commit 091a152

Please sign in to comment.