You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by da...@apache.org on 2018/10/18 07:05:55 UTC

[incubator-druid] 02/02: Apache-ize POM (#6482)

This is an automated email from the ASF dual-hosted git repository.

davidlim pushed a commit to branch 0.13.0-incubating
in repository https://gitbox.apache.org/repos/asf/incubator-druid.git

commit 6c31ebdb007caff9955b81c54b8041176906f9b9
Author: David Lim <dc...@users.noreply.github.com>
AuthorDate: Wed Oct 17 19:37:01 2018 -0600

    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
---
 DruidCorporateCLA.pdf                         | Bin 159537 -> 0 bytes
 DruidIndividualCLA.pdf                        | Bin 77564 -> 0 bytes
 distribution/pom.xml                          |  52 +++++++++-
 distribution/src/assembly/assembly.xml        |   5 +-
 distribution/src/assembly/source-assembly.xml |  61 ++++++++++++
 pom.xml                                       | 134 ++++++++++++++++++++++----
 6 files changed, 229 insertions(+), 23 deletions(-)

diff --git a/DruidCorporateCLA.pdf b/DruidCorporateCLA.pdf
deleted file mode 100644
index d3f24b3..0000000
Binary files a/DruidCorporateCLA.pdf and /dev/null differ
diff --git a/DruidIndividualCLA.pdf b/DruidIndividualCLA.pdf
deleted file mode 100644
index eee4c72..0000000
Binary files a/DruidIndividualCLA.pdf and /dev/null differ
diff --git a/distribution/pom.xml b/distribution/pom.xml
index ef09f02..e7ad4ef 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -45,6 +45,41 @@
         <!-- 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>
     </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>
         <profile>
             <id>dist</id>
@@ -231,13 +266,28 @@
                                     <goal>single</goal>
                                 </goals>
                                 <configuration>
-                                    <finalName>${project.parent.artifactId}-${project.parent.version}</finalName>
+                                    <finalName>apache-druid-${project.parent.version}</finalName>
                                     <tarLongFileMode>posix</tarLongFileMode>
                                     <descriptors>
                                         <descriptor>src/assembly/assembly.xml</descriptor>
                                     </descriptors>
                                 </configuration>
                             </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>
                     </plugin>
                     <plugin>
diff --git a/distribution/src/assembly/assembly.xml b/distribution/src/assembly/assembly.xml
index 5bc99ee..c1251f4 100644
--- a/distribution/src/assembly/assembly.xml
+++ b/distribution/src/assembly/assembly.xml
@@ -18,9 +18,9 @@
   ~ 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"
-          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>
     <formats>
         <format>tar.gz</format>
@@ -223,6 +223,7 @@
             <includes>
                 <include>LICENSE</include>
                 <include>NOTICE</include>
+                <include>DISCLAIMER</include>
             </includes>
         </fileSet>
     </fileSets>
diff --git a/distribution/src/assembly/source-assembly.xml b/distribution/src/assembly/source-assembly.xml
new file mode 100644
index 0000000..59903d4
--- /dev/null
+++ b/distribution/src/assembly/source-assembly.xml
@@ -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>
diff --git a/pom.xml b/pom.xml
index fcc6f71..afec96b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,9 +23,9 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>io.druid</groupId>
-        <artifactId>oss-parent</artifactId>
-        <version>2</version>
+        <groupId>org.apache</groupId>
+        <artifactId>apache</artifactId>
+        <version>21</version>
     </parent>
 
     <groupId>org.apache.druid</groupId>
@@ -33,9 +33,9 @@
     <version>0.13.0-incubating-SNAPSHOT</version>
     <packaging>pom</packaging>
 
-    <name>${project.groupId}:${project.artifactId}</name>
+    <name>Druid</name>
     <description>Druid - A Distributed Column Store</description>
-    <url>http://druid.io/</url>
+    <url>https://druid.apache.org/</url>
 
     <licenses>
         <license>
@@ -51,6 +51,16 @@
         </developer>
     </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>
 
     <scm>
@@ -61,7 +71,9 @@
     </scm>
 
     <properties>
+        <maven.compiler.source>1.8</maven.compiler.source>
         <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.test.version>2.12.0</apache.curator.test.version>
         <avatica.version>1.10.0</avatica.version>
@@ -88,9 +100,9 @@
         <caffeine.version>2.5.5</caffeine.version>
         <!-- When upgrading ZK, edit docs and integration tests as well (integration-tests/docker-base/setup.sh) -->
         <zookeeper.version>3.4.11</zookeeper.version>
-        <repoOrgId>org-apache-id</repoOrgId>
-        <repoOrgName>org-apache-name</repoOrgName>
-        <repoOrgUrl>https://repository.apache.org/content/repositories/public/</repoOrgUrl>
+        <repoOrgId>apache.snapshots</repoOrgId>
+        <repoOrgName>Apache Snapshot Repository</repoOrgName>
+        <repoOrgUrl>https://repository.apache.org/snapshots</repoOrgUrl>
 
         <!-- Allow the handful of flaky tests with transient failures to pass. -->
         <surefire.rerunFailingTestsCount>3</surefire.rerunFailingTestsCount>
@@ -159,13 +171,13 @@
         <module>distribution</module>
     </modules>
 
-  <repositories>
-    <repository>
-        <id>${repoOrgId}</id>
-        <name>${repoOrgName}</name>
-        <url>${repoOrgUrl}</url>
-    </repository>
-  </repositories>
+    <repositories>
+        <repository>
+            <id>${repoOrgId}</id>
+            <name>${repoOrgName}</name>
+            <url>${repoOrgUrl}</url>
+        </repository>
+    </repositories>
 
     <dependencyManagement>
         <dependencies>
@@ -1014,6 +1026,60 @@
                     </execution>
                 </executions>
             </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>
         <pluginManagement>
             <plugins>
@@ -1108,7 +1174,7 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-assembly-plugin</artifactId>
-                    <version>2.5.5</version>
+                    <version>3.1.0</version>
                 </plugin>
                 <plugin>
                     <groupId>org.codehaus.mojo</groupId>
@@ -1123,6 +1189,7 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-javadoc-plugin</artifactId>
+                    <version>2.10.1</version>
                     <configuration>
                         <!-- jdk8 started linting javadocs by default; ours are not fully compliant -->
                         <additionalparam>-Xdoclint:none</additionalparam>
@@ -1153,10 +1220,20 @@
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-compiler-plugin</artifactId>
                     <configuration>
-                        <source>${maven.compiler.target}</source>
+                        <source>${maven.compiler.source}</source>
                         <target>${maven.compiler.target}</target>
                     </configuration>
                 </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>
         </pluginManagement>
     </build>
@@ -1175,7 +1252,7 @@
                             <fork>true</fork>
                             <meminitial>1024m</meminitial>
                             <maxmem>3000m</maxmem>
-                            <source>${maven.compiler.target}</source>
+                            <source>${maven.compiler.source}</source>
                             <target>${maven.compiler.target}</target>
                             <showWarnings>false</showWarnings>
                             <compilerArgs>
@@ -1293,7 +1370,7 @@
                             <licenses>
                                 <license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
                                     <licenseFamilyCategory>MIT</licenseFamilyCategory>
-                                    <licenseFamilyName>MIT JQyery</licenseFamilyName>
+                                    <licenseFamilyName>MIT JQuery</licenseFamilyName>
                                     <notes></notes>
                                     <patterns>
                                         <pattern>Copyright 2012 jQuery Foundation and other contributors; Licensed MIT</pattern>
@@ -1330,7 +1407,7 @@
 
                             <licenseFamilies>
                                 <licenseFamily implementation="org.apache.rat.license.SimpleLicenseFamily">
-                                    <familyName>MIT JQyery</familyName>
+                                    <familyName>MIT JQuery</familyName>
                                 </licenseFamily>
                                 <licenseFamily implementation="org.apache.rat.license.SimpleLicenseFamily">
                                     <familyName>Underscore</familyName>
@@ -1377,5 +1454,22 @@
                 </plugins>
             </build>
         </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>
 </project>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org