yauaa
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>nl.basjes.parse.useragent</groupId>
<artifactId>yauaa</artifactId>
<version>7.32.0</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/maven-v4_0_0.xsd">
<parent>
<artifactId>yauaa-parent</artifactId>
<groupId>nl.basjes.parse.useragent</groupId>
<version>7.32.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>yauaa</artifactId>
<name>Yauaa : Analyzer</name>
<description>A parsing and analyzing library to get information from a useragent string.</description>
<url>https://yauaa.basjes.nl</url>
<developers>
<developer>
<name>Niels Basjes</name>
<email>niels@basjes.nl</email>
<roles>
<role>Architect</role>
<role>Developer</role>
</roles>
<timezone>Europe/Amsterdam</timezone>
</developer>
</developers>
<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/nielsbasjes/yauaa.git</connection>
<developerConnection>scm:git:file:///${project.basedir}</developerConnection>
<tag>v7.32.0</tag>
<url>https://github.com/nielsbasjes/yauaa</url>
</scm>
<build>
<plugins>
<plugin>
<artifactId>maven-toolchains-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>select-jdk-toolchain</goal>
</goals>
<configuration>
<version>[21,22)</version>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>UserAgents/*.sh</exclude>
<exclude>UserAgents/**/*.sh</exclude>
<exclude>UserAgents/**/*.csv</exclude>
<exclude>UserAgents/**/*.txt</exclude>
<exclude>UserAgents/**/*.tab</exclude>
<exclude>UserAgents/**/*.md</exclude>
</excludes>
<archive>
<manifestEntries>
<Specification-Title>Yauaa: Yet Another UserAgent Analyzer</Specification-Title>
<Specification-Version>${project.version}</Specification-Version>
<Specification-Vendor>Niels Basjes</Specification-Vendor>
<Implementation-Title>Yauaa: Yet Another UserAgent Analyzer</Implementation-Title>
<Implementation-Version>${project.version}</Implementation-Version>
<Implementation-Vendor>Niels Basjes</Implementation-Vendor>
<Implementation-Vendor-Id>nl.basjes</Implementation-Vendor-Id>
<Automatic-Module-Name>${Automatic-Module-Name}</Automatic-Module-Name>
<url>${project.url}</url>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>inject-problematic-dependencies</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<minimizeJar>true</minimizeJar>
<createDependencyReducedPom>true</createDependencyReducedPom>
<useDependencyReducedPomInJar>true</useDependencyReducedPomInJar>
<filters>
<filter>
<artifact>org.antlr:antlr4-runtime</artifact>
<excludes>
<exclude>META-INF/services/**</exclude>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/maven/**</exclude>
</excludes>
</filter>
<filter>
<artifact>org.yaml:snakeyaml</artifact>
<excludes>
<exclude>META-INF/services/**</exclude>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/versions/**</exclude>
<exclude>META-INF/maven/**</exclude>
</excludes>
</filter>
<filter>
<artifact>org.apache.commons:commons-text</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/*.txt</exclude>
<exclude>META-INF/versions/**</exclude>
<exclude>META-INF/maven/**</exclude>
</excludes>
</filter>
<filter>
<artifact>org.apache.commons:commons-lang3</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/*.txt</exclude>
<exclude>META-INF/versions/**</exclude>
<exclude>META-INF/maven/**</exclude>
</excludes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>org.antlr</pattern>
<shadedPattern>${project.groupId}.${project.artifactId}.shaded.org.antlr</shadedPattern>
</relocation>
<relocation>
<pattern>org.yaml.snakeyaml</pattern>
<shadedPattern>${project.groupId}.${project.artifactId}.shaded.org.yaml.snakeyaml</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.commons.text</pattern>
<shadedPattern>${project.groupId}.${project.artifactId}.shaded.org.apache.commons.text</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.commons.lang3</pattern>
<shadedPattern>${project.groupId}.${project.artifactId}.shaded.org.apache.commons.lang3</shadedPattern>
</relocation>
</relocations>
<artifactSet>
<includes>
<include>org.antlr:antlr4-runtime</include>
<include>org.yaml:snakeyaml</include>
<include>org.apache.commons:commons-text</include>
<include>org.apache.commons:commons-lang3</include>
</includes>
</artifactSet>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${project.basedir}</directory>
<includes>
<include>dependency-reduced-pom.xml</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>com.alexecollins.maven.plugin</groupId>
<artifactId>script-maven-plugin</artifactId>
<executions>
<execution>
<id>Verify jar contents to ensure the shading of dependencies went right</id>
<phase>verify</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<language>beanshell</language>
<script>import java.io.*;
import java.util.jar.*;
import java.util.Arrays;
import org.codehaus.plexus.util.*;
System.out.println("Verifying if the shading went correctly");
String[] libraryWanted = {
"nl/basjes/parse/useragent/utils/YauaaVersion.class",
"nl/basjes/parse/useragent/yauaa/shaded/org/antlr/v4/runtime/Parser.class",
};
String[] libraryUnwanted = {
"org/antlr/v4/runtime/Parser.class",
"org/springframework/core/io/support/PathMatchingResourcePatternResolver.class",
"org/slf4j/LoggerFactory.class",
};
JarFile libraryJarFile = new JarFile( new File( "${project.basedir}/target", "yauaa-${project.version}.jar" ) );
for ( String path : libraryWanted ) {
if ( libraryJarFile.getEntry( path ) == null ) {
throw new IllegalStateException( "Library: wanted path is missing: " + path );
}
}
for ( String path : libraryUnwanted ) {
if ( libraryJarFile.getEntry( path ) != null ) {
throw new IllegalStateException( "Library: unwanted path is present: " + path );
}
}</script>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache-extras.beanshell</groupId>
<artifactId>bsh</artifactId>
<version>2.0b6</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>${antlr.version}</version>
<executions>
<execution>
<id>antlr</id>
<phase>generate-sources</phase>
<goals>
<goal>antlr4</goal>
</goals>
<configuration>
<visitor>true</visitor>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>Generate Matchers and Lookups</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>./regen-all.sh</executable>
</configuration>
</execution>
<execution>
<id>Generate list of testcases</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>./getTestCases.sh</executable>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${spotbugs-maven-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>nl/basjes/parse/useragent/Version.class</exclude>
<exclude>nl/basjes/parse/useragent/PackagedRules.class</exclude>
<exclude>nl/basjes/parse/useragent/parser/*.class</exclude>
<exclude>nl/basjes/parse/useragent/debug/*.class</exclude>
<exclude>nl/basjes/parse/useragent/utils/publicsuffixlist/**/*.class</exclude>
<exclude>nl/basjes/parse/useragent/utils/springframework/**/*.class</exclude>
<exclude>META-INF/versions/**</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<fileset />
<pathconvert>
<map />
</pathconvert>
<echo>${my-file-list}</echo>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.3</version>
<executions>
<execution>
<id>Generate Version YAML</id>
<phase>generate-sources</phase>
<goals>
<goal>replace</goal>
</goals>
<configuration>
<file>${project.basedir}/src/main/code-gen/version/Version.yaml.template</file>
<regex>false</regex>
<outputFile>${project.basedir}/target/classes/UserAgents/__Version__.yaml</outputFile>
</configuration>
</execution>
<execution>
<id>Generate Version Java</id>
<phase>generate-sources</phase>
<goals>
<goal>replace</goal>
</goals>
<configuration>
<file>${project.basedir}/src/main/code-gen/version/Version.java.template</file>
<regex>false</regex>
<outputFile>${project.basedir}/target/generated-sources/java/nl/basjes/parse/useragent/Version.java</outputFile>
</configuration>
</execution>
<execution>
<id>Generate Yaml List Java</id>
<phase>generate-sources</phase>
<goals>
<goal>replace</goal>
</goals>
<configuration>
<file>${project.basedir}/src/main/code-gen/UserAgents/PackagedRules.java.template</file>
<regex>false</regex>
<outputFile>${project.basedir}/target/generated-sources/java/nl/basjes/parse/useragent/PackagedRules.java</outputFile>
</configuration>
</execution>
<execution>
<id>Generate Preheat Java</id>
<phase>generate-sources</phase>
<goals>
<goal>replace</goal>
</goals>
<configuration>
<file>${project.basedir}/src/main/code-gen/UserAgents/PreHeatCases.java.template</file>
<regex>false</regex>
<outputFile>${project.basedir}/target/generated-sources/java/nl/basjes/parse/useragent/PreHeatCases.java</outputFile>
</configuration>
</execution>
</executions>
<configuration>
<replacements>
<replacement>
<token>@git.commit.id@</token>
<value>${git.commit.id}</value>
</replacement>
<replacement>
<token>@git.commit.id.describe-short@</token>
<value>${git.commit.id.describe-short}</value>
</replacement>
<replacement>
<token>@project.build.outputTimestamp@</token>
<value>${project.build.outputTimestamp}</value>
</replacement>
<replacement>
<token>@project.version@</token>
<value>${project.version}</value>
</replacement>
<replacement>
<token>@version.copyright@</token>
<value>${version.copyright}</value>
</replacement>
<replacement>
<token>@version.license@</token>
<value>${version.license}</value>
</replacement>
<replacement>
<token>@version.url@</token>
<value>${version.url}</value>
</replacement>
<replacement>
<token>@target.java.version@</token>
<value>${target.java.version}</value>
</replacement>
<replacement>
<token>###file-list###</token>
<valueFile>${project.basedir}/target/temp-yaml-list.txt</valueFile>
</replacement>
<replacement>
<token>###agents-list###</token>
<valueFile>${project.basedir}/target/temp-agents-list.txt</valueFile>
</replacement>
</replacements>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${build-helper-maven-plugin.version}</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/java/</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>java-11</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<source>11</source>
<target>11</target>
<release>11</release>
<compileSourceRoots>${project.basedir}/src/main/java11</compileSourceRoots>
<multiReleaseOutput>true</multiReleaseOutput>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<executions>
<execution>
<id>Populate the local repo for integration tests</id>
<goals>
<goal>install</goal>
</goals>
</execution>
<execution>
<id>Integration tests</id>
<goals>
<goal>run</goal>
</goals>
<configuration>
<projectsDirectory>./src/it</projectsDirectory>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
</configuration>
</execution>
<execution>
<id>Integration tests under Java 8</id>
<goals>
<goal>run</goal>
</goals>
<configuration>
<properties>
<integrationTestingJDK>8</integrationTestingJDK>
<integrationTestingJDKRange>[1.8,1.9)</integrationTestingJDKRange>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<projectsDirectory>./src/it-all-jdk</projectsDirectory>
<cloneProjectsTo>${project.build.directory}/it-jdk-8</cloneProjectsTo>
<pomExcludes>
<pomExclude>Base/JPMS/pom.xml</pomExclude>
</pomExcludes>
</configuration>
</execution>
<execution>
<id>Integration tests under Java 11</id>
<goals>
<goal>run</goal>
</goals>
<configuration>
<properties>
<integrationTestingJDK>11</integrationTestingJDK>
<integrationTestingJDKRange>[11,12)</integrationTestingJDKRange>
<maven.compiler.release>11</maven.compiler.release>
</properties>
<projectsDirectory>./src/it-all-jdk</projectsDirectory>
<cloneProjectsTo>${project.build.directory}/it-jdk-11</cloneProjectsTo>
</configuration>
</execution>
<execution>
<id>Integration tests under Java 17</id>
<goals>
<goal>run</goal>
</goals>
<configuration>
<properties>
<integrationTestingJDK>17</integrationTestingJDK>
<integrationTestingJDKRange>[17,18)</integrationTestingJDKRange>
<maven.compiler.release>17</maven.compiler.release>
</properties>
<projectsDirectory>./src/it-all-jdk</projectsDirectory>
<cloneProjectsTo>${project.build.directory}/it-jdk-17</cloneProjectsTo>
</configuration>
</execution>
<execution>
<id>Integration tests under Java 21</id>
<goals>
<goal>run</goal>
</goals>
<configuration>
<properties>
<integrationTestingJDK>21</integrationTestingJDK>
<integrationTestingJDKRange>[21,22)</integrationTestingJDKRange>
<maven.compiler.release>21</maven.compiler.release>
</properties>
<projectsDirectory>./src/it-all-jdk</projectsDirectory>
<cloneProjectsTo>${project.build.directory}/it-jdk-21</cloneProjectsTo>
</configuration>
</execution>
</executions>
<configuration>
<failIfNoProjects>true</failIfNoProjects>
<streamLogsOnFailures>true</streamLogsOnFailures>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<setupIncludes>
<setupInclude>setup/*/pom.xml</setupInclude>
</setupIncludes>
<pomIncludes>
<pomInclude>Examples/*/pom.xml</pomInclude>
<pomInclude>Logging/*/pom.xml</pomInclude>
<pomInclude>Base/*/pom.xml</pomInclude>
<pomInclude>Serialization/*/pom.xml</pomInclude>
</pomIncludes>
<postBuildHookScript>verify</postBuildHookScript>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
<settingsFile>./src/it/settings.xml</settingsFile>
<goals>
<goal>clean</goal>
<goal>test</goal>
</goals>
</configuration>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-quality</id>
<phase>validate</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<banDuplicateClasses>
<scopes>
<scope>compile</scope>
<scope>runtime</scope>
<scope>provided</scope>
</scopes>
<findAllDuplicates>true</findAllDuplicates>
<ignoreWhenIdentical>true</ignoreWhenIdentical>
</banDuplicateClasses>
<enforceBytecodeVersion>
<maxJdkVersion>8</maxJdkVersion>
<excludes>
<exclude>com.github.ben-manes.caffeine:caffeine</exclude>
<exclude>org.jboss:jboss-vfs</exclude>
</excludes>
</enforceBytecodeVersion>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>1.11.0</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.21.0</version>
<configuration>
<threads>4</threads>
<reportsDirectory>${project.basedir}/pitest/pit-reports</reportsDirectory>
<historyInputFile>${project.basedir}/pitest/yauaa_pitest_history.bin</historyInputFile>
<historyOutputFile>${project.basedir}/pitest/yauaa_pitest_history.bin</historyOutputFile>
<timestampedReports>true</timestampedReports>
<excludedMethods>
<excludedMethod>toString</excludedMethod>
</excludedMethods>
<excludedClasses>
<excludedClass>nl.basjes.parse.useragent.Version</excludedClass>
<excludedGroup>nl.basjes.parse.useragent.parser.*</excludedGroup>
<excludedGroup>nl.basjes.parse.useragent.debug.*</excludedGroup>
</excludedClasses>
<avoidCallsTo>
<avoidCallsTo>java.util.logging</avoidCallsTo>
<avoidCallsTo>org.apache.log4j</avoidCallsTo>
<avoidCallsTo>org.slf4j</avoidCallsTo>
<avoidCallsTo>org.apache.commons.logging</avoidCallsTo>
</avoidCallsTo>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>prepareRelease</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>Update mozilla-public-suffix-list.txt on release</id>
<phase>initialize</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>./src/main/code-gen/Antlr/PublicSuffix/UpdatePublicSuffixList.sh</executable>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<version>3.2.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.5.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>nl.basjes.collections</groupId>
<artifactId>prefixmap</artifactId>
<version>2.1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.42</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.25.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.esotericsoftware</groupId>
<artifactId>kryo</artifactId>
<version>5.6.2</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-vfs</artifactId>
<version>3.3.2.Final</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.14.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>hamcrest-core</artifactId>
<groupId>org.hamcrest</groupId>
</exclusion>
<exclusion>
<artifactId>junit-platform-engine</artifactId>
<groupId>org.junit.platform</groupId>
</exclusion>
<exclusion>
<artifactId>junit-jupiter-api</artifactId>
<groupId>org.junit.jupiter</groupId>
</exclusion>
<exclusion>
<artifactId>apiguardian-api</artifactId>
<groupId>org.apiguardian</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.14.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>junit-jupiter-api</artifactId>
<groupId>org.junit.jupiter</groupId>
</exclusion>
<exclusion>
<artifactId>apiguardian-api</artifactId>
<groupId>org.apiguardian</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>3.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>hamcrest</artifactId>
<groupId>org.hamcrest</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<properties>
<Automatic-Module-Name>nl.basjes.parse.useragent</Automatic-Module-Name>
</properties>
</project>