jsoup
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.23.1</version>
</dependency><?xml version="1.0" encoding="UTF-8"?>
<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">
<modelVersion>4.0.0</modelVersion>
<name>jsoup Java HTML Parser</name>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.23.1</version><!-- remember to update previous version below for japicmp -->
<url>https://jsoup.org/</url>
<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>
<inceptionYear>2009</inceptionYear>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/jhy/jsoup/issues</url>
</issueManagement>
<licenses>
<license>
<name>The MIT License</name>
<url>https://jsoup.org/license</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/jhy/jsoup</url>
<connection>scm:git:https://github.com/jhy/jsoup.git</connection>
<!-- <developerConnection>scm:git:git@github.com:jhy/jsoup.git</developerConnection> -->
<tag>jsoup-1.23.1</tag>
</scm>
<organization>
<name>Jonathan Hedley</name>
<url>https://jhedley.com/</url>
</organization>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<failsafe.excludedGroups>long-running</failsafe.excludedGroups>
</properties>
<build>
<!--
Compilation process to make the multi-release jar:
1. compile-package-info builds the base Java 8 package metadata before Java 11-only targets are visible
2. compile-java8-base and, on JDK 11+, compile-java11-overlay build the shipped production classes
3. check-java8-api and check-android21-api validate the Java 8 base API surface
4. bundle-manifest writes the OSGi metadata, then package assembles the multi-release jar
-->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version>
<configuration>
<encoding>UTF-8</encoding>
<useIncrementalCompilation>false</useIncrementalCompilation>
<compilerArgs>
<arg>-Xpkginfo:always</arg>
</compilerArgs>
</configuration>
<executions>
<!-- Disable the default compile, so the profiles activated below execute -->
<execution>
<id>default-compile</id>
<phase>none</phase>
</execution>
<execution>
<id>default-testCompile</id>
<phase>none</phase>
</execution>
<execution>
<id>compile-package-info</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<source>8</source>
<target>8</target>
<includes>
<include>**/package-info.java</include>
</includes>
<!-- jspecify annotations reference ElementType.MODULE; Java 8-targeted compiles warn while reading that metadata. -->
<compilerArgs combine.children="append">
<arg>-Xlint:none</arg>
</compilerArgs>
</configuration>
</execution>
</executions>
</plugin>
<!-- Ensure Java 8 and Android 10 API compatibility -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.27</version>
<executions>
<execution>
<id>check-java8-api</id>
<phase>compile</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java18</artifactId>
<version>1.0</version>
</signature>
<ignores>
<ignore>java.net.HttpURLConnection</ignore><!-- .setAuthenticator(java.net.Authenticator) in Java 9; only used in multirelease 9+ version -->
<ignore>java.net.http.*</ignore><!-- HttpClient in Java 11; only used in multirelease 11+ version -->
</ignores>
</configuration>
</execution>
<execution>
<id>check-android21-api</id>
<phase>compile</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<signature>
<groupId>com.toasttab.android</groupId>
<artifactId>gummy-bears-api-21</artifactId>
<version>0.10.0</version>
<!-- <classifier>coreLib2</classifier> -->
<!-- ^^ https://github.com/open-toast/gummy-bears says coreLib2 classifier for desugar should work, but I can't seem to wrangle Animal Sniffer to support that, so reverting to ignores for desugar -->
</signature>
<ignores>
<ignore>java.io.File</ignore> <!-- File#toPath() -->
<ignore>java.nio.file.*</ignore>
<ignore>java.nio.channels.SeekableByteChannel</ignore>
<ignore>java.util.function.*</ignore>
<ignore>java.util.stream.*</ignore>
<ignore>java.lang.ThreadLocal</ignore>
<ignore>java.io.UncheckedIOException</ignore>
<ignore>java.util.Comparator</ignore> <!-- Comparator.comparingInt() -->
<ignore>java.util.List</ignore> <!-- List#stream() -->
<ignore>java.util.ArrayList</ignore> <!-- List / ArrayList #sort() -->
<ignore>java.util.LinkedHashMap</ignore> <!-- LinkedHashMap#computeIfAbsent() -->
<ignore>java.util.Map</ignore> <!-- Map#computeIfAbsent() -->
<ignore>java.util.Objects</ignore>
<ignore>java.util.Optional</ignore>
<ignore>java.util.Set</ignore> <!-- Set#stream() -->
<ignore>java.util.Spliterator</ignore>
<ignore>java.util.Spliterators</ignore>
<ignore>java.nio.ByteBuffer</ignore> <!-- .flip(); added in API1; possibly due to .flip previously returning Buffer, later ByteBuffer; return unused -->
<ignore>java.net.HttpURLConnection</ignore><!-- .setAuthenticator(java.net.Authenticator) in Java 9; only used in multirelease 9+ version -->
<!-- HttpClient and following in Java 11; only used in multirelease 11+ version, guarded and not on Android -->
<ignore>java.net.http.*</ignore>
<ignore>java.time.Duration</ignore>
<ignore>java.util.OptionalLong</ignore>
</ignores>
<!-- ^ Provided by https://developer.android.com/studio/write/java8-support#library-desugaring -->
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.12.0</version>
<configuration>
<doclint>none</doclint>
<source>8</source>
<linksource>true</linksource>
</configuration>
<executions>
<execution>
<id>attach-javadoc</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.4.0</version>
<configuration>
<excludes>
<exclude>org/jsoup/examples/**</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
<executions>
<execution>
<id>default-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<excludes>
<exclude>org/jsoup/examples/**</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>jar-examples</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>examples</classifier>
<includes>
<include>org/jsoup/**</include>
<include>org/jsoup/examples/**</include>
</includes>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<mainClass>org.jsoup.examples.HtmlToPlainText</mainClass>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
<configuration>
<instructions>
<Bundle-DocURL>https://jsoup.org/</Bundle-DocURL>
<Export-Package>org.jsoup.*</Export-Package>
<Import-Package>!org.jsoup.*,org.jspecify.annotations;version=!;resolution:=optional,*</Import-Package>
<!-- bnd scans class output as a flat bundle, so ignore its MR-JAR path error for the Java 11 overlay. -->
<_fixupmessages>Classes found in the wrong directory: *META-INF/versions/11*;restrict:=error;is:=ignore</_fixupmessages>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.6</version>
<configuration>
<!-- smaller stack to find stack overflows. Was 256, but Zulu on MacOS ARM needs >= 640 -->
<argLine>-Xss640k</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.6</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<excludedGroups>${failsafe.excludedGroups}</excludedGroups>
<properties>
<configurationParameters>
junit.jupiter.execution.parallel.enabled = true
junit.jupiter.execution.parallel.mode.default = same_thread
junit.jupiter.execution.parallel.mode.classes.default = same_thread
junit.jupiter.execution.parallel.config.strategy = fixed
junit.jupiter.execution.parallel.config.fixed.parallelism = 8
</configurationParameters>
</properties>
</configuration>
</plugin>
<plugin>
<!-- API version compat check - https://siom79.github.io/japicmp/ -->
<groupId>com.github.siom79.japicmp</groupId>
<artifactId>japicmp-maven-plugin</artifactId>
<version>0.26.1</version>
<configuration>
<!-- hard code previous version; can't detect when running stateless on build server -->
<oldVersion>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.22.2</version>
<type>jar</type>
</dependency>
</oldVersion>
<parameter>
<!-- 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 -->
<onlyModified>false</onlyModified>
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
<breakBuildOnSourceIncompatibleModifications>true</breakBuildOnSourceIncompatibleModifications>
<excludes>
<!-- outerHtml(Appendable) was an undocumented protected helper; making it a public, chaining API changes
its return type and generic signature. No downstream overrides were found in a GitHub code search,
so we accept this narrow compatibility break. Remove after oldVersion advances to 1.23.1. -->
<exclude>org.jsoup.nodes.Node#outerHtml(java.lang.Appendable)</exclude>
</excludes>
<overrideCompatibilityChangeParameters>
<!-- 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. -->
<overrideCompatibilityChangeParameter>
<compatibilityChange>METHOD_NEW_DEFAULT</compatibilityChange>
<binaryCompatible>true</binaryCompatible>
<sourceCompatible>true</sourceCompatible>
</overrideCompatibilityChangeParameter>
<overrideCompatibilityChangeParameter>
<compatibilityChange>METHOD_ABSTRACT_NOW_DEFAULT</compatibilityChange>
<binaryCompatible>true</binaryCompatible>
<sourceCompatible>true</sourceCompatible>
</overrideCompatibilityChangeParameter>
</overrideCompatibilityChangeParameters>
</parameter>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>cmp</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.11.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>./</directory>
<targetPath>META-INF/jsoup/</targetPath>
<filtering>false</filtering>
<includes>
<include>LICENSE</include>
</includes>
</resource>
</resources>
</build>
<profiles>
<!-- Profile for Java 8 -->
<profile>
<id>java-8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>compile-java8-base</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<source>1.8</source>
<target>1.8</target>
<excludes>
<!-- package-info classes are emitted once by compile-package-info as base jar metadata. -->
<exclude>**/package-info.java</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>compile-java8-tests</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArgs combine.children="append">
<arg>-Xlint:none</arg>
</compilerArgs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Compiles the multi-release jar when executed on JDK11+ -->
<profile>
<id>multi-release</id>
<activation>
<jdk>[11,2000)</jdk>
</activation>
<build>
<plugins>
<!-- Sets up test/java11 -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.6.1</version>
<executions>
<execution>
<id>add-java11-test-sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/src/test/java11</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>compile-java8-base</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>8</release>
<excludes>
<exclude>**/package-info.java</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>compile-java11-tests</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<useModulePath>false</useModulePath>
<release>11</release>
</configuration>
</execution>
<execution>
<id>compile-java11-overlay</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>11</release>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/src/main/java11</compileSourceRoot>
</compileSourceRoots>
<multiReleaseOutput>true</multiReleaseOutput>
</configuration>
</execution>
</executions>
</plugin>
<!-- Add the Java 11-specific test directory to the test runtime classpath -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>${project.build.outputDirectory}/META-INF/versions/11</additionalClasspathElement>
</additionalClasspathElements>
<useModulePath>false</useModulePath> <!-- tests use classpath -->
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release-sign-artifacts</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>package</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>long-running</id>
<properties>
<failsafe.excludedGroups />
</properties>
</profile>
<profile>
<id>failsafe</id>
<build>
<plugins>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.6</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<!-- junit -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.14.4</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- gson, to fetch entities from w3.org -->
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.14.0</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- netty for webserver integration tests -->
<groupId>io.netty</groupId>
<artifactId>netty-codec-http</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<!-- netty SSL and channel handlers for webserver integration tests -->
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<!-- org.jspecify.annotations.nonnull, with Apache 2 license. Build time only. -->
<groupId>org.jspecify</groupId>
<artifactId>jspecify</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<!-- re2j; linear time regex, with 3-clause BSD license -->
<groupId>com.google.re2j</groupId>
<artifactId>re2j</artifactId>
<version>1.8</version>
<optional>true</optional>
<scope>compile</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
<version>4.2.16.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<developers>
<developer>
<id>jhy</id>
<name>Jonathan Hedley</name>
<email>jonathan@hedley.net</email>
<roles>
<role>Lead Developer</role>
</roles>
<timezone>+11</timezone>
</developer>
</developers>
</project>