• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3  Copyright 2013 Google LLC
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<!-- TODO(gak): see if we can manage these dependencies any better -->
18<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
20  <modelVersion>4.0.0</modelVersion>
21
22  <parent>
23    <groupId>com.google.auto.value</groupId>
24    <artifactId>auto-value-parent</artifactId>
25    <version>HEAD-SNAPSHOT</version>
26    <relativePath>../../../pom.xml</relativePath>
27  </parent>
28  <url>https://github.com/google/auto/tree/main/value</url>
29
30  <groupId>com.google.auto.value.it.functional</groupId>
31  <artifactId>functional</artifactId>
32  <version>HEAD-SNAPSHOT</version>
33  <name>Auto-Value Functional Integration Test</name>
34  <properties>
35    <kotlin.version>1.9.10</kotlin.version>
36  </properties>
37  <dependencies>
38    <dependency>
39      <groupId>com.google.auto.value</groupId>
40      <artifactId>auto-value-annotations</artifactId>
41      <version>${project.version}</version>
42    </dependency>
43    <dependency>
44      <groupId>com.google.auto.value</groupId>
45      <artifactId>auto-value</artifactId>
46      <version>${project.version}</version>
47    </dependency>
48    <dependency>
49      <groupId>com.google.auto.service</groupId>
50      <artifactId>auto-service</artifactId>
51      <version>1.1.1</version>
52    </dependency>
53    <dependency>
54      <groupId>com.google.guava</groupId>
55      <artifactId>guava</artifactId>
56    </dependency>
57    <dependency>
58      <groupId>com.google.code.findbugs</groupId>
59      <artifactId>jsr305</artifactId>
60      <scope>provided</scope>
61    </dependency>
62    <dependency>
63      <groupId>org.gwtproject</groupId>
64      <artifactId>gwt-user</artifactId>
65      <version>2.10.0</version>
66    </dependency>
67    <dependency>
68      <groupId>junit</groupId>
69      <artifactId>junit</artifactId>
70      <scope>test</scope>
71    </dependency>
72    <dependency>
73      <groupId>com.google.guava</groupId>
74      <artifactId>guava-testlib</artifactId>
75      <scope>test</scope>
76    </dependency>
77    <dependency>
78      <groupId>com.google.truth</groupId>
79      <artifactId>truth</artifactId>
80      <scope>test</scope>
81    </dependency>
82    <dependency>
83      <groupId>com.google.truth.extensions</groupId>
84      <artifactId>truth-java8-extension</artifactId>
85      <scope>test</scope>
86    </dependency>
87    <dependency>
88      <groupId>com.google.testing.compile</groupId>
89      <artifactId>compile-testing</artifactId>
90      <scope>test</scope>
91    </dependency>
92    <dependency>
93      <groupId>dev.gradleplugins</groupId>
94      <artifactId>gradle-test-kit</artifactId>
95      <version>8.3</version>
96      <scope>test</scope>
97    </dependency>
98    <dependency>
99      <groupId>com.google.escapevelocity</groupId>
100      <artifactId>escapevelocity</artifactId>
101      <version>1.1</version>
102    </dependency>
103    <dependency>
104      <groupId>org.jetbrains.kotlin</groupId>
105      <artifactId>kotlin-stdlib</artifactId>
106      <version>${kotlin.version}</version>
107    </dependency>
108  </dependencies>
109
110  <build>
111    <plugins>
112      <plugin>
113        <groupId>org.apache.maven.plugins</groupId>
114        <artifactId>maven-jar-plugin</artifactId>
115        <version>3.3.0</version>
116      </plugin>
117      <plugin>
118        <groupId>org.jetbrains.kotlin</groupId>
119        <artifactId>kotlin-maven-plugin</artifactId>
120        <version>${kotlin.version}</version>
121        <executions>
122          <!--
123          The Kotlin configuration here is a bit unusual. JetBrains recommends
124          <https://kotlinlang.org/docs/maven.html#compile-kotlin-and-java-sources>
125          a fairly invasive reconfiguration of the maven-compiler-plugin (which compiles Java)
126          in order to ensure that the Kotlin compiler can run first. In our case, we have just
127          one Kotlin file that a test in Java accesses. So, even though it is in src/test/java,
128          we compile it in the `compile` goal, which means it is available to the Java test sources
129          when they are compiled in the `default-testCompile` goal.
130
131          Currently if you want to use JDK ≥ 16 then you must set
132          JAVA_TOOL_OPTIONS=__illegal-access=permit
133          except the two underscores should be dashes (which XML comments won't allow us to write).
134          This is a bug that will presumably be fixed in a forthcoming version.
135          -->
136          <execution>
137            <id>compile</id>
138            <goals>
139              <goal>compile</goal>
140            </goals>
141            <configuration>
142              <sourceDirs>
143                <sourceDir>${project.basedir}/src/test/java</sourceDir>
144              </sourceDirs>
145            </configuration>
146          </execution>
147        </executions>
148      </plugin>
149      <plugin>
150        <groupId>org.apache.maven.plugins</groupId>
151        <artifactId>maven-compiler-plugin</artifactId>
152        <version>3.11.0</version>
153        <dependencies>
154          <dependency>
155            <groupId>org.codehaus.plexus</groupId>
156            <artifactId>plexus-java</artifactId>
157            <version>1.1.2</version>
158          </dependency>
159        </dependencies>
160        <configuration>
161          <source>${java.specification.version}</source>
162          <target>${java.specification.version}</target>
163          <compilerArgs>
164            <arg>-Xlint:all</arg>
165            <arg>-encoding</arg>
166            <arg>utf8</arg>
167          </compilerArgs>
168          <showWarnings>true</showWarnings>
169          <showDeprecation>true</showDeprecation>
170          <testExcludes combine.children="append" />
171        </configuration>
172      </plugin>
173      <plugin>
174        <groupId>org.apache.maven.plugins</groupId>
175        <artifactId>maven-deploy-plugin</artifactId>
176        <version>3.1.1</version>
177        <configuration>
178          <!-- Build/test, but don't deploy -->
179          <skip>true</skip>
180        </configuration>
181      </plugin>
182      <plugin>
183        <groupId>org.apache.maven.plugins</groupId>
184        <artifactId>maven-surefire-plugin</artifactId>
185        <version>3.1.2</version>
186      </plugin>
187      <plugin>
188        <groupId>org.apache.maven.plugins</groupId>
189        <artifactId>maven-failsafe-plugin</artifactId>
190        <version>3.1.2</version>
191        <configuration>
192          <systemPropertyVariables>
193            <autoValueVersion>${project.version}</autoValueVersion>
194          </systemPropertyVariables>
195        </configuration>
196        <executions>
197          <execution>
198            <phase>install</phase>
199            <goals>
200              <goal>integration-test</goal>
201              <goal>verify</goal>
202            </goals>
203          </execution>
204        </executions>
205     </plugin>
206    </plugins>
207  </build>
208
209  <profiles>
210    <profile>
211      <id>eclipse</id>
212      <build>
213        <plugins>
214          <plugin>
215            <groupId>org.apache.maven.plugins</groupId>
216            <artifactId>maven-compiler-plugin</artifactId>
217            <version>3.11.0</version>
218            <dependencies>
219              <dependency>
220                <groupId>org.codehaus.plexus</groupId>
221                <artifactId>plexus-java</artifactId>
222                <version>1.1.2</version>
223              </dependency>
224            </dependencies>
225            <configuration>
226              <source>${java.specification.version}</source>
227              <target>${java.specification.version}</target>
228              <compilerArgs>
229                <arg>-Xlint:all</arg>
230                <arg>-encoding</arg>
231                <arg>utf8</arg>
232              </compilerArgs>
233              <showWarnings>true</showWarnings>
234              <showDeprecation>true</showDeprecation>
235              <testExcludes combine.children="append" />
236            </configuration>
237          </plugin>
238        </plugins>
239      </build>
240    </profile>
241
242    <profile>
243      <id>test-with-ecj</id>
244      <activation>
245        <jdk>[11,)</jdk>
246      </activation>
247      <dependencies>
248        <!-- test dependencies -->
249        <dependency>
250          <groupId>org.eclipse.jdt</groupId>
251          <artifactId>ecj</artifactId>
252          <version>3.34.0</version>
253          <scope>test</scope>
254        </dependency>
255      </dependencies>
256    </profile>
257
258    <profile>
259      <id>test-without-ecj</id>
260      <activation>
261        <jdk>(,17)</jdk>
262      </activation>
263      <build>
264        <plugins>
265          <plugin>
266            <artifactId>maven-compiler-plugin</artifactId>
267            <configuration>
268              <testExcludes>
269                <exclude>**/CompileWithEclipseTest.java</exclude>
270              </testExcludes>
271            </configuration>
272          </plugin>
273        </plugins>
274      </build>
275    </profile>
276
277    <profile>
278      <id>exclude-java8-tests</id>
279      <activation>
280        <jdk>(,1.7]</jdk>
281      </activation>
282      <build>
283        <plugins>
284          <plugin>
285            <artifactId>maven-compiler-plugin</artifactId>
286            <configuration>
287              <testExcludes>
288                <exclude>**/AutoValueJava8Test.java</exclude>
289              </testExcludes>
290            </configuration>
291          </plugin>
292        </plugins>
293      </build>
294    </profile>
295
296    <profile>
297      <id>open-modules</id>
298      <activation>
299        <jdk>[9,)</jdk>
300      </activation>
301      <build>
302        <plugins>
303          <plugin>
304            <artifactId>maven-surefire-plugin</artifactId>
305            <configuration>
306              <argLine>--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
307                  --add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
308                  --add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
309              </argLine>
310            </configuration>
311          </plugin>
312        </plugins>
313      </build>
314    </profile>
315
316    <profile>
317      <!-- Before JDK 11, parameter names from already-compiled classes are not reliably available
318           to the compiler even when they are present in class files. Since our Kotlin test file
319           obviously has to be compiled separately from the Java test that uses it,
320           AutoBuilderKotlinTest doesn't pass on earlier JDK versions. -->
321      <id>exclude-separate-compilation-parameter-names</id>
322      <activation>
323        <jdk>(,11)</jdk>
324      </activation>
325      <build>
326        <plugins>
327          <plugin>
328            <artifactId>maven-compiler-plugin</artifactId>
329            <configuration>
330              <testExcludes>
331                <exclude>**/AutoBuilderKotlinTest.java</exclude>
332              </testExcludes>
333            </configuration>
334          </plugin>
335        </plugins>
336      </build>
337    </profile>
338  </profiles>
339</project>
340