Skip to content

Commit fba629a

Browse files
authored
Rename plugin: maven-git-code-format -> git-code-format-maven-plugin (#39)
Closes: #38
1 parent aed2891 commit fba629a

File tree

7 files changed

+10
-11
lines changed

7 files changed

+10
-11
lines changed

pom.xml

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

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

10-
<name>maven-git-code-format Maven Plugin</name>
10+
<name>Git Code Format Maven Plugin</name>
1111
<description>A maven plugin that automatically deploys https://github.com/google/google-java-format code formatter
1212
as a pre-commit git hook
1313
</description>
@@ -19,7 +19,6 @@
1919
<org.apache.commons.io.version>2.6</org.apache.commons.io.version>
2020
<org.apache.commons.lang.version>3.9</org.apache.commons.lang.version>
2121
<org.apache.commons.exec.version>1.3</org.apache.commons.exec.version>
22-
<maven-git-code-format.version>1.25</maven-git-code-format.version>
2322
</properties>
2423

2524
<dependencies>

src/main/java/com/cosium/code/format/InstallHooksMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
@Mojo(name = "install-hooks", defaultPhase = LifecyclePhase.INITIALIZE, threadSafe = true)
3030
public class InstallHooksMojo extends AbstractMavenGitCodeFormatMojo {
3131

32-
private static final String BASE_PLUGIN_PRE_COMMIT_HOOK = "maven-git-code-format.pre-commit.sh";
32+
private static final String BASE_PLUGIN_PRE_COMMIT_HOOK = "git-code-format.pre-commit.sh";
3333
private static final String PRE_COMMIT_HOOK_BASE_SCRIPT = "pre-commit";
3434

3535
private final ExecutableManager executableManager = new ExecutableManager(this::getLog);
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
set -e
3+
%s -f %s com.cosium.code:git-code-format-maven-plugin:on-pre-commit %s

src/main/resources/com/cosium/code/format/maven-git-code-format.pre-commit.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/test/java/com/cosium/code/format/AbstractTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
@RunWith(MavenJUnitTestRunner.class)
3535
public abstract class AbstractTest {
3636
private static final String GROUP_ID = "com.cosium.code";
37-
private static final String ARTIFACT_ID = "maven-git-code-format";
37+
private static final String ARTIFACT_ID = "git-code-format-maven-plugin";
3838
@Rule public final TestResources resources;
3939

4040
private final MavenRuntime maven;
@@ -50,7 +50,7 @@ public AbstractTest(
5050
this.resources =
5151
new TestResources(
5252
"src/test/projects",
53-
Files.createTempDirectory("maven-git-code-format-test").toString());
53+
Files.createTempDirectory(ARTIFACT_ID + "-test").toString());
5454
this.maven = mavenBuilder.withCliOptions("-B", "-U").build();
5555
this.projectRootDirectoryName = projectRootDirectoryName;
5656
}

src/test/projects/non-root-module/module/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<plugins>
1818
<plugin>
1919
<groupId>com.cosium.code</groupId>
20-
<artifactId>maven-git-code-format</artifactId>
20+
<artifactId>git-code-format-maven-plugin</artifactId>
2121
<version>${it-project.version}</version>
2222
<executions>
2323
<execution>

src/test/projects/single-module/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<plugins>
1818
<plugin>
1919
<groupId>com.cosium.code</groupId>
20-
<artifactId>maven-git-code-format</artifactId>
20+
<artifactId>git-code-format-maven-plugin</artifactId>
2121
<version>${it-project.version}</version>
2222
<executions>
2323
<execution>

0 commit comments

Comments
 (0)