xref: /aosp_15_r20/external/jsoup/pom.xml (revision 6da8f8c4bc310ad659121b84dd089062417a2ce2)
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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3  <modelVersion>4.0.0</modelVersion>
4  <name>jsoup Java HTML Parser</name>
5
6  <groupId>org.jsoup</groupId>
7  <artifactId>jsoup</artifactId>
8  <version>1.17.2</version><!-- remember to update previous version below for japicmp -->
9  <url>https://jsoup.org/</url>
10  <description>jsoup is a Java library that simplifies working with real-world HTML and XML. It offers an easy-to-use API for URL fetching, data parsing, extraction, and manipulation using DOM API methods, CSS, and xpath selectors. jsoup implements the WHATWG HTML5 specification, and parses HTML to the same DOM as modern browsers.</description>
11  <inceptionYear>2009</inceptionYear>
12  <issueManagement>
13    <system>GitHub</system>
14    <url>https://github.com/jhy/jsoup/issues</url>
15  </issueManagement>
16  <licenses>
17    <license>
18      <name>The MIT License</name>
19      <url>https://jsoup.org/license</url>
20      <distribution>repo</distribution>
21    </license>
22  </licenses>
23  <scm>
24    <url>https://github.com/jhy/jsoup</url>
25    <connection>scm:git:https://github.com/jhy/jsoup.git</connection>
26    <!-- <developerConnection>scm:git:[email protected]:jhy/jsoup.git</developerConnection> -->
27    <tag>jsoup-1.17.2</tag>
28  </scm>
29  <organization>
30    <name>Jonathan Hedley</name>
31    <url>https://jhy.io/</url>
32  </organization>
33
34  <properties>
35    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36    <jetty.version>9.4.53.v20231009</jetty.version>
37  </properties>
38
39  <build>
40    <plugins>
41      <!-- Compile -->
42      <plugin>
43        <groupId>org.apache.maven.plugins</groupId>
44        <artifactId>maven-compiler-plugin</artifactId>
45        <version>3.12.1</version>
46        <configuration>
47          <encoding>UTF-8</encoding>
48          <compilerArgs>
49            <!-- saves output for package-info.java, so mvn sees it has completed it, so incremental compile works -->
50            <arg>-Xpkginfo:always</arg>
51          </compilerArgs>
52          <!-- this means incremental = true... -->
53          <useIncrementalCompilation>false</useIncrementalCompilation>
54        </configuration>
55        <executions>
56          <execution>
57            <id>compile-java-8</id>
58            <configuration>
59              <source>1.8</source>
60              <target>1.8</target>
61            </configuration>
62          </execution>
63          <!-- There is a JDK 9+ profile execution below, which adds multi-release=true and compiles module-info -->
64        </executions>
65      </plugin>
66
67      <!-- Ensure Java 8 and Android 10 API compatibility -->
68      <plugin>
69        <groupId>org.codehaus.mojo</groupId>
70        <artifactId>animal-sniffer-maven-plugin</artifactId>
71        <version>1.23</version>
72        <executions>
73          <execution>
74            <id>animal-sniffer</id>
75            <phase>compile</phase>
76            <goals>
77              <goal>check</goal>
78            </goals>
79            <configuration>
80              <signature>
81                <groupId>org.codehaus.mojo.signature</groupId>
82                <artifactId>java18</artifactId>
83                <version>1.0</version>
84              </signature>
85              <signature>
86                <groupId>net.sf.androidscents.signature</groupId>
87                <artifactId>android-api-level-10</artifactId>
88                <version>2.3.3_r2</version>
89              </signature>
90              <ignores>
91                <ignore>java.util.function.*</ignore>
92                <ignore>java.util.stream.*</ignore>
93                <ignore>java.lang.ThreadLocal</ignore>
94                <ignore>java.io.UncheckedIOException</ignore>
95                <ignore>java.util.List</ignore> <!-- List#stream() -->
96                <ignore>java.util.Objects</ignore>
97                <ignore>java.util.Optional</ignore>
98                <ignore>java.util.Spliterator</ignore>
99                <ignore>java.util.Spliterators</ignore>
100
101                <ignore>java.net.HttpURLConnection</ignore><!-- .setAuthenticator(java.net.Authenticator) in Java 9; only used in multirelease 9+ version -->
102              </ignores>
103              <!-- ^ Provided by https://developer.android.com/studio/write/java8-support#library-desugaring
104               Possibly OK to remove androidscents; keep for now to validate other additions are supported. -->
105            </configuration>
106          </execution>
107        </executions>
108      </plugin>
109      <plugin>
110        <groupId>org.apache.maven.plugins</groupId>
111        <artifactId>maven-javadoc-plugin</artifactId>
112        <version>3.6.3</version>
113        <configuration>
114          <doclint>none</doclint>
115          <source>8</source>
116          <linksource>true</linksource>
117        </configuration>
118        <executions>
119          <execution>
120            <id>attach-javadoc</id>
121            <goals>
122              <goal>jar</goal>
123            </goals>
124          </execution>
125        </executions>
126      </plugin>
127      <plugin>
128        <groupId>org.apache.maven.plugins</groupId>
129        <artifactId>maven-source-plugin</artifactId>
130        <version>3.3.0</version>
131        <configuration>
132          <excludes>
133            <exclude>org/jsoup/examples/**</exclude>
134          </excludes>
135        </configuration>
136        <executions>
137          <execution>
138            <id>attach-sources</id>
139            <goals>
140              <goal>jar-no-fork</goal>
141            </goals>
142          </execution>
143        </executions>
144      </plugin>
145      <plugin>
146        <groupId>org.apache.maven.plugins</groupId>
147        <artifactId>maven-jar-plugin</artifactId>
148        <version>3.3.0</version>
149        <configuration>
150          <archive>
151            <manifest>
152              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
153            </manifest>
154            <manifestEntries>
155              <Multi-Release>true</Multi-Release>
156            </manifestEntries>
157            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
158          </archive>
159          <excludes>
160            <exclude>org/jsoup/examples/**</exclude>
161          </excludes>
162        </configuration>
163      </plugin>
164      <plugin>
165        <groupId>org.apache.felix</groupId>
166        <artifactId>maven-bundle-plugin</artifactId>
167        <version>5.1.9</version>
168        <executions>
169          <execution>
170            <id>bundle-manifest</id>
171            <phase>process-classes</phase>
172            <goals>
173              <goal>manifest</goal>
174            </goals>
175          </execution>
176        </executions>
177        <configuration>
178          <instructions>
179            <Bundle-DocURL>https://jsoup.org/</Bundle-DocURL>
180            <Export-Package>org.jsoup.*</Export-Package>
181            <Import-Package>org.jspecify.annotations;version=!;resolution:=optional,*</Import-Package>
182          </instructions>
183        </configuration>
184      </plugin>
185      <plugin>
186        <groupId>org.apache.maven.plugins</groupId>
187        <artifactId>maven-resources-plugin</artifactId>
188        <version>3.3.1</version>
189      </plugin>
190      <plugin>
191        <artifactId>maven-release-plugin</artifactId>
192        <version>3.0.1</version>
193      </plugin>
194      <plugin>
195        <groupId>org.apache.maven.plugins</groupId>
196        <artifactId>maven-surefire-plugin</artifactId>
197        <version>3.2.3</version>
198        <configuration>
199          <!-- smaller stack to find stack overflows -->
200          <argLine>-Xss256k</argLine>
201        </configuration>
202      </plugin>
203      <plugin>
204        <artifactId>maven-failsafe-plugin</artifactId>
205        <version>3.2.3</version>
206        <executions>
207          <execution>
208            <goals>
209              <goal>integration-test</goal>
210              <goal>verify</goal>
211            </goals>
212          </execution>
213        </executions>
214        <configuration>
215          <parallel>methods</parallel>
216          <threadCount>8</threadCount>
217        </configuration>
218      </plugin>
219      <plugin>
220        <!-- API version compat check - https://siom79.github.io/japicmp/ -->
221        <groupId>com.github.siom79.japicmp</groupId>
222        <artifactId>japicmp-maven-plugin</artifactId>
223        <version>0.18.3</version>
224        <configuration>
225          <!-- hard code previous version; can't detect when running stateless on build server -->
226          <oldVersion>
227            <dependency>
228              <groupId>org.jsoup</groupId>
229              <artifactId>jsoup</artifactId>
230              <version>1.16.2</version>
231              <type>jar</type>
232            </dependency>
233          </oldVersion>
234          <parameter>
235            <!-- jsoup policy is ok to remove deprecated methods on minor but not builds. will need to temp remove on bump to 1.15.1 and manually validate -->
236            <onlyModified>false</onlyModified>
237            <breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
238            <breakBuildOnSourceIncompatibleModifications>true</breakBuildOnSourceIncompatibleModifications>
239            <excludes>
240              <!-- <exclude>@java.lang.Deprecated</exclude> -->
241            </excludes>
242            <overrideCompatibilityChangeParameters>
243              <!-- allows new default and move to default methods. compatible as long as existing binaries aren't making calls via reflection. if so, they need to catch errors anyway. -->
244              <overrideCompatibilityChangeParameter>
245                <compatibilityChange>METHOD_NEW_DEFAULT</compatibilityChange>
246                <binaryCompatible>true</binaryCompatible>
247                <sourceCompatible>true</sourceCompatible>
248              </overrideCompatibilityChangeParameter>
249              <overrideCompatibilityChangeParameter>
250                <compatibilityChange>METHOD_ABSTRACT_NOW_DEFAULT</compatibilityChange>
251                <binaryCompatible>true</binaryCompatible>
252                <sourceCompatible>true</sourceCompatible>
253              </overrideCompatibilityChangeParameter>
254
255              <!--
256                One off, getting a spurious ping on adding [<T extends Node> Stream<T> nodeStream(Class<T> class)] to Node.
257                Manually verified binary & source compatibility
258                todo: remove after 1.17.1 release
259               -->
260              <overrideCompatibilityChangeParameter>
261                <compatibilityChange>CLASS_GENERIC_TEMPLATE_CHANGED</compatibilityChange>
262                <binaryCompatible>true</binaryCompatible>
263                <sourceCompatible>true</sourceCompatible>
264              </overrideCompatibilityChangeParameter>
265
266            </overrideCompatibilityChangeParameters>
267          </parameter>
268        </configuration>
269        <executions>
270          <execution>
271            <phase>package</phase>
272            <goals>
273              <goal>cmp</goal>
274            </goals>
275          </execution>
276        </executions>
277      </plugin>
278    </plugins>
279    <resources>
280      <resource>
281        <directory>./</directory>
282        <targetPath>META-INF/</targetPath>
283        <filtering>false</filtering>
284        <includes>
285          <include>LICENSE</include>
286          <include>README.md</include>
287          <include>CHANGES</include>
288        </includes>
289      </resource>
290    </resources>
291  </build>
292
293  <distributionManagement>
294    <snapshotRepository>
295      <id>sonatype-nexus-snapshots</id>
296      <name>Sonatype Nexus Snapshots</name>
297      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
298    </snapshotRepository>
299    <repository>
300      <id>sonatype-nexus-staging</id>
301      <name>Nexus Release Repository</name>
302      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
303    </repository>
304  </distributionManagement>
305
306  <profiles>
307    <!-- Compiles the multi-release jar when executed on JDK9+ -->
308    <profile>
309      <id>compile-multi-release</id>
310      <activation>
311        <jdk>[9,2000)</jdk>
312      </activation>
313      <build>
314        <plugins>
315          <plugin>
316            <groupId>org.apache.maven.plugins</groupId>
317            <artifactId>maven-compiler-plugin</artifactId>
318            <executions>
319              <execution>
320                <id>compile-java-8</id>
321                <configuration>
322                  <release>8</release>
323                </configuration>
324              </execution>
325              <execution>
326                <id>compile-java-9</id>
327                <phase>compile</phase>
328                <goals>
329                  <goal>compile</goal>
330                </goals>
331                <configuration>
332                  <release>9</release>
333                  <compileSourceRoots>
334                    <compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
335                  </compileSourceRoots>
336                  <multiReleaseOutput>true</multiReleaseOutput>
337                </configuration>
338              </execution>
339            </executions>
340          </plugin>
341        </plugins>
342      </build>
343    </profile>
344
345    <profile>
346      <id>release-sign-artifacts</id>
347      <activation>
348        <property>
349          <name>performRelease</name>
350          <value>true</value>
351        </property>
352      </activation>
353      <build>
354        <plugins>
355          <plugin>
356            <groupId>org.apache.maven.plugins</groupId>
357            <artifactId>maven-gpg-plugin</artifactId>
358            <executions>
359              <execution>
360                <id>sign-artifacts</id>
361                <phase>package</phase>
362                <goals>
363                  <goal>sign</goal>
364                </goals>
365              </execution>
366            </executions>
367          </plugin>
368        </plugins>
369      </build>
370    </profile>
371    <profile>
372      <id>failsafe</id>
373      <build>
374        <plugins>
375          <plugin>
376            <artifactId>maven-failsafe-plugin</artifactId>
377            <version>3.2.3</version>
378            <executions>
379              <execution>
380                <goals>
381                  <goal>integration-test</goal>
382                  <goal>verify</goal>
383                </goals>
384              </execution>
385            </executions>
386          </plugin>
387        </plugins>
388      </build>
389    </profile>
390  </profiles>
391
392  <dependencies>
393
394    <!-- junit -->
395    <dependency>
396      <groupId>org.junit.jupiter</groupId>
397      <artifactId>junit-jupiter</artifactId>
398      <version>5.10.1</version>
399      <scope>test</scope>
400    </dependency>
401
402    <dependency>
403      <!-- gson, to fetch entities from w3.org -->
404      <groupId>com.google.code.gson</groupId>
405      <artifactId>gson</artifactId>
406      <version>2.10.1</version>
407      <scope>test</scope>
408    </dependency>
409
410    <dependency>
411      <!-- jetty for webserver integration tests. 9.x is last with Java7 support -->
412      <groupId>org.eclipse.jetty</groupId>
413      <artifactId>jetty-server</artifactId>
414      <version>${jetty.version}</version>
415      <scope>test</scope>
416    </dependency>
417
418    <dependency>
419      <!-- jetty for webserver integration tests -->
420      <groupId>org.eclipse.jetty</groupId>
421      <artifactId>jetty-servlet</artifactId>
422      <version>${jetty.version}</version>
423      <scope>test</scope>
424    </dependency>
425
426    <dependency>
427      <!-- jetty proxy, for integration tests -->
428      <groupId>org.eclipse.jetty</groupId>
429      <artifactId>jetty-proxy</artifactId>
430      <version>${jetty.version}</version>
431      <scope>test</scope>
432    </dependency>
433
434    <dependency>
435      <!-- org.jspecify.annotations.nonnull, with Apache 2 license. Build time only. -->
436      <groupId>org.jspecify</groupId>
437      <artifactId>jspecify</artifactId>
438      <version>0.3.0</version>
439      <scope>provided</scope>
440    </dependency>
441  </dependencies>
442
443  <dependencyManagement>
444    <dependencies>
445    </dependencies>
446  </dependencyManagement>
447
448  <developers>
449    <developer>
450      <id>jhy</id>
451      <name>Jonathan Hedley</name>
452      <email>[email protected]</email>
453      <roles>
454        <role>Lead Developer</role>
455      </roles>
456      <timezone>+11</timezone>
457    </developer>
458  </developers>
459
460</project>
461