woowacourse-java-format
Used in
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency> <groupId>io.github.yhkee0404.woowacoursejavaformat</groupId> <artifactId>woowacourse-java-format</artifactId> <version>1.25.0.0_WOOWACOURSE</version> </dependency>
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright 2024 The Woowacourse Java Format Authors ~ Copyright 2015 Google Inc. ~ ~ Licensed 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. --> <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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>io.github.yhkee0404.woowacoursejavaformat</groupId> <artifactId>woowacourse-java-format-parent</artifactId> <version>1.25.0.0_WOOWACOURSE</version> </parent> <artifactId>woowacourse-java-format</artifactId> <name>Woowacourse Java Format</name> <description> A Java source code formatter that follows Woowacourse Java Style. </description> <dependencies> <!-- Required runtime dependencies --> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> </dependency> <!-- Compile-time dependencies --> <dependency> <groupId>org.jspecify</groupId> <artifactId>jspecify</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>com.google.errorprone</groupId> <artifactId>error_prone_annotations</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>com.google.auto.value</groupId> <artifactId>auto-value-annotations</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>com.google.auto.service</groupId> <artifactId>auto-service-annotations</artifactId> <optional>true</optional> </dependency> <!-- Test dependencies --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava-testlib</artifactId> </dependency> <dependency> <groupId>com.google.truth</groupId> <artifactId>truth</artifactId> </dependency> <dependency> <groupId>com.google.truth.extensions</groupId> <artifactId>truth-java8-extension</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>com.google.testing.compile</groupId> <artifactId>compile-testing</artifactId> <version>0.19</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-javadoc-plugin</artifactId> <configuration> <source>17</source> <encoding>UTF-8</encoding> <docencoding>UTF-8</docencoding> <charset>UTF-8</charset> <links> <link>https://guava.dev/releases/${guava.version}/api/docs/</link> <link>https://docs.oracle.com/en/java/javase/11/docs/api</link> </links> <additionalJOptions> <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED,io.github.yhkee0404.woowacoursejavaformat</additionalJOption> <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED,io.github.yhkee0404.woowacoursejavaformat</additionalJOption> <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED,io.github.yhkee0404.woowacoursejavaformat</additionalJOption> <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED,io.github.yhkee0404.woowacoursejavaformat</additionalJOption> <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED,io.github.yhkee0404.woowacoursejavaformat</additionalJOption> <additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED,io.github.yhkee0404.woowacoursejavaformat</additionalJOption> </additionalJOptions> </configuration> <executions> <execution> <id>attach-docs</id> <phase>post-integration-test</phase> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.2.4</version> <executions> <execution> <id>shade-all-deps</id> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <shadedArtifactAttached>true</shadedArtifactAttached> <shadedClassifierName>all-deps</shadedClassifierName> <createDependencyReducedPom>false</createDependencyReducedPom> <!-- http://stackoverflow.com/a/6743609 --> <filters> <filter> <artifact>*:*</artifact> <excludes> <exclude>META-INF/*.SF</exclude> <exclude>META-INF/*.DSA</exclude> <exclude>META-INF/*.RSA</exclude> </excludes> </filter> </filters> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifest> <mainClass>com.google.googlejavaformat.java.Main</mainClass> <addDefaultImplementationEntries> true </addDefaultImplementationEntries> </manifest> <manifestEntries> <Automatic-Module-Name> io.github.yhkee0404.woowacoursejavaformat </Automatic-Module-Name> </manifestEntries> </archive> </configuration> </plugin> <plugin> <groupId>com.google.code.maven-replacer-plugin</groupId> <artifactId>replacer</artifactId> <version>1.5.3</version> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>replace</goal> </goals> </execution> </executions> <configuration> <file>${project.basedir}/src/main/java/com/google/googlejavaformat/java/GoogleJavaFormatVersion.java.template</file> <outputFile>${project.build.directory}/generated-sources/java/com/google/googlejavaformat/java/GoogleJavaFormatVersion.java</outputFile> <replacements> <replacement> <token>%VERSION%</token> <value>${project.version}</value> </replacement> </replacements> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>3.3.0</version> <executions> <execution> <id>add-source</id> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>${project.build.directory}/generated-sources/java/</source> </sources> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>17</source> <target>17</target> </configuration> </plugin> </plugins> </build> <profiles> <profile> <id>jdk17</id> <activation> <jdk>[17,21)</jdk> </activation> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <excludes> <exclude>**/Java21InputAstVisitor.java</exclude> </excludes> </configuration> </plugin> <plugin> <artifactId>maven-javadoc-plugin</artifactId> <configuration> <excludePackageNames>com.google.googlejavaformat.java.java21</excludePackageNames> </configuration> </plugin> </plugins> </build> </profile> <profile> <id>native</id> <build> <plugins> <plugin> <groupId>org.graalvm.buildtools</groupId> <artifactId>native-maven-plugin</artifactId> <version>0.10.0</version> <extensions>true</extensions> <executions> <execution> <id>build-native</id> <goals> <goal>compile-no-fork</goal> </goals> <phase>package</phase> </execution> <execution> <id>test-native</id> <goals> <goal>test</goal> </goals> <phase>test</phase> </execution> </executions> <configuration> <imageName>woowacourse-java-format</imageName> <classpath> <param>${project.build.directory}/${project.artifactId}-${project.version}-all-deps.jar</param> </classpath> <buildArgs> <buildArg>-H:+UnlockExperimentalVMOptions</buildArg> <buildArg>-H:IncludeResourceBundles=com.sun.tools.javac.resources.compiler</buildArg> <buildArg>-H:IncludeResourceBundles=com.sun.tools.javac.resources.javac</buildArg> <buildArg>--no-fallback</buildArg> <buildArg>--initialize-at-build-time=com.sun.tools.javac.file.Locations</buildArg> <buildArg>-H:+ReportExceptionStackTraces</buildArg> <buildArg>-H:-UseContainerSupport</buildArg> <buildArg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</buildArg> <buildArg>-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</buildArg> <buildArg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</buildArg> <buildArg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</buildArg> <buildArg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</buildArg> <buildArg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</buildArg> <buildArg>-march=compatibility</buildArg> </buildArgs> </configuration> </plugin> </plugins> </build> </profile> </profiles> </project>