<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.htmlunit</groupId>
    <artifactId>htmlunit-csp</artifactId>
    <version>4.1.0</version>
    <name>HtmlUnit Content-Security-Policy Parser</name>
    <organization>
        <name>HtmlUnit</name>
        <url>https://www.htmlunit.org</url>
    </organization>
    <packaging>jar</packaging>
    <description>Content-Security-Policy parser for HtmlUnit.</description>
    <url>https://github.com/HtmlUnit/htmlunit-csp</url>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>

        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>

        <dependencycheck.version>8.4.0</dependencycheck.version>
        <spotbugs.version>4.8.4</spotbugs.version>
        <pmd.version>6.55.0</pmd.version>
        <spotless.version>2.38.0</spotless.version>
        <dependencycheck.version>9.1.0</dependencycheck.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.4.1</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>3.2.5</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.3.1</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>9.3</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.4.1</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>3.3.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.6.3</version>
                <configuration>
                    <additionalparam>--allow-script-in-comments</additionalparam>
                    <excludePackageNames>org.htmlunit.cssparser.parser.javacc</excludePackageNames>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </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>3.0.1</version>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>4.8.4.0</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>3.21.2</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>
                    <failBuildOnCVSS>0</failBuildOnCVSS>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.6.3</version>
                <configuration>
                    <additionalparam>--allow-script-in-comments</additionalparam>
                    <links>
                        <link>http://docs.oracle.com/javase/8/docs/api/</link>
                    </links>
                    <excludePackageNames>org.htmlunit.cssparser.parser.javacc</excludePackageNames>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-changes-plugin</artifactId>
                <version>2.12.1</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>changes-report</report>
                        </reports>
                    </reportSet>
                </reportSets>
                <configuration>
                    <issueLinkTemplatePerSystem>
                        <features>http://sourceforge.net/p/htmlunit/feature-requests/%ISSUE%</features>
                    </issueLinkTemplatePerSystem>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:HtmlUnit/htmlunit-csp.git</connection>
        <developerConnection>scm:git:git@github.com:HtmlUnit/htmlunit-csp.git</developerConnection>
        <url>https://github.com/htmlunit</url>
    </scm>

    <mailingLists>
    </mailingLists>
    <developers>
        <developer>
            <name>Ronald Brill</name>
            <id>rbri</id>
            <email>rbri@rbri.de</email>
            <url>http://www.wetator.org/</url>
            <timezone>+1</timezone>
        </developer>
        <developer>
            <name>Sergey Shekyan</name>
        </developer>
        <developer>
            <name>Michael Ficarra</name>
        </developer>
    </developers>
    <contributors>
        <contributor>
            <name>Rick Mitchell</name>
        </contributor>
    </contributors>

    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.10.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
    </distributionManagement>
    <repositories>
        <repository>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
            <id>OSS Sonatype snapshots</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
        </repository>
    </repositories>
</project>
