Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change groupId and package to com.spotify.fmt #124

Merged
merged 10 commits into from
Feb 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[![Build Status](https://github.com/coveooss/fmt-maven-plugin/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/coveooss/fmt-maven-plugin/actions/workflows/ci.yml?query=branch%3Amain)
[![license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/coveooss/fmt-maven-plugin/blob/main/LICENSE)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.coveo/fmt-maven-plugin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.coveo/fmt-maven-plugin)
[![Build Status](https://github.com/spotify/fmt-maven-plugin/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/spotify/fmt-maven-plugin/actions/workflows/ci.yml?query=branch%3Amain)
[![license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/spotify/fmt-maven-plugin/blob/main/LICENSE)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.spotify.fmt/fmt-maven-plugin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.spotify.fmt/fmt-maven-plugin)

## fmt-maven-plugin

**UPDATE 2022-02-14:** This plugin has moved from [coveoss](https://github.com/coveooss/) to the [spotify](https://github.com/spotify/) Github org, the new groupId will be `com.spotify`. The `master` branch has been renamed to `main`.
**UPDATE 2022-02-14:** This plugin has moved from [coveooss](https://github.com/coveooss/) to the [spotify](https://github.com/spotify/) Github org. The new groupId will be `com.spotify.fmt`, and the `master` branch has been renamed to `main`.

Formats your code using [google-java-format](https://github.com/google/google-java-format) which follows [Google's code styleguide](https://google.github.io/styleguide/javaguide.html).

Expand All @@ -22,7 +22,7 @@ To have your sources automatically formatted on each build, add to your pom.xml:
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.13</version>
<executions>
Expand All @@ -43,7 +43,7 @@ If you prefer, you can only check formatting at build time using the `check` goa
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.13</version>
<executions>
Expand Down Expand Up @@ -81,7 +81,7 @@ example:
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.13</version>
<configuration>
Expand Down Expand Up @@ -124,7 +124,7 @@ example to not display the non-compliant files:
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.13</version>
<configuration>
Expand All @@ -147,7 +147,7 @@ example to limit the display up to 10 files
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.13</version>
<configuration>
Expand All @@ -169,10 +169,10 @@ example to limit the display up to 10 files

You can also use it on the command line

`mvn com.coveo:fmt-maven-plugin:format`
`mvn com.spotify.fmt:fmt-maven-plugin:format`

You can pass parameters via standard `-D` syntax.
`mvn com.coveo:fmt-maven-plugin:format -Dverbose=true`
`mvn com.spotify.fmt:fmt-maven-plugin:format -Dverbose=true`

`-Dfmt.skip` is whether the plugin should skip the operation.

Expand Down
16 changes: 11 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.13</version>
<packaging>maven-plugin</packaging>

<name>${project.groupId}:${project.artifactId}</name>

<description>Maven Plugin that formats a project's Java Code following google-java-format</description>
<url>http://github.com/coveooss/fmt-maven-plugin</url>
<url>http://github.com/spotify/fmt-maven-plugin</url>

<licenses>
<license>
Expand All @@ -20,6 +20,11 @@
</licenses>

<developers>
<developer>
<name>Klara Ward</name>
<organization>Spotify</organization>
<organizationUrl>http://github.com/spotify</organizationUrl>
</developer>
<developer>
<name>Pierre-Alexandre St-Jean</name>
<organization>Coveo</organization>
Expand All @@ -43,9 +48,9 @@
</developers>

<scm>
<connection>scm:git:[email protected]:coveooss/fmt-maven-plugin.git</connection>
<developerConnection>scm:git:[email protected]:coveooss/fmt-maven-plugin.git</developerConnection>
<url>http://github.com/coveooss/fmt-maven-plugin</url>
<connection>scm:git:[email protected]:spotify/fmt-maven-plugin.git</connection>
<developerConnection>scm:git:[email protected]:spotify/fmt-maven-plugin.git</developerConnection>
<url>http://github.com/spotify/fmt-maven-plugin</url>
</scm>

<distributionManagement>
Expand Down Expand Up @@ -139,6 +144,7 @@
</executions>
</plugin>
<plugin>
<!-- TODO Update to spotify release -->
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.13</version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.coveo;
package com.spotify.fmt;

import com.google.common.base.Charsets;
import com.google.common.io.CharSource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.coveo;
package com.spotify.fmt;

import static java.lang.Math.max;
import static java.lang.Math.min;
Expand Down Expand Up @@ -45,7 +45,7 @@ protected void postExecute(List<String> filesProcessed, int nonComplyingFiles)
if (nonComplyingFiles > 0) {
String message = "Found " + nonComplyingFiles + " non-complying files, failing build";
getLog().error(message);
getLog().error("To fix formatting errors, run \"mvn com.coveo:fmt-maven-plugin:format\"");
getLog().error("To fix formatting errors, run \"mvn com.spotify.fmt:fmt-maven-plugin:format\"");
// do not support limit < 1
displayLimit = max(1, displayLimit);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.coveo;
package com.spotify.fmt;

import com.google.common.base.Charsets;
import com.google.common.io.CharSink;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.coveo;
package com.spotify.fmt;

import static com.google.common.truth.Truth.assertThat;

Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/additionalfolders/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
klaraward marked this conversation as resolved.
Show resolved Hide resolved
<configuration>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/check_formatted/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<executions>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/check_notformatted/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<executions>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/check_notformatted_ignored/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<configuration>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/failed_formatting/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<executions>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/failonerrormissingsources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<configuration>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/failonerrorwithsources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<configuration>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/failonunknownstyle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<configuration>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/importclean/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/importunsorted/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<executions>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/importunused/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<executions>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/nosource/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<executions>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/notestsource/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<executions>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/onlyavajsources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<configuration>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/onlytestsources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<executions>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/simple/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<executions>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/simple_aosp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<configuration>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/simple_google/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<configuration>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/validateonly_formatted/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<executions>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/validateonly_notformatted/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<build>
<plugins>
<plugin>
<groupId>com.coveo</groupId>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.12</version>
<executions>
Expand Down