<?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>

    <groupId>org.htmlunit</groupId>
    <artifactId>htmlunit-jsoup</artifactId>
    <version>5.2.0</version>

    <name>HtmlUnit jsoup support</name>
    <organization>
        <name>Gargoyle Software Inc.</name>
        <url>http://www.GargoyleSoftware.com/</url>
    </organization>
    <packaging>jar</packaging>
    <description>
        Bridges to the jsoup world.
    </description>
    <url>https://www.htmlunit.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
        <additionalparam>-Xdoclint:none</additionalparam>

        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <maven.compiler.release>17</maven.compiler.release>

        <maven.version.ignore>(?i).*-(alpha|beta|m|rc)([\.-]?\d+)?</maven.version.ignore>

        <jsoup.version>1.22.2</jsoup.version>
        <htmlunit.version>5.2.0</htmlunit.version>

        <!-- examples dependencies -->
        <flexmark.version>0.64.8</flexmark.version>

        <!-- test dependencies -->
        <junit.version>6.1.0</junit.version>

        <checkstyle.version>12.3.0</checkstyle.version>
        <spotbugs.version>4.10.2</spotbugs.version>
        <pmd.version>7.25.0</pmd.version>
        <dependencycheck.version>12.1.9</dependencycheck.version>

        <!-- plugins -->
        <central-publishing.version>0.11.0</central-publishing.version>
        <pmd-plugin.version>3.28.0</pmd-plugin.version>
        <spotbugs-plugin.version>4.10.2.0</spotbugs-plugin.version>
        <gpg-plugin.version>3.2.8</gpg-plugin.version>
        <enforcer-plugin.version>3.6.3</enforcer-plugin.version>
        <compiler-plugin.version>3.15.0</compiler-plugin.version>
        <jar-plugin.version>3.5.0</jar-plugin.version>
        <source-plugin.version>3.4.0</source-plugin.version>
        <javadoc-plugin.version>3.12.0</javadoc-plugin.version>
        <surefire-plugin.version>3.5.6</surefire-plugin.version>
        <release-plugin.version>3.3.1</release-plugin.version>
        <cyclonedx-plugin.version>2.9.1</cyclonedx-plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <version>${jsoup.version}</version>
        </dependency>
        <dependency>
            <groupId>org.htmlunit</groupId>
            <artifactId>htmlunit</artifactId>
            <version>${htmlunit.version}</version>
        </dependency>

        <!-- Test dependencies. -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        
        <!-- Examples dependencies. -->
        <dependency>
            <groupId>com.vladsch.flexmark</groupId>
            <artifactId>flexmark-all</artifactId>
            <version>${flexmark.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${enforcer-plugin.version}</version>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.6.3</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>1.8.0</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                  </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${compiler-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.6.0</version>
                <configuration>
                    <configLocation>checkstyle.xml</configLocation>
                    <suppressionsLocation>checkstyle_suppressions.xml</suppressionsLocation>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${checkstyle.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${jar-plugin.version}</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <Url>${project.url}</Url>
                            <Build-Time>${maven.build.timestamp}</Build-Time>
                        </manifestEntries>
                        <addMavenDescriptor>false</addMavenDescriptor>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${source-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${javadoc-plugin.version}</version>
                <configuration>
                    <quiet>true</quiet>
                    <show>protected</show>
                    <doclint>html,reference,syntax</doclint>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${gpg-plugin.version}</version>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>${central-publishing.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.10</version>
                <configuration>
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>true</downloadJavadocs>
                    <additionalBuildcommands>
                        <buildcommand>net.sf.eclipsecs.core.CheckstyleBuilder</buildcommand>
                    </additionalBuildcommands>
                    <additionalProjectnatures>
                        <projectnature>net.sf.eclipsecs.core.CheckstyleNature</projectnature>
                    </additionalProjectnatures>
                    <additionalConfig>
                        <file>
                            <name>.checkstyle</name>
                            <content>
<![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
    <local-check-config name="CSP Parser" location="checkstyle.xml" type="project" description="CSP Parser">
        <property name="checkstyle.suppressions.file" value="$${project_loc}/checkstyle_suppressions.xml"/>
        <additional-data name="protect-config-file" value="false" />
    </local-check-config>
    <fileset name="all" enabled="true" check-config-name="CSP Parser" local="true">
        <file-match-pattern match-pattern="^src/.*\.java$" include-pattern="true"/>
    </fileset>
    <filter name="NonSrcDirs" enabled="true" />
</fileset-config>
]]>
                            </content>
                        </file>
                    </additionalConfig>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${release-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>${spotbugs-plugin.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>com.github.spotbugs</groupId>
                        <artifactId>spotbugs</artifactId>
                        <version>${spotbugs.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>${pmd-plugin.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>net.sourceforge.pmd</groupId>
                        <artifactId>pmd-core</artifactId>
                        <version>${pmd.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>net.sourceforge.pmd</groupId>
                        <artifactId>pmd-java</artifactId>
                        <version>${pmd.version}</version>
                    </dependency>
              </dependencies>
              <configuration>
                  <rulesets>
                      <ruleset>${basedir}/pmd-ruleset.xml</ruleset>
                  </rulesets>
              </configuration>
            </plugin>
            <!--
            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
                <version>${dependencycheck.version}</version>
                <configuration>
                    <suppressionFiles>owasp-suppressions.xml</suppressionFiles>
                    <failBuildOnCVSS>0</failBuildOnCVSS>
                    <assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
                    <nvdDatafeedUrl>https://mirror.cveb.in/nvd/json/cve/1.1/nvdcve-1.1-{0}.json.gz</nvdDatafeedUrl>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            -->
            <plugin>
                <groupId>org.cyclonedx</groupId>
                <artifactId>cyclonedx-maven-plugin</artifactId>
                <version>${cyclonedx-plugin.version}</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>makeAggregateBom</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <projectType>library</projectType>
                    <outputFormat>json</outputFormat>
                    <!-- strange but it helps -->
                    <skipNotDeployed>false</skipNotDeployed>
                </configuration>
            </plugin>
        </plugins>
    </build>


    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/HtmlUnit/htmlunit-jsoup/issues/</url>
    </issueManagement>
    <inceptionYear>2025</inceptionYear>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:https://github.com/HtmlUnit/htmlunit-jsoup</connection>
        <developerConnection>scm:git:https://github.com/HtmlUnit/htmlunit-jsoup</developerConnection>
        <url>https://github.com/HtmlUnit/htmlunit-jsoup</url>
    </scm>

    <ciManagement>
        <system>Jenkins</system>
        <url>https://jenkins.wetator.org/view/HtmlUnit/</url>
    </ciManagement>

    <developers>
        <developer>
            <name>Ronald Brill</name>
            <id>rbri</id>
            <email>rbri@rbri.de</email>
            <url>http://www.wetator.org/</url>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <contributors>
    </contributors>

    <!-- for snapshots of our dependencies -->
    <repositories>
        <repository>
            <name>Central Portal Snapshots</name>
            <id>central-portal-snapshots</id>
            <url>https://central.sonatype.com/repository/maven-snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

</project>
