Skip to content

Commit b6724ea

Browse files
committed
Prepare for 2.0
1 parent 833199d commit b6724ea

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

Diff for: README.md

+16-6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66
A maven plugin that automatically deploys [google-java-format](https://github.com/google/google-java-format) code formatter as a `pre-commit` git hook.
77
On commit, the hook will automatically format staged java files.
88

9+
### Breaking changes between 1.x and 2.x
10+
11+
* (https://github.com/Cosium/maven-git-code-format/issues/37) To prevent conflicts with other plugins all keys are now
12+
prefixed with `gcf`. e.g. `-DglobPattern=**/*` becomes `-Dgcf.globPattern=**/*`
13+
* (https://github.com/Cosium/maven-git-code-format/issues/38) To avoid infringement to Apache Maven Trademark,
14+
the plugin was renamed to `git-code-format-maven-plugin`. Its new coordinates are
15+
`com.cosium.code:git-code-format-maven-plugin`.
16+
17+
`1.x` documentation can be found at https://github.com/Cosium/maven-git-code-format/blob/1.39/README.md
18+
919
### Automatic code format and validation activation
1020

1121
Add this to your maven project **root** pom.xml :
@@ -15,8 +25,8 @@ Add this to your maven project **root** pom.xml :
1525
<plugins>
1626
<plugin>
1727
<groupId>com.cosium.code</groupId>
18-
<artifactId>maven-git-code-format</artifactId>
19-
<version>${maven-git-code-format.version}</version>
28+
<artifactId>git-code-format-maven-plugin</artifactId>
29+
<version>${git-code-format-maven-plugin.version}</version>
2030
<executions>
2131
<!-- On commit, format the modified java files -->
2232
<execution>
@@ -60,8 +70,8 @@ The plugin allows you to tweak Google Java Format options :
6070
<plugins>
6171
<plugin>
6272
<groupId>com.cosium.code</groupId>
63-
<artifactId>maven-git-code-format</artifactId>
64-
<version>${maven-git-code-format.version}</version>
73+
<artifactId>git-code-format-maven-plugin</artifactId>
74+
<version>${git-code-format-maven-plugin.version}</version>
6575
<executions>
6676
<!-- ... -->
6777
</executions>
@@ -112,9 +122,9 @@ Either use add a ```<skip>true</skip>``` configuration in the inheriting project
112122
On the `initialize` maven phase, `git-code-format:install-hooks` installs a git `pre-commit` hook that looks like this :
113123
```bash
114124
#!/bin/bash
115-
"./.git/hooks/${project.artifactId}.maven-git-code-format.pre-commit.sh"
125+
"./.git/hooks/${project.artifactId}.git-code-format.pre-commit.sh"
116126
```
117-
and `.git/hooks/${project.artifactId}.maven-git-code-format.pre-commit.sh` has the following content:
127+
and `.git/hooks/${project.artifactId}.git-code-format.pre-commit.sh` has the following content:
118128
```bash
119129
#!/bin/bash
120130
set -e

Diff for: pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.cosium.code</groupId>
66
<artifactId>git-code-format-maven-plugin</artifactId>
7-
<version>1.40-SNAPSHOT</version>
7+
<version>2.0-SNAPSHOT</version>
88
<packaging>maven-plugin</packaging>
99

1010
<name>Git Code Format Maven Plugin</name>

0 commit comments

Comments
 (0)