xref: /aosp_15_r20/external/google-java-format/pom.xml (revision 10816b529e1d7005ca788e7b4c5efd1c72957e26)
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3  ~ Copyright 2015 Google Inc.
4  ~
5  ~ Licensed under the Apache License, Version 2.0 (the "License");
6  ~ you may not use this file except in compliance with the License.
7  ~ You may obtain a copy of the License at
8  ~
9  ~     http://www.apache.org/licenses/LICENSE-2.0
10  ~
11  ~ Unless required by applicable law or agreed to in writing, software
12  ~ distributed under the License is distributed on an "AS IS" BASIS,
13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ~ See the License for the specific language governing permissions and
15  ~ limitations under the License.
16  -->
17
18<project xmlns="http://maven.apache.org/POM/4.0.0"
19         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21  <modelVersion>4.0.0</modelVersion>
22
23  <groupId>com.google.googlejavaformat</groupId>
24  <artifactId>google-java-format-parent</artifactId>
25  <packaging>pom</packaging>
26  <version>HEAD-SNAPSHOT</version>
27
28  <modules>
29    <module>core</module>
30  </modules>
31
32  <name>Google Java Format Parent</name>
33
34  <description>
35    A Java source code formatter that follows Google Java Style.
36  </description>
37
38  <url>https://github.com/google/google-java-format</url>
39
40  <inceptionYear>2015</inceptionYear>
41
42  <organization>
43    <name>Google Inc.</name>
44    <url>http://www.google.com/</url>
45  </organization>
46
47  <licenses>
48    <license>
49      <name>The Apache Software License, Version 2.0</name>
50      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
51      <distribution>repo</distribution>
52    </license>
53  </licenses>
54
55  <developers>
56    <developer>
57      <id>jdd</id>
58      <name>John DeTreville</name>
59      <email>[email protected]</email>
60      <organization>Google Inc.</organization>
61      <organizationUrl>http://www.google.com/</organizationUrl>
62      <roles>
63        <role>owner</role>
64        <role>developer</role>
65      </roles>
66      <timezone>-8</timezone>
67    </developer>
68  </developers>
69
70  <scm>
71    <url>http://github.com/google/google-java-format/</url>
72    <connection>scm:git:git://github.com/google/google-java-format.git</connection>
73    <developerConnection>scm:git:ssh://[email protected]/google/google-java-format.git</developerConnection>
74    <tag>HEAD</tag>
75  </scm>
76
77  <issueManagement>
78    <system>GitHub Issues</system>
79    <url>http://github.com/google/google-java-format/issues</url>
80  </issueManagement>
81
82  <prerequisites>
83    <maven>3.0.3</maven>
84  </prerequisites>
85
86  <properties>
87    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
88    <java.version>1.8</java.version>
89    <guava.version>32.1.3-jre</guava.version>
90    <truth.version>1.1.3</truth.version>
91    <checker.version>3.21.2</checker.version>
92    <errorprone.version>2.16</errorprone.version>
93    <auto-value.version>1.9</auto-value.version>
94    <auto-service.version>1.0.1</auto-service.version>
95    <maven-javadoc-plugin.version>3.4.0</maven-javadoc-plugin.version>
96    <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
97  </properties>
98
99  <dependencyManagement>
100    <dependencies>
101      <!-- Required runtime dependencies -->
102      <dependency>
103        <groupId>com.google.guava</groupId>
104        <artifactId>guava</artifactId>
105        <version>${guava.version}</version>
106      </dependency>
107
108      <!-- Compile-time dependencies -->
109      <dependency>
110        <groupId>org.checkerframework</groupId>
111        <artifactId>checker-qual</artifactId>
112        <version>${checker.version}</version>
113      </dependency>
114      <dependency>
115        <groupId>com.google.errorprone</groupId>
116        <artifactId>error_prone_annotations</artifactId>
117        <version>${errorprone.version}</version>
118      </dependency>
119      <dependency>
120        <groupId>com.google.auto.value</groupId>
121        <artifactId>auto-value-annotations</artifactId>
122        <version>${auto-value.version}</version>
123      </dependency>
124      <dependency>
125        <groupId>com.google.auto.service</groupId>
126        <artifactId>auto-service-annotations</artifactId>
127        <version>${auto-service.version}</version>
128      </dependency>
129
130      <!-- Test dependencies -->
131      <dependency>
132        <groupId>junit</groupId>
133        <artifactId>junit</artifactId>
134        <version>4.13.2</version>
135        <scope>test</scope>
136      </dependency>
137      <dependency>
138        <groupId>com.google.guava</groupId>
139        <artifactId>guava-testlib</artifactId>
140        <version>${guava.version}</version>
141        <scope>test</scope>
142      </dependency>
143      <dependency>
144        <groupId>com.google.truth</groupId>
145        <artifactId>truth</artifactId>
146        <version>${truth.version}</version>
147        <scope>test</scope>
148      </dependency>
149      <dependency>
150        <groupId>com.google.truth.extensions</groupId>
151        <artifactId>truth-java8-extension</artifactId>
152        <version>${truth.version}</version>
153        <scope>test</scope>
154      </dependency>
155    </dependencies>
156  </dependencyManagement>
157
158  <build>
159    <pluginManagement>
160      <plugins>
161        <plugin>
162          <artifactId>maven-compiler-plugin</artifactId>
163          <version>3.9.0</version>
164        </plugin>
165        <plugin>
166          <artifactId>maven-jar-plugin</artifactId>
167          <version>3.2.2</version>
168        </plugin>
169        <plugin>
170          <artifactId>maven-source-plugin</artifactId>
171          <version>3.2.1</version>
172        </plugin>
173        <plugin>
174          <artifactId>maven-javadoc-plugin</artifactId>
175          <version>3.4.0</version>
176        </plugin>
177        <plugin>
178          <artifactId>maven-gpg-plugin</artifactId>
179          <version>3.0.1</version>
180        </plugin>
181        <plugin>
182          <groupId>org.apache.felix</groupId>
183          <artifactId>maven-bundle-plugin</artifactId>
184          <version>5.1.4</version>
185        </plugin>
186      </plugins>
187    </pluginManagement>
188
189    <plugins>
190      <plugin>
191        <artifactId>maven-compiler-plugin</artifactId>
192        <configuration>
193          <source>${java.version}</source>
194          <target>${java.version}</target>
195          <encoding>UTF-8</encoding>
196          <compilerArgs>
197            <!-- compile-time arguments for google-java-format -->
198            <arg>-XDcompilePolicy=simple</arg>
199            <arg>-Xplugin:ErrorProne</arg>
200            <arg>--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
201            <arg>--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
202            <arg>--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
203            <arg>--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
204            <arg>--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
205            <arg>--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
206            <arg>--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
207          </compilerArgs>
208          <annotationProcessorPaths>
209            <path>
210              <groupId>com.google.errorprone</groupId>
211              <artifactId>error_prone_core</artifactId>
212              <version>${errorprone.version}</version>
213            </path>
214            <path>
215              <groupId>com.google.auto.value</groupId>
216              <artifactId>auto-value</artifactId>
217              <version>${auto-value.version}</version>
218            </path>
219            <path>
220              <groupId>com.google.auto.service</groupId>
221              <artifactId>auto-service</artifactId>
222              <version>${auto-service.version}</version>
223            </path>
224          </annotationProcessorPaths>
225        </configuration>
226      </plugin>
227      <plugin>
228        <groupId>org.apache.maven.plugins</groupId>
229        <artifactId>maven-jar-plugin</artifactId>
230        <configuration>
231          <archive>
232            <manifest>
233              <mainClass>com.google.googlejavaformat.java.Main</mainClass>
234            </manifest>
235            <manifestEntries>
236              <Add-Exports><!--
237                -->jdk.compiler/com.sun.tools.javac.api <!--
238                -->jdk.compiler/com.sun.tools.javac.code <!--
239                -->jdk.compiler/com.sun.tools.javac.file <!--
240                -->jdk.compiler/com.sun.tools.javac.parser <!--
241                -->jdk.compiler/com.sun.tools.javac.tree <!--
242                -->jdk.compiler/com.sun.tools.javac.util<!--
243              --></Add-Exports>
244            </manifestEntries>
245          </archive>
246        </configuration>
247      </plugin>
248      <plugin>
249        <groupId>org.apache.maven.plugins</groupId>
250        <artifactId>maven-source-plugin</artifactId>
251        <executions>
252          <execution>
253            <id>attach-sources</id>
254            <goals>
255              <goal>jar</goal>
256            </goals>
257          </execution>
258        </executions>
259      </plugin>
260      <plugin>
261        <groupId>org.apache.maven.plugins</groupId>
262        <artifactId>maven-javadoc-plugin</artifactId>
263        <version>3.4.0</version>
264        <configuration>
265          <doclint>none</doclint>
266        </configuration>
267        <executions>
268          <execution>
269          <id>attach-javadocs</id>
270            <goals>
271              <goal>jar</goal>
272            </goals>
273          </execution>
274        </executions>
275      </plugin>
276      <plugin>
277        <groupId>org.apache.maven.plugins</groupId>
278        <artifactId>maven-surefire-plugin</artifactId>
279        <version>2.22.2</version>
280        <configuration>
281          <!-- set heap size to work around http://github.com/travis-ci/travis-ci/issues/3396 -->
282          <argLine>
283            -Xmx1024m
284            --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
285            --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
286            --add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
287            --add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
288            --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
289            --add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
290            --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
291            --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
292            --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
293            --add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
294          </argLine>
295        </configuration>
296      </plugin>
297    </plugins>
298  </build>
299
300  <distributionManagement>
301    <snapshotRepository>
302      <id>sonatype-nexus-snapshots</id>
303      <name>Sonatype Nexus Snapshots</name>
304      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
305    </snapshotRepository>
306    <repository>
307      <id>sonatype-nexus-staging</id>
308      <name>Nexus Release Repository</name>
309      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
310    </repository>
311  </distributionManagement>
312
313  <profiles>
314    <profile>
315      <id>sonatype-oss-release</id>
316      <build>
317        <plugins>
318          <plugin>
319            <groupId>org.apache.maven.plugins</groupId>
320            <artifactId>maven-source-plugin</artifactId>
321            <version>${maven-source-plugin.version}</version>
322            <executions>
323              <execution>
324                <id>attach-sources</id>
325                <goals>
326                  <goal>jar-no-fork</goal>
327                </goals>
328              </execution>
329            </executions>
330          </plugin>
331          <plugin>
332            <groupId>org.apache.maven.plugins</groupId>
333            <artifactId>maven-javadoc-plugin</artifactId>
334            <version>${maven-javadoc-plugin.version}</version>
335            <executions>
336              <execution>
337                <id>attach-javadocs</id>
338                <goals>
339                  <goal>jar</goal>
340                </goals>
341              </execution>
342            </executions>
343          </plugin>
344          <plugin>
345            <groupId>org.apache.maven.plugins</groupId>
346            <artifactId>maven-gpg-plugin</artifactId>
347            <version>3.0.1</version>
348            <executions>
349              <execution>
350                <id>sign-artifacts</id>
351                <phase>verify</phase>
352                <goals>
353                  <goal>sign</goal>
354                </goals>
355              </execution>
356            </executions>
357          </plugin>
358        </plugins>
359      </build>
360    </profile>
361    <profile>
362      <id>eclipse</id>
363      <activation>
364        <jdk>[17,)</jdk>
365      </activation>
366      <modules>
367        <module>eclipse_plugin</module>
368      </modules>
369    </profile>
370  </profiles>
371</project>
372