From 7cda1bf75ef87106d146a0681ce925ba35512e28 Mon Sep 17 00:00:00 2001 From: Caesar Ralf Date: Fri, 22 Sep 2023 13:56:35 +0200 Subject: [PATCH 1/6] Reformat pom.xml --- pom.xml | 535 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 269 insertions(+), 266 deletions(-) diff --git a/pom.xml b/pom.xml index 720858d..c441cb7 100644 --- a/pom.xml +++ b/pom.xml @@ -1,282 +1,285 @@ - - 4.0.0 + + 4.0.0 - com.spotify.fmt - fmt-maven-plugin - 2.21-SNAPSHOT - maven-plugin + com.spotify.fmt + fmt-maven-plugin + 2.21-SNAPSHOT + maven-plugin - ${project.groupId}:${project.artifactId} + ${project.groupId}:${project.artifactId} - Maven Plugin that formats a project's Java Code following google-java-format - http://github.com/spotify/fmt-maven-plugin + Maven Plugin that formats a project's Java Code following google-java-format + + http://github.com/spotify/fmt-maven-plugin - - - MIT License - http://www.opensource.org/licenses/mit-license.php - - + + + MIT License + http://www.opensource.org/licenses/mit-license.php + + - - - Klara Ward - Spotify - http://github.com/spotify - - - Pierre-Alexandre St-Jean - Coveo - http://github.com/coveo - - - Guillaume Simard - Coveo - http://github.com/coveo - - - Martin Laporte - Coveo - http://github.com/coveo - - - Andy Emond - Coveo - http://github.com/coveo - - + + + Klara Ward + Spotify + http://github.com/spotify + + + Pierre-Alexandre St-Jean + Coveo + http://github.com/coveo + + + Guillaume Simard + Coveo + http://github.com/coveo + + + Martin Laporte + Coveo + http://github.com/coveo + + + Andy Emond + Coveo + http://github.com/coveo + + - - scm:git:git@github.com:spotify/fmt-maven-plugin.git - scm:git:git@github.com:spotify/fmt-maven-plugin.git - http://github.com/spotify/fmt-maven-plugin - HEAD + + scm:git:git@github.com:spotify/fmt-maven-plugin.git + scm:git:git@github.com:spotify/fmt-maven-plugin.git + http://github.com/spotify/fmt-maven-plugin + HEAD - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + - - UTF-8 - 1682579930 - + + UTF-8 + 1682579930 + - - - org.apache.maven - maven-plugin-api - 3.9.0 - - - org.apache.maven.plugin-tools - maven-plugin-annotations - 3.8.2 - provided - - - com.google.googlejavaformat - google-java-format - 1.15.0 - + + + org.apache.maven + maven-plugin-api + 3.9.3 + + + org.apache.maven.plugin-tools + maven-plugin-annotations + 3.8.2 + provided + + + com.google.googlejavaformat + google-java-format + 1.15.0 + - - io.norberg - auto-matter - 0.26.2 - provided - + + io.norberg + auto-matter + 0.26.2 + provided + - - junit - junit - 4.13.1 - test - - - org.apache.maven.plugin-testing - maven-plugin-testing-harness - 3.3.0 - test - - - org.apache.maven - maven-core - 3.9.0 - test - - - org.apache.maven - maven-compat - 3.9.0 - test - - - com.google.truth - truth - 0.28 - test - - - org.mockito - mockito-core - 4.3.1 - test - - + + junit + junit + 4.13.1 + test + + + org.apache.maven.plugin-testing + maven-plugin-testing-harness + 3.3.0 + test + + + org.apache.maven + maven-core + 3.9.3 + test + + + org.apache.maven + maven-compat + 3.9.3 + test + + + com.google.truth + truth + 0.28 + test + + + org.mockito + mockito-core + 4.3.1 + test + + - + + + + org.apache.maven.plugins + maven-invoker-plugin + 3.2.2 + + true + verify + + + + integration-test + + install + run + + + src/test/resources + + + + + + org.apache.maven.plugins + maven-plugin-plugin + 3.6.0 + + fmt + true + + + + mojo-descriptor + + descriptor + + + + help-goal + + helpmojo + + + + + + com.spotify.fmt + fmt-maven-plugin + 2.19 + + + + format + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.7.0 + + 9 + 9 + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + org.apache.maven.plugins + maven-release-plugin + 3.0.0-M6 + + release + + + + + + + + + release + - - org.apache.maven.plugins - maven-invoker-plugin - 3.2.2 - - true - verify - - - - integration-test - - install - run - - - src/test/resources - - - - - - org.apache.maven.plugins - maven-plugin-plugin - 3.6.0 - - fmt - true - - - - mojo-descriptor - - descriptor - - - - help-goal - - helpmojo - - - - - - com.spotify.fmt - fmt-maven-plugin - 2.19 - - - - format - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.7.0 - - 9 - 9 - - + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + + attach-javadocs + + jar + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.6 + true + + ossrh + https://oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - org.apache.maven.plugins - maven-release-plugin - 3.0.0-M6 - - release - - - - - - - - - release - - - - org.apache.maven.plugins - maven-source-plugin - 3.2.1 - - - attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.9.1 - - - attach-javadocs - - jar - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.6 - true - - ossrh - https://oss.sonatype.org/ - true - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.6 - - - sign-artifacts - verify - - sign - - - - - - - - + + + From 561aab3bb6934dcff616c9e981a09bc57c8c6fcd Mon Sep 17 00:00:00 2001 From: Caesar Ralf Date: Fri, 22 Sep 2023 13:58:12 +0200 Subject: [PATCH 2/6] Add ignore to release files --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 6797333..2812848 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,7 @@ hs_err_pid* # compilation target/ + +# mvn release files +*.releaseBackup +release.properties From 57185178c8f869f72ca7e4d24958f5451cedb83a Mon Sep 17 00:00:00 2001 From: Caesar Ralf Date: Fri, 22 Sep 2023 14:12:37 +0200 Subject: [PATCH 3/6] Change to use spotify:foss-root as parent --- LICENSE | 2 +- pom.xml | 102 +++++------------- .../java/com/spotify/fmt/AbstractFMT.java | 26 +++++ src/main/java/com/spotify/fmt/Check.java | 26 +++++ src/main/java/com/spotify/fmt/FMT.java | 26 +++++ .../java/com/spotify/fmt/ForkingExecutor.java | 26 +++++ src/main/java/com/spotify/fmt/Formatter.java | 26 +++++ .../com/spotify/fmt/FormatterException.java | 26 +++++ .../spotify/fmt/FormattingConfiguration.java | 26 +++++ .../com/spotify/fmt/FormattingResult.java | 26 +++++ src/main/java/com/spotify/fmt/Logger.java | 26 +++++ src/main/java/com/spotify/fmt/Logging.java | 26 +++++ .../com/spotify/fmt/SerializableCallable.java | 26 +++++ .../java/com/spotify/fmt/Serialization.java | 26 +++++ .../spotify/fmt/SerializationException.java | 26 +++++ src/test/java/com/spotify/fmt/FMTTest.java | 26 +++++ .../com/spotify/fmt/ForkingExecutorTest.java | 26 +++++ 17 files changed, 418 insertions(+), 76 deletions(-) diff --git a/LICENSE b/LICENSE index 3c4ba2d..4a3064e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Spotify AB +Copyright (c) 2022-2023 Spotify AB Copyright (c) 2016-2022 Coveo Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/pom.xml b/pom.xml index c441cb7..f21660b 100644 --- a/pom.xml +++ b/pom.xml @@ -3,6 +3,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 + + com.spotify + foss-root + 16 + + com.spotify.fmt fmt-maven-plugin 2.21-SNAPSHOT @@ -22,6 +28,11 @@ + + Caesar Ralf + Spotify + http://github.com/spotify + Klara Ward Spotify @@ -68,6 +79,9 @@ + 11 + ${maven.compiler.release} + ${maven.compiler.release} UTF-8 1682579930 @@ -137,6 +151,14 @@ + + org.codehaus.mojo + license-maven-plugin + + mit + LICENSE + + org.apache.maven.plugins maven-invoker-plugin @@ -181,10 +203,11 @@ + - com.spotify.fmt - fmt-maven-plugin - 2.19 + ${project.groupId} + ${project.artifactId} + 2.20 @@ -193,15 +216,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - 3.7.0 - - 9 - 9 - - @@ -213,73 +227,11 @@ org.apache.maven.plugins maven-release-plugin - 3.0.0-M6 - release + @{project.version} - - - - release - - - - org.apache.maven.plugins - maven-source-plugin - 3.2.1 - - - attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.9.1 - - - attach-javadocs - - jar - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.6 - true - - ossrh - https://oss.sonatype.org/ - true - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.6 - - - sign-artifacts - verify - - sign - - - - - - - - diff --git a/src/main/java/com/spotify/fmt/AbstractFMT.java b/src/main/java/com/spotify/fmt/AbstractFMT.java index f0c6797..e8730ee 100644 --- a/src/main/java/com/spotify/fmt/AbstractFMT.java +++ b/src/main/java/com/spotify/fmt/AbstractFMT.java @@ -1,3 +1,29 @@ +/*- + * -\-\- + * com.spotify.fmt:fmt-maven-plugin + * -- + * Copyright (C) 2016 - 2023 Spotify AB + * -- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * -/-/- + */ + package com.spotify.fmt; import com.google.common.annotations.VisibleForTesting; diff --git a/src/main/java/com/spotify/fmt/Check.java b/src/main/java/com/spotify/fmt/Check.java index 3cb6b81..81598a8 100644 --- a/src/main/java/com/spotify/fmt/Check.java +++ b/src/main/java/com/spotify/fmt/Check.java @@ -1,3 +1,29 @@ +/*- + * -\-\- + * com.spotify.fmt:fmt-maven-plugin + * -- + * Copyright (C) 2016 - 2023 Spotify AB + * -- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * -/-/- + */ + package com.spotify.fmt; import static java.lang.Math.max; diff --git a/src/main/java/com/spotify/fmt/FMT.java b/src/main/java/com/spotify/fmt/FMT.java index b7743c2..b71f3ec 100644 --- a/src/main/java/com/spotify/fmt/FMT.java +++ b/src/main/java/com/spotify/fmt/FMT.java @@ -1,3 +1,29 @@ +/*- + * -\-\- + * com.spotify.fmt:fmt-maven-plugin + * -- + * Copyright (C) 2016 - 2023 Spotify AB + * -- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * -/-/- + */ + package com.spotify.fmt; import org.apache.maven.plugins.annotations.LifecyclePhase; diff --git a/src/main/java/com/spotify/fmt/ForkingExecutor.java b/src/main/java/com/spotify/fmt/ForkingExecutor.java index e16ff72..fe3e353 100644 --- a/src/main/java/com/spotify/fmt/ForkingExecutor.java +++ b/src/main/java/com/spotify/fmt/ForkingExecutor.java @@ -1,3 +1,29 @@ +/*- + * -\-\- + * com.spotify.fmt:fmt-maven-plugin + * -- + * Copyright (C) 2016 - 2023 Spotify AB + * -- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * -/-/- + */ + package com.spotify.fmt; import java.io.BufferedReader; diff --git a/src/main/java/com/spotify/fmt/Formatter.java b/src/main/java/com/spotify/fmt/Formatter.java index 721a8b6..2626a39 100644 --- a/src/main/java/com/spotify/fmt/Formatter.java +++ b/src/main/java/com/spotify/fmt/Formatter.java @@ -1,3 +1,29 @@ +/*- + * -\-\- + * com.spotify.fmt:fmt-maven-plugin + * -- + * Copyright (C) 2016 - 2023 Spotify AB + * -- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * -/-/- + */ + package com.spotify.fmt; import com.google.common.base.Charsets; diff --git a/src/main/java/com/spotify/fmt/FormatterException.java b/src/main/java/com/spotify/fmt/FormatterException.java index e20c483..f824c77 100644 --- a/src/main/java/com/spotify/fmt/FormatterException.java +++ b/src/main/java/com/spotify/fmt/FormatterException.java @@ -1,3 +1,29 @@ +/*- + * -\-\- + * com.spotify.fmt:fmt-maven-plugin + * -- + * Copyright (C) 2016 - 2023 Spotify AB + * -- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * -/-/- + */ + package com.spotify.fmt; public class FormatterException extends RuntimeException { diff --git a/src/main/java/com/spotify/fmt/FormattingConfiguration.java b/src/main/java/com/spotify/fmt/FormattingConfiguration.java index d3b538f..b81a937 100644 --- a/src/main/java/com/spotify/fmt/FormattingConfiguration.java +++ b/src/main/java/com/spotify/fmt/FormattingConfiguration.java @@ -1,3 +1,29 @@ +/*- + * -\-\- + * com.spotify.fmt:fmt-maven-plugin + * -- + * Copyright (C) 2016 - 2023 Spotify AB + * -- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * -/-/- + */ + package com.spotify.fmt; import io.norberg.automatter.AutoMatter; diff --git a/src/main/java/com/spotify/fmt/FormattingResult.java b/src/main/java/com/spotify/fmt/FormattingResult.java index d79fd63..a11c365 100644 --- a/src/main/java/com/spotify/fmt/FormattingResult.java +++ b/src/main/java/com/spotify/fmt/FormattingResult.java @@ -1,3 +1,29 @@ +/*- + * -\-\- + * com.spotify.fmt:fmt-maven-plugin + * -- + * Copyright (C) 2016 - 2023 Spotify AB + * -- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * -/-/- + */ + package com.spotify.fmt; import io.norberg.automatter.AutoMatter; diff --git a/src/main/java/com/spotify/fmt/Logger.java b/src/main/java/com/spotify/fmt/Logger.java index 9d270b7..bc9b0b8 100644 --- a/src/main/java/com/spotify/fmt/Logger.java +++ b/src/main/java/com/spotify/fmt/Logger.java @@ -1,3 +1,29 @@ +/*- + * -\-\- + * com.spotify.fmt:fmt-maven-plugin + * -- + * Copyright (C) 2016 - 2023 Spotify AB + * -- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * -/-/- + */ + package com.spotify.fmt; import org.apache.maven.plugin.logging.SystemStreamLog; diff --git a/src/main/java/com/spotify/fmt/Logging.java b/src/main/java/com/spotify/fmt/Logging.java index 4df8c78..7c760a6 100644 --- a/src/main/java/com/spotify/fmt/Logging.java +++ b/src/main/java/com/spotify/fmt/Logging.java @@ -1,3 +1,29 @@ +/*- + * -\-\- + * com.spotify.fmt:fmt-maven-plugin + * -- + * Copyright (C) 2016 - 2023 Spotify AB + * -- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * -/-/- + */ + package com.spotify.fmt; import org.apache.maven.plugin.logging.Log; diff --git a/src/main/java/com/spotify/fmt/SerializableCallable.java b/src/main/java/com/spotify/fmt/SerializableCallable.java index 00f6c84..da991a5 100644 --- a/src/main/java/com/spotify/fmt/SerializableCallable.java +++ b/src/main/java/com/spotify/fmt/SerializableCallable.java @@ -1,3 +1,29 @@ +/*- + * -\-\- + * com.spotify.fmt:fmt-maven-plugin + * -- + * Copyright (C) 2016 - 2023 Spotify AB + * -- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * -/-/- + */ + package com.spotify.fmt; import java.io.Serializable; diff --git a/src/main/java/com/spotify/fmt/Serialization.java b/src/main/java/com/spotify/fmt/Serialization.java index 01a1ce4..1ea2a55 100644 --- a/src/main/java/com/spotify/fmt/Serialization.java +++ b/src/main/java/com/spotify/fmt/Serialization.java @@ -1,3 +1,29 @@ +/*- + * -\-\- + * com.spotify.fmt:fmt-maven-plugin + * -- + * Copyright (C) 2016 - 2023 Spotify AB + * -- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * -/-/- + */ + package com.spotify.fmt; import static java.nio.file.StandardOpenOption.CREATE_NEW; diff --git a/src/main/java/com/spotify/fmt/SerializationException.java b/src/main/java/com/spotify/fmt/SerializationException.java index 3262e9e..60aa5df 100644 --- a/src/main/java/com/spotify/fmt/SerializationException.java +++ b/src/main/java/com/spotify/fmt/SerializationException.java @@ -1,3 +1,29 @@ +/*- + * -\-\- + * com.spotify.fmt:fmt-maven-plugin + * -- + * Copyright (C) 2016 - 2023 Spotify AB + * -- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * -/-/- + */ + package com.spotify.fmt; class SerializationException extends Exception { diff --git a/src/test/java/com/spotify/fmt/FMTTest.java b/src/test/java/com/spotify/fmt/FMTTest.java index a31cf08..79c69ab 100644 --- a/src/test/java/com/spotify/fmt/FMTTest.java +++ b/src/test/java/com/spotify/fmt/FMTTest.java @@ -1,3 +1,29 @@ +/*- + * -\-\- + * com.spotify.fmt:fmt-maven-plugin + * -- + * Copyright (C) 2016 - 2023 Spotify AB + * -- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * -/-/- + */ + package com.spotify.fmt; import static com.google.common.truth.Truth.assertThat; diff --git a/src/test/java/com/spotify/fmt/ForkingExecutorTest.java b/src/test/java/com/spotify/fmt/ForkingExecutorTest.java index 265e07b..9d1a975 100644 --- a/src/test/java/com/spotify/fmt/ForkingExecutorTest.java +++ b/src/test/java/com/spotify/fmt/ForkingExecutorTest.java @@ -1,3 +1,29 @@ +/*- + * -\-\- + * com.spotify.fmt:fmt-maven-plugin + * -- + * Copyright (C) 2016 - 2023 Spotify AB + * -- + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * -/-/- + */ + package com.spotify.fmt; import static com.google.common.truth.Truth.assertThat; From 646edb58c4221c00cdef9de50f1988d05ff236a7 Mon Sep 17 00:00:00 2001 From: Caesar Ralf Date: Fri, 22 Sep 2023 14:12:56 +0200 Subject: [PATCH 4/6] Adds java 21 to builds --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3a248c..0eede76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: build: strategy: matrix: - java: [ '11', '15', '17' ] + java: [ '11', '17', '21' ] os: [ 'ubuntu-20.04', 'windows-latest' ] runs-on: ${{ matrix.os }} steps: From 2a34acb8172d0e512ba0d8d116e9d2fd2c91c45f Mon Sep 17 00:00:00 2001 From: Caesar Ralf Date: Fri, 22 Sep 2023 14:33:35 +0200 Subject: [PATCH 5/6] Bumps google-format to 1.17 for jdk21 compatibility --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f21660b..3459ad6 100644 --- a/pom.xml +++ b/pom.xml @@ -101,7 +101,7 @@ com.google.googlejavaformat google-java-format - 1.15.0 + 1.17.0 From cfb7fe9b1204251c221d7213dad80ccb349e43f5 Mon Sep 17 00:00:00 2001 From: Caesar Ralf Date: Fri, 22 Sep 2023 14:47:38 +0200 Subject: [PATCH 6/6] Remove running itself --- pom.xml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/pom.xml b/pom.xml index 3459ad6..8e325e2 100644 --- a/pom.xml +++ b/pom.xml @@ -203,19 +203,6 @@ - - - ${project.groupId} - ${project.artifactId} - 2.20 - - - - format - - - -