Apache-ize POM (#6482)

* Apache-ize POM

* put revision information into MANIFEST.MF for binary release

* remove nightly profile

* fix flaky travis by overriding maven-remote-resources-plugin execution from the parent POM
This commit is contained in:
David Lim 2018-10-17 19:37:01 -06:00 committed by Slim Bouguerra
parent f0b977ea7f
commit 73780536a6
6 changed files with 229 additions and 23 deletions

Binary file not shown.

Binary file not shown.

View File

@ -45,6 +45,41 @@
<!-- the default value is a repeated flag from the command line, since blank value is not allowed --> <!-- the default value is a repeated flag from the command line, since blank value is not allowed -->
<druid.distribution.pulldeps.opts>--clean</druid.distribution.pulldeps.opts> <druid.distribution.pulldeps.opts>--clean</druid.distribution.pulldeps.opts>
</properties> </properties>
<build>
<plugins>
<plugin>
<groupId>net.nicoulaj.maven.plugins</groupId>
<artifactId>checksum-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>dist-checksum</id>
<goals>
<goal>files</goal>
</goals>
</execution>
</executions>
<configuration>
<algorithms>
<algorithm>SHA-512</algorithm>
</algorithms>
<csvSummary>false</csvSummary>
<fileSets>
<fileSet>
<directory>${project.build.directory}</directory>
<includes>
<include>*-src.tar.gz</include>
<include>*-bin.tar.gz</include>
</includes>
</fileSet>
</fileSets>
<failIfNoFiles>false</failIfNoFiles>
</configuration>
</plugin>
</plugins>
</build>
<profiles> <profiles>
<profile> <profile>
<id>dist</id> <id>dist</id>
@ -231,13 +266,28 @@
<goal>single</goal> <goal>single</goal>
</goals> </goals>
<configuration> <configuration>
<finalName>${project.parent.artifactId}-${project.parent.version}</finalName> <finalName>apache-druid-${project.parent.version}</finalName>
<tarLongFileMode>posix</tarLongFileMode> <tarLongFileMode>posix</tarLongFileMode>
<descriptors> <descriptors>
<descriptor>src/assembly/assembly.xml</descriptor> <descriptor>src/assembly/assembly.xml</descriptor>
</descriptors> </descriptors>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>source-release-assembly-druid</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>apache-druid-${project.version}-src</finalName>
<tarLongFileMode>posix</tarLongFileMode>
<descriptors>
<descriptor>src/assembly/source-assembly.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>

View File

@ -18,9 +18,9 @@
~ under the License. ~ under the License.
--> -->
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" <assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"> xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
<id>bin</id> <id>bin</id>
<formats> <formats>
<format>tar.gz</format> <format>tar.gz</format>
@ -223,6 +223,7 @@
<includes> <includes>
<include>LICENSE</include> <include>LICENSE</include>
<include>NOTICE</include> <include>NOTICE</include>
<include>DISCLAIMER</include>
</includes> </includes>
</fileSet> </fileSet>
</fileSets> </fileSets>

View File

@ -0,0 +1,61 @@
<?xml version="1.0"?>
<!--
~ 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.
-->
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
<id>source-release</id>
<formats>
<format>tar.gz</format>
</formats>
<fileSets>
<fileSet>
<directory>../</directory>
<outputDirectory/>
<useDefaultExcludes>true</useDefaultExcludes>
<excludes>
<!-- build output -->
<exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]</exclude>
<!-- IDE -->
<exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.idea(/.*)?]</exclude>
<exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]</exclude>
<exclude>eclipse_formatting.xml</exclude>
<exclude>eclipse.importorder</exclude>
<!-- release-plugin temp files -->
<exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]</exclude>
<exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties]</exclude>
<exclude>.gitignore</exclude>
<exclude>.travis.yml</exclude>
<exclude>publications/**</exclude>
<exclude>upload.sh</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>${project.build.directory}</directory>
<includes>
<include>git.version</include>
</includes>
<outputDirectory/>
</fileSet>
</fileSets>
</assembly>

134
pom.xml
View File

@ -23,9 +23,9 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>io.druid</groupId> <groupId>org.apache</groupId>
<artifactId>oss-parent</artifactId> <artifactId>apache</artifactId>
<version>2</version> <version>21</version>
</parent> </parent>
<groupId>org.apache.druid</groupId> <groupId>org.apache.druid</groupId>
@ -33,9 +33,9 @@
<version>0.13.0-incubating-SNAPSHOT</version> <version>0.13.0-incubating-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>${project.groupId}:${project.artifactId}</name> <name>Druid</name>
<description>Druid - A Distributed Column Store</description> <description>Druid - A Distributed Column Store</description>
<url>http://druid.io/</url> <url>https://druid.apache.org/</url>
<licenses> <licenses>
<license> <license>
@ -51,6 +51,16 @@
</developer> </developer>
</developers> </developers>
<mailingLists>
<mailingList>
<name>Apache Druid (incubating) developers list</name>
<subscribe>dev-subscribe@druid.apache.org</subscribe>
<unsubscribe>dev-unsubscribe@druid.apache.org</unsubscribe>
<post>dev@druid.apache.org</post>
<archive>https://mail-archives.apache.org/mod_mbox/druid-dev</archive>
</mailingList>
</mailingLists>
<inceptionYear>2011</inceptionYear> <inceptionYear>2011</inceptionYear>
<scm> <scm>
@ -61,7 +71,9 @@
</scm> </scm>
<properties> <properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
<project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
<apache.curator.version>4.0.0</apache.curator.version> <apache.curator.version>4.0.0</apache.curator.version>
<apache.curator.test.version>2.12.0</apache.curator.test.version> <apache.curator.test.version>2.12.0</apache.curator.test.version>
<avatica.version>1.10.0</avatica.version> <avatica.version>1.10.0</avatica.version>
@ -88,9 +100,9 @@
<caffeine.version>2.5.5</caffeine.version> <caffeine.version>2.5.5</caffeine.version>
<!-- When upgrading ZK, edit docs and integration tests as well (integration-tests/docker-base/setup.sh) --> <!-- When upgrading ZK, edit docs and integration tests as well (integration-tests/docker-base/setup.sh) -->
<zookeeper.version>3.4.11</zookeeper.version> <zookeeper.version>3.4.11</zookeeper.version>
<repoOrgId>org-apache-id</repoOrgId> <repoOrgId>apache.snapshots</repoOrgId>
<repoOrgName>org-apache-name</repoOrgName> <repoOrgName>Apache Snapshot Repository</repoOrgName>
<repoOrgUrl>https://repository.apache.org/content/repositories/public/</repoOrgUrl> <repoOrgUrl>https://repository.apache.org/snapshots</repoOrgUrl>
<!-- Allow the handful of flaky tests with transient failures to pass. --> <!-- Allow the handful of flaky tests with transient failures to pass. -->
<surefire.rerunFailingTestsCount>3</surefire.rerunFailingTestsCount> <surefire.rerunFailingTestsCount>3</surefire.rerunFailingTestsCount>
@ -157,13 +169,13 @@
<module>distribution</module> <module>distribution</module>
</modules> </modules>
<repositories> <repositories>
<repository> <repository>
<id>${repoOrgId}</id> <id>${repoOrgId}</id>
<name>${repoOrgName}</name> <name>${repoOrgName}</name>
<url>${repoOrgUrl}</url> <url>${repoOrgUrl}</url>
</repository> </repository>
</repositories> </repositories>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
@ -1012,6 +1024,60 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Build-Jdk>${java.version} (${java.vendor} ${java.vm.version})</Build-Jdk>
<Build-OS>${os.name} ${os.arch} ${os.version}</Build-OS>
<Build-Timestamp>${git.build.time}</Build-Timestamp>
<Build-Version>${git.build.version}</Build-Version>
<Build-Revision>${git.commit.id}</Build-Revision>
<Build-Revision-Describe>${git.commit.id.describe}</Build-Revision-Describe>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.5</version>
<executions>
<execution>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
<dateFormatTimeZone>Etc/UTC</dateFormatTimeZone>
<skipPoms>false</skipPoms>
<format>json</format>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>${project.build.directory}/git.version</generateGitPropertiesFilename>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
<excludeProperties>
<excludeProperty>git.build.user.email</excludeProperty>
<excludeProperty>git.build.host</excludeProperty>
<excludeProperty>git.commit.id.describe-short</excludeProperty>
<excludeProperty>git.commit.user.*</excludeProperty>
<excludeProperty>git.commit.message.*</excludeProperty>
<excludeProperty>git.closest.tag.*</excludeProperty>
<excludeProperty>git.commit.id.abbrev</excludeProperty>
<excludeProperty>git.dirty</excludeProperty>
</excludeProperties>
<gitDescribe>
<skip>false</skip>
<always>false</always>
<abbrev>7</abbrev>
<dirty>-dirty</dirty>
<forceLongFormat>true</forceLongFormat>
</gitDescribe>
</configuration>
</plugin>
</plugins> </plugins>
<pluginManagement> <pluginManagement>
<plugins> <plugins>
@ -1106,7 +1172,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<version>2.5.5</version> <version>3.1.0</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
@ -1121,6 +1187,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
<configuration> <configuration>
<!-- jdk8 started linting javadocs by default; ours are not fully compliant --> <!-- jdk8 started linting javadocs by default; ours are not fully compliant -->
<additionalparam>-Xdoclint:none</additionalparam> <additionalparam>-Xdoclint:none</additionalparam>
@ -1151,10 +1218,20 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<source>${maven.compiler.target}</source> <source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target> <target>${maven.compiler.target}</target>
</configuration> </configuration>
</plugin> </plugin>
<!-- Prevent the process-resource-bundles execution defined in the Apache parent POM from running -->
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<executions>
<execution>
<id>process-resource-bundles</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
</build> </build>
@ -1173,7 +1250,7 @@
<fork>true</fork> <fork>true</fork>
<meminitial>1024m</meminitial> <meminitial>1024m</meminitial>
<maxmem>3000m</maxmem> <maxmem>3000m</maxmem>
<source>${maven.compiler.target}</source> <source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target> <target>${maven.compiler.target}</target>
<showWarnings>false</showWarnings> <showWarnings>false</showWarnings>
<compilerArgs> <compilerArgs>
@ -1291,7 +1368,7 @@
<licenses> <licenses>
<license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense"> <license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
<licenseFamilyCategory>MIT</licenseFamilyCategory> <licenseFamilyCategory>MIT</licenseFamilyCategory>
<licenseFamilyName>MIT JQyery</licenseFamilyName> <licenseFamilyName>MIT JQuery</licenseFamilyName>
<notes></notes> <notes></notes>
<patterns> <patterns>
<pattern>Copyright 2012 jQuery Foundation and other contributors; Licensed MIT</pattern> <pattern>Copyright 2012 jQuery Foundation and other contributors; Licensed MIT</pattern>
@ -1328,7 +1405,7 @@
<licenseFamilies> <licenseFamilies>
<licenseFamily implementation="org.apache.rat.license.SimpleLicenseFamily"> <licenseFamily implementation="org.apache.rat.license.SimpleLicenseFamily">
<familyName>MIT JQyery</familyName> <familyName>MIT JQuery</familyName>
</licenseFamily> </licenseFamily>
<licenseFamily implementation="org.apache.rat.license.SimpleLicenseFamily"> <licenseFamily implementation="org.apache.rat.license.SimpleLicenseFamily">
<familyName>Underscore</familyName> <familyName>Underscore</familyName>
@ -1375,5 +1452,22 @@
</plugins> </plugins>
</build> </build>
</profile> </profile>
<!-- Prevent the source-release-assembly execution defined in the Apache parent POM from running so we can control it ourselves -->
<profile>
<id>apache-release</id>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>source-release-assembly</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles> </profiles>
</project> </project>