• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4  <modelVersion>4.0.0</modelVersion>
5  <parent>
6    <groupId>com.google.truth</groupId>
7    <artifactId>truth-parent</artifactId>
8    <version>HEAD-SNAPSHOT</version>
9  </parent>
10  <artifactId>truth</artifactId>
11  <name>Truth Core</name>
12  <dependencies>
13    <dependency>
14      <groupId>com.google.guava</groupId>
15      <artifactId>guava</artifactId>
16    </dependency>
17    <dependency>
18      <groupId>org.jspecify</groupId>
19      <artifactId>jspecify</artifactId>
20    </dependency>
21    <dependency>
22      <groupId>junit</groupId>
23      <artifactId>junit</artifactId>
24    </dependency>
25    <!-- Required only to test the -gwt sub-artifact. -->
26    <dependency>
27      <groupId>org.gwtproject</groupId>
28      <artifactId>gwt-user</artifactId>
29      <scope>test</scope>
30    </dependency>
31    <dependency>
32      <groupId>com.google.auto.value</groupId>
33      <artifactId>auto-value-annotations</artifactId>
34    </dependency>
35    <dependency>
36      <groupId>com.google.guava</groupId>
37      <artifactId>guava-gwt</artifactId>
38      <scope>test</scope>
39    </dependency>
40    <dependency>
41      <groupId>com.google.guava</groupId>
42      <artifactId>guava-testlib</artifactId>
43      <scope>test</scope>
44    </dependency>
45    <dependency>
46      <groupId>com.google.errorprone</groupId>
47      <artifactId>error_prone_annotations</artifactId>
48    </dependency>
49    <dependency>
50      <groupId>org.ow2.asm</groupId>
51      <artifactId>asm</artifactId>
52      <!-- Truth works fine without ASM: It just produces slightly less useful failure messages. Thus, users can exclude ASM if they prefer to reduce dependencies. (For example, ASM will not benefit anyone whose tests run in an Android VM.) Still, we have made it a dependency by default (non-<optional>), both because it provides useful functionality and because we have heard of problems with R8 when it is absent. -->
53    </dependency>
54  </dependencies>
55  <build>
56    <resources>
57      <resource>
58        <directory>src/main/java</directory>
59        <excludes>
60          <exclude>**/*.java</exclude>
61          <exclude>**/*.gwt.xml</exclude>
62        </excludes>
63      </resource>
64      <resource>
65        <directory>..</directory>
66        <includes>
67          <include>LICENSE</include>
68        </includes>
69        <targetPath>META-INF</targetPath>
70      </resource>
71    </resources>
72    <testResources>
73      <testResource><directory>src/test/java</directory></testResource>
74    </testResources>
75    <plugins>
76      <plugin>
77        <artifactId>maven-javadoc-plugin</artifactId>
78      </plugin>
79      <plugin>
80        <artifactId>maven-compiler-plugin</artifactId>
81        <configuration>
82          <excludes>
83            <exclude>**/super/**/*.java</exclude>
84          </excludes>
85          <testExcludes>
86            <testExclude>**/super/**/*.java</testExclude>
87          </testExcludes>
88          <annotationProcessorPaths>
89            <path>
90              <groupId>com.google.auto.value</groupId>
91              <artifactId>auto-value</artifactId>
92              <version>${auto-value.version}</version>
93            </path>
94          </annotationProcessorPaths>
95        </configuration>
96      </plugin>
97      <plugin>
98        <artifactId>maven-source-plugin</artifactId>
99        <configuration>
100          <excludes>
101            <exclude>**/super/**</exclude>
102            <exclude>**/*.gwt.xml</exclude>
103          </excludes>
104        </configuration>
105      </plugin>
106      <plugin>
107        <artifactId>maven-jar-plugin</artifactId>
108        <executions>
109          <execution>
110            <id>attach-gwt-sources</id>
111            <phase>post-integration-test</phase>
112            <goals><goal>jar</goal></goals>
113            <configuration>
114              <classifier>gwt</classifier>
115              <classesDirectory>${project.build.directory}/gwt-sources</classesDirectory>
116            </configuration>
117          </execution>
118        </executions>
119      </plugin>
120      <plugin>
121        <groupId>org.codehaus.mojo</groupId>
122        <artifactId>animal-sniffer-maven-plugin</artifactId>
123      </plugin>
124      <plugin>
125        <artifactId>maven-surefire-plugin</artifactId>
126        <configuration>
127          <excludes>
128            <exclude>**/*GwtTest.java</exclude>
129          </excludes>
130        </configuration>
131      </plugin>
132      <plugin>
133        <groupId>org.codehaus.mojo</groupId>
134        <artifactId>gwt-maven-plugin</artifactId>
135        <executions>
136          <execution>
137            <id>gwt-test</id>
138            <goals><goal>test</goal></goals>
139            <configuration>
140              <mode>htmlunit</mode>
141              <htmlunit>FF</htmlunit>
142              <productionMode>true</productionMode>
143              <!-- Fix OutOfMemoryError in Travis. -->
144              <extraJvmArgs>-Xms3500m -Xmx3500m -Xss1024k</extraJvmArgs>
145              <sourceLevel>auto</sourceLevel>
146              <userAgents>gecko1_8</userAgents>
147              <includes>**/*GwtTest.java</includes>
148              <!-- Keep these timeouts very large because, if we hit the timeout, the tests silently pass :( -->
149              <testTimeOut>86400 <!-- seconds --></testTimeOut>
150              <testMethodTimeout>1440 <!-- minutes --></testMethodTimeout>
151            </configuration>
152          </execution>
153        </executions>
154      </plugin>
155      <!-- We need to strip "@Nullable" from the sources that we hand to GWT:
156           b/183648616. To do that, we have to make a copy of the original
157           source directory and add that directory as a Maven source root. But
158           the added root comes *after* the original root, so, in order to make
159           GWT choose those sources in preference to the originals, we need to
160           put them in a `super` directory.
161
162           TODO(b/183648616): Once we can use @Nullable from GWT, generate the
163           GWT jar from the original sources instead of these sources that we
164           strip @Nullable from. -->
165      <plugin>
166        <groupId>org.codehaus.mojo</groupId>
167        <artifactId>build-helper-maven-plugin</artifactId>
168        <version>3.6.0</version>
169        <executions>
170          <execution>
171            <id>add-source</id>
172            <phase>generate-sources</phase>
173            <goals>
174              <goal>add-source</goal>
175            </goals>
176            <configuration>
177              <sources>
178                <source>${project.build.directory}/gwt-sources</source>
179              </sources>
180            </configuration>
181          </execution>
182        </executions>
183      </plugin>
184      <plugin>
185        <artifactId>maven-antrun-plugin</artifactId>
186        <version>3.1.0</version>
187        <executions>
188          <execution>
189            <id>copy-gwt-files</id>
190            <phase>generate-sources</phase>
191            <goals><goal>run</goal></goals>
192            <configuration>
193              <target name="copy-gwt-resources">
194                <copy toDir="${project.build.directory}/gwt-sources">
195                  <fileset dir="${project.basedir}/src/main/java">
196                    <include name="**/super/**/*.java"/>
197                    <include name="**/*.gwt.xml"/>
198                  </fileset>
199                </copy>
200                <copy toDir="${project.build.directory}/gwt-sources/com/google/common/truth/super">
201                  <fileset dir="${project.basedir}/src/main/java">
202                    <!-- Don't put files under .../super/.../super/... -->
203                    <exclude name="**/super/**/*.java"/>
204                    <!-- Don't put the .gwt.xml under super -->
205                    <exclude name="**/*.gwt.xml"/>
206                  </fileset>
207                </copy>
208                <replace token="@Nullable" value="">
209                  <fileset dir="${project.build.directory}/gwt-sources">
210                    <include name="**/super/**/*.java"/>
211                  </fileset>
212                </replace>
213                <replace token="@NonNull" value="">
214                  <fileset dir="${project.build.directory}/gwt-sources">
215                    <include name="**/super/**/*.java"/>
216                  </fileset>
217                </replace>
218              </target>
219            </configuration>
220          </execution>
221        </executions>
222      </plugin>
223    </plugins>
224  </build>
225  <reporting>
226    <plugins>
227      <plugin>
228        <groupId>org.apache.maven.plugins</groupId>
229        <artifactId>maven-project-info-reports-plugin</artifactId>
230        <version>3.6.1</version>
231      </plugin>
232    </plugins>
233  </reporting>
234  <profiles>
235    <profile>
236      <id>java8</id>
237      <activation>
238        <jdk>[1.8,)</jdk>
239      </activation>
240      <properties>
241        <javadoc.param>-Xdoclint:none</javadoc.param>
242      </properties>
243    </profile>
244  </profiles>
245</project>
246