yauaa-hive
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>nl.basjes.parse.useragent</groupId>
<artifactId>yauaa-hive</artifactId>
<version>8.2.0</version>
</dependency><?xml version="1.0"?>
<!--
~ Yet Another UserAgent Analyzer
~ Copyright (C) 2013-2026 Niels Basjes
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ https://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<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>
<parent>
<artifactId>yauaa-udf-parent</artifactId>
<groupId>nl.basjes.parse.useragent</groupId>
<version>8.2.0</version>
</parent>
<artifactId>yauaa-hive</artifactId>
<name>Yauaa : UDF : Apache Hive</name>
<description>A parsing and analyzing library to get information from a useragent string.</description>
<url>https://yauaa.basjes.nl</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.release>17</maven.compiler.release>
</properties>
<dependencies>
<dependency>
<groupId>nl.basjes.parse.useragent</groupId>
<artifactId>yauaa</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>${hadoop.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-serde</artifactId>
<version>${hive.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-exec</artifactId>
<version>${hive.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-common</artifactId>
<version>${hive.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>select-jdk-toolchain</goal>
</goals>
<configuration>
<version>[21,22)</version>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>
--add-opens=java.base/java.net=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make-super-jar</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/udf.xml</descriptor>
</descriptors>
<archive>
<addMavenDescriptor>true</addMavenDescriptor>
<manifestEntries>
<Class-Path>/</Class-Path>
</manifestEntries>
</archive>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</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",
"nl/basjes/parse/useragent/hive/ParseUserAgent.class",
};
String[] libraryUnwanted = {
"org/antlr/v4/runtime/Parser.class",
"org/springframework/core/io/support/PathMatchingResourcePatternResolver.class",
};
JarFile libraryJarFile = new JarFile( new File( "${project.basedir}/target", "yauaa-hive-${project.version}-udf.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.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>Run Docker based IT test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<skip>${docker-based-tests.skip}</skip>
<executable>${project.basedir}/src/it/docker/run-it-test.sh</executable>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<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>
<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>
<scm>
<url>https://github.com/nielsbasjes/yauaa</url>
<connection>scm:git:https://github.com/nielsbasjes/yauaa.git</connection>
<developerConnection>scm:git:file:///${project.basedir}</developerConnection>
<tag>v8.2.0</tag>
</scm>
</project>