aboutsummaryrefslogtreecommitdiff
path: root/value/src/it/functional/pom.xml
blob: 414d6c59e5242b57d9dc95a4c1ed8a833502c428 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2013 Google LLC

  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.
-->
<!-- TODO(gak): see if we can manage these dependencies any better -->
<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>com.google.auto.value</groupId>
    <artifactId>auto-value-parent</artifactId>
    <version>HEAD-SNAPSHOT</version>
    <relativePath>../../../pom.xml</relativePath>
  </parent>
  <url>https://github.com/google/auto/tree/main/value</url>

  <groupId>com.google.auto.value.it.functional</groupId>
  <artifactId>functional</artifactId>
  <version>HEAD-SNAPSHOT</version>
  <name>Auto-Value Functional Integration Test</name>
  <properties>
    <kotlin.version>1.8.22</kotlin.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>com.google.auto.value</groupId>
      <artifactId>auto-value-annotations</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.auto.value</groupId>
      <artifactId>auto-value</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.auto.service</groupId>
      <artifactId>auto-service</artifactId>
      <version>1.1.1</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.gwtproject</groupId>
      <artifactId>gwt-user</artifactId>
      <version>2.10.0</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava-testlib</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.truth</groupId>
      <artifactId>truth</artifactId>
      <scope>test</scope>
    </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>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>dev.gradleplugins</groupId>
      <artifactId>gradle-test-kit</artifactId>
      <version>8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.escapevelocity</groupId>
      <artifactId>escapevelocity</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib</artifactId>
      <version>${kotlin.version}</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.3.0</version>
      </plugin>
      <plugin>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-maven-plugin</artifactId>
        <version>${kotlin.version}</version>
        <executions>
          <!--
          The Kotlin configuration here is a bit unusual. JetBrains recommends
          <https://kotlinlang.org/docs/maven.html#compile-kotlin-and-java-sources>
          a fairly invasive reconfiguration of the maven-compiler-plugin (which compiles Java)
          in order to ensure that the Kotlin compiler can run first. In our case, we have just
          one Kotlin file that a test in Java accesses. So, even though it is in src/test/java,
          we compile it in the `compile` goal, which means it is available to the Java test sources
          when they are compiled in the `default-testCompile` goal.

          Currently if you want to use JDK ≥ 16 then you must set
          JAVA_TOOL_OPTIONS=__illegal-access=permit
          except the two underscores should be dashes (which XML comments won't allow us to write).
          This is a bug that will presumably be fixed in a forthcoming version.
          -->
          <execution>
            <id>compile</id>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <sourceDirs>
                <sourceDir>${project.basedir}/src/test/java</sourceDir>
              </sourceDirs>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.11.0</version>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-java</artifactId>
            <version>1.1.2</version>
          </dependency>
        </dependencies>
        <configuration>
          <source>${java.specification.version}</source>
          <target>${java.specification.version}</target>
          <compilerArgs>
            <arg>-Xlint:all</arg>
            <arg>-encoding</arg>
            <arg>utf8</arg>
          </compilerArgs>
          <showWarnings>true</showWarnings>
          <showDeprecation>true</showDeprecation>
          <testExcludes combine.children="append" />
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>3.1.1</version>
        <configuration>
          <!-- Build/test, but don't deploy -->
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.1.2</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>3.1.2</version>
        <configuration>
          <systemPropertyVariables>
            <autoValueVersion>${project.version}</autoValueVersion>
          </systemPropertyVariables>
        </configuration>
        <executions>
          <execution>
            <phase>install</phase>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
     </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>eclipse</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.11.0</version>
            <dependencies>
              <dependency>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-java</artifactId>
                <version>1.1.2</version>
              </dependency>
            </dependencies>
            <configuration>
              <source>${java.specification.version}</source>
              <target>${java.specification.version}</target>
              <compilerArgs>
                <arg>-Xlint:all</arg>
                <arg>-encoding</arg>
                <arg>utf8</arg>
              </compilerArgs>
              <showWarnings>true</showWarnings>
              <showDeprecation>true</showDeprecation>
              <testExcludes combine.children="append" />
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>test-with-ecj</id>
      <activation>
        <jdk>[11,)</jdk>
      </activation>
      <dependencies>
        <!-- test dependencies -->
        <dependency>
          <groupId>org.eclipse.jdt</groupId>
          <artifactId>ecj</artifactId>
          <version>3.34.0</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>

    <profile>
      <id>test-without-ecj</id>
      <activation>
        <jdk>(,17)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <testExcludes>
                <exclude>**/CompileWithEclipseTest.java</exclude>
              </testExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>exclude-java8-tests</id>
      <activation>
        <jdk>(,1.7]</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <testExcludes>
                <exclude>**/AutoValueJava8Test.java</exclude>
              </testExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>open-modules</id>
      <activation>
        <jdk>[9,)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <argLine>--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
                  --add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
                  --add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
              </argLine>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <!-- Before JDK 11, parameter names from already-compiled classes are not reliably available
           to the compiler even when they are present in class files. Since our Kotlin test file
           obviously has to be compiled separately from the Java test that uses it,
           AutoBuilderKotlinTest doesn't pass on earlier JDK versions. -->
      <id>exclude-separate-compilation-parameter-names</id>
      <activation>
        <jdk>(,11)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <testExcludes>
                <exclude>**/AutoBuilderKotlinTest.java</exclude>
              </testExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>