This is an automated email from the ASF dual-hosted git repository.
andor pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/zookeeper.git
The following commit(s) were added to refs/heads/branch-3.5 by this push:
new 4a856e5 ZOOKEEPER-3028: MAVEN MIGRATION - 3.5 - Create maven assembly
4a856e5 is described below
commit 4a856e5d61d681b88309d4288543f17cf1a5b985
Author: Norbert Kalmar <[email protected]>
AuthorDate: Fri Feb 15 10:53:08 2019 +0100
ZOOKEEPER-3028: MAVEN MIGRATION - 3.5 - Create maven assembly
Author: Norbert Kalmar <nkalmaryahoo.com>
Reviewers: andorapache.org
Closes #776 from nkalmar/ZK-3028 and squashes the following commits:
c255d2503 [Norbert Kalmar] ZOOKEEPER-3028 - fix javadoc warnings
b6ec90e11 [Norbert Kalmar] ZOOKEEPER-3028 - fix log4j.properties problem
not getting into target
a54e49b49 [Norbert Kalmar] ZOOKEEPER-3028 - Remove empty test jar generation
be73ead6b [Norbert Kalmar] ZOOKEEPER-3028 - update README.md
d81a586bd [Norbert Kalmar] ZOOKEEPER-3028 update relese procedures
42389350e [Norbert Kalmar] ZOOKEEPER-3028 - Add maven release procedure to
readme.md
dc3ab0152 [Norbert Kalmar] ZOOKEEPER-3028 - fix jars, add javadoc jar
07dfcf2d9 [Norbert Kalmar] ZOOKEEPER-3028 - move assembly descriptor
e22c708c3 [Norbert Kalmar] ZOOKEEPER-3028 - fix tarball to contain
buildable source
859dfb949 [Norbert Kalmar] ZOOKEEPER-3028 add apache release
46c2f93bf [Norbert Kalmar] ZOOKEEPER-3028 add release plugin
8c56e3c70 [Norbert Kalmar] ZOOKEEPER-3028 - Create maven assembly
Author: Norbert Kalmar <[email protected]>
Reviewers: [email protected]
Closes #813 from nkalmar/ZK-3028_3.5
---
.gitignore | 1 +
README.md | 9 +-
pom.xml | 188 +++++++++++++++++++--
source-package.xml | 91 ++++++++++
zookeeper-client/pom.xml | 21 +++
zookeeper-contrib/pom.xml | 53 ++++--
zookeeper-docs/pom.xml | 70 +++++---
zookeeper-jute/pom.xml | 16 ++
zookeeper-recipes/pom.xml | 23 ++-
zookeeper-server/pom.xml | 49 +++---
.../src/{main => test}/resources/log4j.properties | 0
11 files changed, 442 insertions(+), 79 deletions(-)
diff --git a/.gitignore b/.gitignore
index 5fe044f..2a1c5a9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@ zookeeper-server/version-2/*
# SVN
.svn
.revision
+git.properties
# Eclipse
.metadata
diff --git a/README.md b/README.md
index 585ecf9..e90d572 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,14 @@ and our wiki, at:
Full documentation for this release can also be found in docs/index.html
---------------------------
-Packaging/release artifacts
+Packaging/release artifacts - Maven
+
+ A buildable tarball is located under zookeeper/target/ directory
+
+ The artifacts for the modules are uploaded to maven central.
+
+
+Packaging/release artifacts - Ant
The release artifact contains the following jar file at the toplevel:
diff --git a/pom.xml b/pom.xml
index 0f27304..8103897 100755
--- a/pom.xml
+++ b/pom.xml
@@ -64,7 +64,7 @@
</modules>
<scm>
- <connection>scm:git:git://git.apache.org/zookeeper.git</connection>
+
<connection>scm:git:https://gitbox.apache.org/repos/asf/zookeeper.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/zookeeper.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf/zookeeper.git</url>
</scm>
@@ -236,6 +236,12 @@
<email>[email protected]</email>
<timezone>+1</timezone>
</developer>
+ <developer>
+ <id>lvfangmin</id>
+ <name>Allan Lyu</name>
+ <email>[email protected]</email>
+ <timezone>-8</timezone>
+ </developer>
</developers>
<profiles>
@@ -431,6 +437,11 @@
<pluginManagement>
<plugins>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>properties-maven-plugin</artifactId>
+ <version>1.0.0</version>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
@@ -442,6 +453,33 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>3.0.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>3.0.1</version>
+ <configuration>
+ <doclint>none</doclint>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>3.1.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.5.3</version>
+ <configuration>
+ <releaseProfiles>apache-release</releaseProfiles>
+ <arguments>-Dmaven.test.skip.exec ${arguments}</arguments>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
@@ -464,6 +502,7 @@
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.5</version>
+ <inherited>false</inherited>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -493,6 +532,35 @@
<plugins>
<plugin>
+ <groupId>pl.project13.maven</groupId>
+ <artifactId>git-commit-id-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>find-current-git-revision</id>
+ <goals>
+ <goal>revision</goal>
+ </goals>
+ <phase>validate</phase>
+ </execution>
+ </executions>
+ <configuration>
+ <skipPoms>false</skipPoms>
+ <runOnlyOnce>true</runOnlyOnce>
+ <failOnNoGitDirectory>false</failOnNoGitDirectory>
+ <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
+ <prefix>git</prefix>
+ <verbose>false</verbose>
+ <generateGitPropertiesFile>true</generateGitPropertiesFile>
+
<generateGitPropertiesFilename>${project.basedir}/zookeeper-server/src/main/resources/git.properties</generateGitPropertiesFilename>
+ <format>properties</format>
+ <gitDescribe>
+ <skip>false</skip>
+ <always>false</always>
+ <dirty>-dirty</dirty>
+ </gitDescribe>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>org.openclover</groupId>
<artifactId>clover-maven-plugin</artifactId>
<configuration>
@@ -515,22 +583,118 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <exportAntProperties>true</exportAntProperties>
+ <target>
+ <property environment="env"/>
+ <exec executable="hostname" outputproperty="host.name"/>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>Jar Tests Package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ <configuration>
+ <includes>
+ <include>org/**</include>
+ <include>META_INF/**</include>
+ </includes>
+ <skipIfEmpty>true</skipIfEmpty>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>source-package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>
+ single
+ </goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>${project.basedir}/source-package.xml</descriptor>
+ </descriptors>
+ <finalName>zookeeper-${project.version}</finalName>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
</plugin>
<plugin>
- <groupId>org.owasp</groupId>
- <artifactId>dependency-check-maven</artifactId>
- <configuration>
- <format>ALL</format>
- <failBuildOnCVSS>0</failBuildOnCVSS>
- <suppressionFiles>
- <suppressionsFile>owaspSuppressions.xml</suppressionsFile>
- </suppressionFiles>
- </configuration>
- </plugin>
- </plugins>
+ <groupId>org.owasp</groupId>
+ <artifactId>dependency-check-maven</artifactId>
+ <configuration>
+ <format>ALL</format>
+ <failBuildOnCVSS>0</failBuildOnCVSS>
+ <suppressionFiles>
+ <suppressionsFile>owaspSuppressions.xml</suppressionsFile>
+ </suppressionFiles>
+ </configuration>
+ </plugin>
+ </plugins>
+
+ <resources>
+ <resource>
+ <directory>${project.basedir}src/main/java/resources</directory>
+ <excludes>
+ <exclude>**/*.*</exclude>
+ </excludes>
+ </resource>
+ </resources>
</build>
<reporting>
diff --git a/source-package.xml b/source-package.xml
new file mode 100644
index 0000000..139f99f
--- /dev/null
+++ b/source-package.xml
@@ -0,0 +1,91 @@
+<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-package</id>
+ <formats>
+ <format>tar.gz</format>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${project.basedir}/bin</directory>
+ <outputDirectory>bin</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/conf</directory>
+ <outputDirectory>conf</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/zookeeper-client</directory>
+ <excludes>
+ <exclude>**/target/**</exclude>
+ </excludes>
+ <outputDirectory>zookeeper-client</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/zookeeper-contrib</directory>
+ <excludes>
+ <exclude>**/target/**</exclude>
+ </excludes>
+ <outputDirectory>zookeeper-contrib</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/zookeeper-docs</directory>
+ <excludes>
+ <exclude>**/target/**</exclude>
+ </excludes>
+ <outputDirectory>zookeeper-docs</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/zookeeper-it</directory>
+ <excludes>
+ <exclude>**/target/**</exclude>
+ </excludes>
+ <outputDirectory>zookeeper-it</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/zookeeper-jute</directory>
+ <excludes>
+ <exclude>**/target/**</exclude>
+ </excludes>
+ <outputDirectory>zookeeper-jute</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/zookeeper-recipes</directory>
+ <excludes>
+ <exclude>**/target/**</exclude>
+ </excludes>
+ <outputDirectory>zookeeper-recipes</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/zookeeper-server</directory>
+ <excludes>
+ <exclude>**/target/**</exclude>
+ </excludes>
+ <outputDirectory>zookeeper-server</outputDirectory>
+ </fileSet>
+ </fileSets>
+ <files>
+ <file>
+ <source>${project.basedir}/pom.xml</source>
+ </file>
+ <file>
+ <source>${project.basedir}/source-package.xml</source>
+ </file>
+ <file>
+ <source>${project.basedir}/LICENSE.txt</source>
+ </file>
+ <file>
+ <source>${project.basedir}/NOTICE.txt</source>
+ </file>
+ <file>
+ <source>${project.basedir}/README.md</source>
+ </file>
+ <file>
+ <source>${project.basedir}/README_packaging.txt</source>
+ </file>
+
+ </files>
+</assembly>
\ No newline at end of file
diff --git a/zookeeper-client/pom.xml b/zookeeper-client/pom.xml
index f389319..68a3fc3 100755
--- a/zookeeper-client/pom.xml
+++ b/zookeeper-client/pom.xml
@@ -48,4 +48,25 @@
</profile>
</profiles>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>source-package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <skipAssembly>true</skipAssembly>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
\ No newline at end of file
diff --git a/zookeeper-contrib/pom.xml b/zookeeper-contrib/pom.xml
index eb44c53..d458daa 100755
--- a/zookeeper-contrib/pom.xml
+++ b/zookeeper-contrib/pom.xml
@@ -34,25 +34,46 @@
<description>
Contrib projects to Apache ZooKeeper
</description>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>com.github.spotbugs</groupId>
- <artifactId>spotbugs-maven-plugin</artifactId>
- <version>3.1.9</version>
- <configuration>
- <!-- No spotbugs for contri modules -->
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
+
<modules>
<module>zookeeper-contrib-loggraph</module>
<module>zookeeper-contrib-rest</module>
<module>zookeeper-contrib-zooinspector</module>
</modules>
-</project>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>com.github.spotbugs</groupId>
+ <artifactId>spotbugs-maven-plugin</artifactId>
+ <version>3.1.9</version>
+ <configuration>
+ <!-- No spotbugs for contri modules -->
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>source-package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <skipAssembly>true</skipAssembly>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
diff --git a/zookeeper-docs/pom.xml b/zookeeper-docs/pom.xml
index 1bfa9f4..e271053 100644
--- a/zookeeper-docs/pom.xml
+++ b/zookeeper-docs/pom.xml
@@ -27,33 +27,49 @@
<relativePath>..</relativePath>
</parent>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper-docs</artifactId>
- <version>3.5.5-SNAPSHOT</version>
- <name>Apache ZooKeeper - Documentation</name>
- <description>Documentation</description>
+ <groupId>org.apache.zookeeper</groupId>
+ <artifactId>zookeeper-docs</artifactId>
+ <version>3.5.5-SNAPSHOT</version>
+ <name>Apache ZooKeeper - Documentation</name>
+ <description>Documentation</description>
- <build>
- <plugins>
- <plugin>
- <groupId>com.ruleoftech</groupId>
- <artifactId>markdown-page-generator-plugin</artifactId>
- <version>0.10</version>
- <executions>
- <execution>
- <phase>process-sources</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
-
<headerHtmlFile>${project.basedir}/src/main/resources/markdown/html/header.html</headerHtmlFile>
-
<footerHtmlFile>${project.basedir}/src/main/resources/markdown/html/footer.html</footerHtmlFile>
- <copyDirectories>images,skin</copyDirectories>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.ruleoftech</groupId>
+ <artifactId>markdown-page-generator-plugin</artifactId>
+ <version>0.10</version>
+ <executions>
+ <execution>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+
<headerHtmlFile>${project.basedir}/src/main/resources/markdown/html/header.html</headerHtmlFile>
+
<footerHtmlFile>${project.basedir}/src/main/resources/markdown/html/footer.html</footerHtmlFile>
+ <copyDirectories>images,skin</copyDirectories>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>source-package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <skipAssembly>true</skipAssembly>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
\ No newline at end of file
diff --git a/zookeeper-jute/pom.xml b/zookeeper-jute/pom.xml
index e269fc9..92cf94e 100755
--- a/zookeeper-jute/pom.xml
+++ b/zookeeper-jute/pom.xml
@@ -146,6 +146,22 @@
</executions>
</plugin>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>source-package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <skipAssembly>true</skipAssembly>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<!-- spotbugs does not make sense for generated code -->
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
diff --git a/zookeeper-recipes/pom.xml b/zookeeper-recipes/pom.xml
index 0b76764..99bc63d 100755
--- a/zookeeper-recipes/pom.xml
+++ b/zookeeper-recipes/pom.xml
@@ -62,4 +62,25 @@
<module>zookeeper-recipes-queue</module>
</modules>
-</project>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>source-package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <skipAssembly>true</skipAssembly>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
diff --git a/zookeeper-server/pom.xml b/zookeeper-server/pom.xml
index 2a35f7d..d104979 100755
--- a/zookeeper-server/pom.xml
+++ b/zookeeper-server/pom.xml
@@ -141,20 +141,21 @@
<build>
<plugins>
<plugin>
- <groupId>pl.project13.maven</groupId>
- <artifactId>git-commit-id-plugin</artifactId>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>properties-maven-plugin</artifactId>
<executions>
<execution>
- <id>find-current-git-revision</id>
+ <phase>initialize</phase>
<goals>
- <goal>revision</goal>
+ <goal>read-project-properties</goal>
</goals>
- <phase>validate</phase>
+ <configuration>
+ <files>
+ <file>${basedir}/src/main/resources/git.properties</file>
+ </files>
+ </configuration>
</execution>
</executions>
- <configuration>
- <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
- </configuration>
</plugin>
<plugin> <!-- ${maven.build.timestamp} does not support timezone :( -->
<groupId>org.codehaus.mojo</groupId>
@@ -210,7 +211,7 @@
<classpath />
<argument>org.apache.zookeeper.version.util.VerGen</argument>
<argument>${project.version}</argument>
- <argument>${git.commit.id.describe}</argument>
+ <argument>${git.commit.id}</argument>
<argument>${build.time}</argument>
</arguments>
</configuration>
@@ -219,19 +220,6 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <id>Jar Tests Package</id>
- <phase>package</phase>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
@@ -268,6 +256,23 @@
</systemPropertyVariables>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>source-package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <skipAssembly>true</skipAssembly>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
diff --git a/zookeeper-server/src/main/resources/log4j.properties
b/zookeeper-server/src/test/resources/log4j.properties
similarity index 100%
rename from zookeeper-server/src/main/resources/log4j.properties
rename to zookeeper-server/src/test/resources/log4j.properties