blob: 632da8c3ade255ac1bfc5a04129a5611614b3c60 [file] [log] [blame]
<!--
! Licensed to the Apache Software Foundation (ASF) under one
! or more contributor license agreements. See the NOTICE file
! distributed with this work for additional information
! regarding copyright ownership. The ASF licenses this file
! to you 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
!
! http://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>apache-asterixdb-jdbc</artifactId>
<groupId>org.apache.asterix</groupId>
<version>0.9.7.1</version>
</parent>
<artifactId>asterix-jdbc-driver</artifactId>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
<properties>
<root.dir>${basedir}/..</root.dir>
<source.java.package.path>org/apache/asterix/jdbc/</source.java.package.path>
<implementation.title>Apache AsterixDB JDBC Driver</implementation.title>
<build.dist.classifier>dist</build.dist.classifier>
<build.license.directory>${project.build.directory}/license</build.license.directory>
<build.license.resources.directory>${build.license.directory}/resources</build.license.resources.directory>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.asterix</groupId>
<artifactId>asterix-jdbc-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<!-- Copy license for jar -->
<id>copy-license</id>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<copy todir="${project.build.directory}/classes/META-INF" overwrite="true">
<fileset dir="${root.dir}">
<include name="LICENSE"/>
<include name="NOTICE"/>
</fileset>
</copy>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Generate license for dist jar -->
<groupId>org.apache.hyracks</groupId>
<artifactId>license-automation-plugin</artifactId>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDir>${build.license.resources.directory}/META-INF</outputDir>
<templateRootDir>${root.dir}</templateRootDir>
<generatedFiles>
<generatedFile>
<template>src/main/licenses/templates/asterix-jdbc-driver-license.ftl</template>
<outputFile>LICENSE</outputFile>
</generatedFile>
<generatedFile>
<template>src/main/licenses/templates/asterix-jdbc-driver-notice.ftl</template>
<outputFile>NOTICE</outputFile>
</generatedFile>
</generatedFiles>
<licenseDirectory>${root.dir}/src/main/licenses/content</licenseDirectory>
<licenseMapOutputFile>${build.license.directory}/license_map.json</licenseMapOutputFile>
<location>${project.artifactId}-${project.version}-${build.dist.classifier}.jar/</location>
<timeoutSecs>10</timeoutSecs>
<downloadDir>${build.license.directory}/download</downloadDir>
<excludedScopes>
<excludedScope>test</excludedScope>
</excludedScopes>
<excludes>
<exclude>org.apache.asterix:*</exclude>
</excludes>
<templateProperties>
<packageName>${implementation.title}</packageName>
</templateProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestSections>
<manifestSection>
<name>${source.java.package.path}</name>
<manifestEntries>
<Implementation-Title>${implementation.title}</Implementation-Title>
<Implementation-Version>${project.version}</Implementation-Version>
<Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
</manifestEntries>
</manifestSection>
</manifestSections>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>${build.dist.classifier}</shadedClassifierName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>META-INF/LICENSE</resource>
<file>${build.license.resources.directory}/META-INF/LICENSE</file>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>META-INF/NOTICE</resource>
<file>${build.license.resources.directory}/META-INF/NOTICE</file>
</transformer>
</transformers>
<relocations>
<relocation>
<pattern>com.fasterxml.jackson</pattern>
<shadedPattern>org.apache.asterix.jdbc.core.deps.com.fasterxml.jackson</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>org.apache.asterix:asterix-jdbc-driver</artifact>
<excludes>
<exclude>META-INF/NOTICE</exclude>
<exclude>META-INF/LICENSE</exclude>
</excludes>
</filter>
<filter>
<artifact>org.apache.asterix:asterix-jdbc-core</artifact>
<excludes>
<exclude>META-INF/NOTICE</exclude>
<exclude>META-INF/LICENSE</exclude>
<exclude>META-INF/MANIFEST.MF</exclude>
</excludes>
</filter>
<filter>
<artifact>org.apache.httpcomponents:*</artifact>
<excludes>
<exclude>module-info.class</exclude>
<exclude>META-INF/maven/org.apache.httpcomponents/*/pom.*</exclude>
<exclude>META-INF/NOTICE</exclude>
<exclude>META-INF/LICENSE</exclude>
<exclude>META-INF/DEPENDENCIES</exclude>
<exclude>META-INF/MANIFEST.MF</exclude>
</excludes>
</filter>
<filter>
<artifact>commons-logging:*</artifact>
<excludes>
<exclude>module-info.class</exclude>
<exclude>META-INF/maven/commons-logging/*/pom.*</exclude>
<exclude>META-INF/NOTICE.*</exclude>
<exclude>META-INF/LICENSE.*</exclude>
<exclude>META-INF/MANIFEST.MF</exclude>
</excludes>
</filter>
<filter>
<artifact>commons-codec:*</artifact>
<excludes>
<exclude>module-info.class</exclude>
<exclude>META-INF/maven/commons-codec/*/pom.*</exclude>
<exclude>META-INF/NOTICE.*</exclude>
<exclude>META-INF/LICENSE.*</exclude>
<exclude>META-INF/MANIFEST.MF</exclude>
</excludes>
</filter>
<filter>
<artifact>com.fasterxml.jackson.core:*</artifact>
<excludes>
<exclude>module-info.class</exclude>
<exclude>META-INF/maven/com.fasterxml.jackson.core/*/pom.*</exclude>
<exclude>META-INF/services/**</exclude>
<exclude>META-INF/NOTICE</exclude>
<exclude>META-INF/LICENSE</exclude>
<exclude>META-INF/MANIFEST.MF</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>