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/master/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.6.0</kotlin.version> 36 <exclude.tests>this-matches-nothing</exclude.tests> 37 </properties> 38 <dependencies> 39 <dependency> 40 <groupId>com.google.auto.value</groupId> 41 <artifactId>auto-value-annotations</artifactId> 42 <version>${project.version}</version> 43 </dependency> 44 <dependency> 45 <groupId>com.google.auto.value</groupId> 46 <artifactId>auto-value</artifactId> 47 <version>${project.version}</version> 48 </dependency> 49 <dependency> 50 <groupId>com.google.auto.service</groupId> 51 <artifactId>auto-service</artifactId> 52 <version>1.0.1</version> 53 </dependency> 54 <dependency> 55 <groupId>com.google.guava</groupId> 56 <artifactId>guava</artifactId> 57 </dependency> 58 <dependency> 59 <groupId>com.google.code.findbugs</groupId> 60 <artifactId>jsr305</artifactId> 61 <scope>provided</scope> 62 </dependency> 63 <dependency> 64 <groupId>com.google.gwt</groupId> 65 <artifactId>gwt-user</artifactId> 66 <version>2.9.0</version> 67 </dependency> 68 <dependency> 69 <groupId>junit</groupId> 70 <artifactId>junit</artifactId> 71 <scope>test</scope> 72 </dependency> 73 <dependency> 74 <groupId>com.google.guava</groupId> 75 <artifactId>guava-testlib</artifactId> 76 <scope>test</scope> 77 </dependency> 78 <dependency> 79 <groupId>com.google.truth</groupId> 80 <artifactId>truth</artifactId> 81 <scope>test</scope> 82 </dependency> 83 <dependency> 84 <groupId>com.google.truth.extensions</groupId> 85 <artifactId>truth-java8-extension</artifactId> 86 <scope>test</scope> 87 </dependency> 88 <dependency> 89 <groupId>com.google.testing.compile</groupId> 90 <artifactId>compile-testing</artifactId> 91 <scope>test</scope> 92 </dependency> 93 <dependency> 94 <groupId>dev.gradleplugins</groupId> 95 <artifactId>gradle-test-kit</artifactId> 96 <version>7.3</version> 97 <scope>test</scope> 98 </dependency> 99 <dependency> 100 <groupId>org.mockito</groupId> 101 <artifactId>mockito-core</artifactId> 102 <version>4.1.0</version> 103 <scope>test</scope> 104 </dependency> 105 <dependency> 106 <groupId>org.eclipse.jdt</groupId> 107 <artifactId>ecj</artifactId> 108 <version>3.25.0</version> 109 </dependency> 110 <dependency> 111 <groupId>com.google.escapevelocity</groupId> 112 <artifactId>escapevelocity</artifactId> 113 <version>0.9.1</version> 114 </dependency> 115 <dependency> 116 <groupId>org.jetbrains.kotlin</groupId> 117 <artifactId>kotlin-stdlib</artifactId> 118 <version>${kotlin.version}</version> 119 </dependency> 120 </dependencies> 121 122 <build> 123 <plugins> 124 <plugin> 125 <groupId>org.apache.maven.plugins</groupId> 126 <artifactId>maven-jar-plugin</artifactId> 127 <version>3.2.0</version> 128 </plugin> 129 <plugin> 130 <groupId>org.jetbrains.kotlin</groupId> 131 <artifactId>kotlin-maven-plugin</artifactId> 132 <version>${kotlin.version}</version> 133 <executions> 134 <!-- 135 The Kotlin configuration here is a bit unusual. JetBrains recommends 136 <https://kotlinlang.org/docs/maven.html#compile-kotlin-and-java-sources> 137 a fairly invasive reconfiguration of the maven-compiler-plugin (which compiles Java) 138 in order to ensure that the Kotlin compiler can run first. In our case, we have just 139 one Kotlin file that a test in Java accesses. So, even though it is in src/test/java, 140 we compile it in the `compile` goal, which means it is available to the Java test sources 141 when they are compiled in the `default-testCompile` goal. 142 143 Currently if you want to use JDK ≥ 16 then you must set 144 JAVA_TOOL_OPTIONS=__illegal-access=permit 145 except the two underscores should be dashes (which XML comments won't allow us to write). 146 This is a bug that will presumably be fixed in a forthcoming version. 147 --> 148 <execution> 149 <id>compile</id> 150 <goals> 151 <goal>compile</goal> 152 </goals> 153 <configuration> 154 <sourceDirs> 155 <sourceDir>${project.basedir}/src/test/java</sourceDir> 156 </sourceDirs> 157 </configuration> 158 </execution> 159 </executions> 160 </plugin> 161 <plugin> 162 <groupId>org.apache.maven.plugins</groupId> 163 <artifactId>maven-compiler-plugin</artifactId> 164 <version>3.8.1</version> 165 <dependencies> 166 <dependency> 167 <groupId>org.codehaus.plexus</groupId> 168 <artifactId>plexus-java</artifactId> 169 <version>1.1.0</version> 170 </dependency> 171 </dependencies> 172 <configuration> 173 <source>${java.specification.version}</source> 174 <target>${java.specification.version}</target> 175 <compilerArgs> 176 <arg>-Xlint:all</arg> 177 <arg>-encoding</arg> 178 <arg>utf8</arg> 179 </compilerArgs> 180 <showWarnings>true</showWarnings> 181 <showDeprecation>true</showDeprecation> 182 <testExcludes> 183 <exclude>${exclude.tests}</exclude> 184 </testExcludes> 185 </configuration> 186 </plugin> 187 <plugin> 188 <groupId>org.apache.maven.plugins</groupId> 189 <artifactId>maven-deploy-plugin</artifactId> 190 <version>2.8.2</version> 191 <configuration> 192 <!-- Build/test, but don't deploy --> 193 <skip>true</skip> 194 </configuration> 195 </plugin> 196 <plugin> 197 <groupId>org.apache.maven.plugins</groupId> 198 <artifactId>maven-surefire-plugin</artifactId> 199 <version>2.22.2</version> 200 <configuration> 201 <argLine>${test.jvm.flags}</argLine> 202 <systemPropertyVariables> 203 <autoValueVersion>${project.version}</autoValueVersion> 204 </systemPropertyVariables> 205 </configuration> 206 </plugin> 207 </plugins> 208 </build> 209 210 <profiles> 211 <profile> 212 <id>eclipse</id> 213 <build> 214 <plugins> 215 <plugin> 216 <groupId>org.apache.maven.plugins</groupId> 217 <artifactId>maven-compiler-plugin</artifactId> 218 <version>3.8.1</version> 219 <dependencies> 220 <dependency> 221 <groupId>org.codehaus.plexus</groupId> 222 <artifactId>plexus-java</artifactId> 223 <version>1.1.0</version> 224 </dependency> 225 </dependencies> 226 <configuration> 227 <source>${java.specification.version}</source> 228 <target>${java.specification.version}</target> 229 <compilerArgs> 230 <arg>-Xlint:all</arg> 231 <arg>-encoding</arg> 232 <arg>utf8</arg> 233 </compilerArgs> 234 <showWarnings>true</showWarnings> 235 <showDeprecation>true</showDeprecation> 236 <testExcludes> 237 <exclude>${exclude.tests}</exclude> 238 </testExcludes> 239 </configuration> 240 </plugin> 241 </plugins> 242 </build> 243 </profile> 244 <profile> 245 <id>exclude-java8-tests</id> 246 <activation> 247 <jdk>(,1.7]</jdk> 248 </activation> 249 <properties> 250 <exclude.tests>**/AutoValueJava8Test.java</exclude.tests> 251 </properties> 252 </profile> 253 <profile> 254 <id>open-modules</id> 255 <activation> 256 <jdk>[9,)</jdk> 257 </activation> 258 <properties> 259 <test.jvm.flags>--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</test.jvm.flags> 260 </properties> 261 </profile> 262 <profile> 263 <!-- Before JDK 11, parameter names from already-compiled classes are not reliably available 264 to the compiler even when they are present in class files. Since our Kotlin test file 265 obviously has to be compiled separately from the Java test that uses it, 266 AutoBuilderKotlinTest doesn't pass on earlier JDK versions. --> 267 <id>exclude-separate-compilation-parameter-names</id> 268 <activation> 269 <jdk>(,11)</jdk> 270 </activation> 271 <properties> 272 <exclude.tests>**/AutoBuilderKotlinTest.java</exclude.tests> 273 </properties> 274 </profile> 275 </profiles> 276</project> 277