Skip to content

Commit

Permalink
ZOOKEEPER-3028: MAVEN MIGRATION - 3.4 - Create maven assembly
Browse files Browse the repository at this point in the history
Author: Norbert Kalmar <nkalmaryahoo.com>

Reviewers: andorapache.org

Closes #776 from nkalmar/ZK-3028 and squashes the following commits:

c255d25 [Norbert Kalmar] ZOOKEEPER-3028 - fix javadoc warnings
b6ec90e [Norbert Kalmar] ZOOKEEPER-3028 - fix log4j.properties problem not getting into target
a54e49b [Norbert Kalmar] ZOOKEEPER-3028 - Remove empty test jar generation
be73ead [Norbert Kalmar] ZOOKEEPER-3028 - update README.md
d81a586 [Norbert Kalmar] ZOOKEEPER-3028 update relese procedures
4238935 [Norbert Kalmar] ZOOKEEPER-3028 - Add maven release procedure to readme.md
dc3ab01 [Norbert Kalmar] ZOOKEEPER-3028 - fix jars, add javadoc jar
07dfcf2 [Norbert Kalmar] ZOOKEEPER-3028 - move assembly descriptor
e22c708 [Norbert Kalmar] ZOOKEEPER-3028 - fix tarball to contain buildable source
859dfb9 [Norbert Kalmar] ZOOKEEPER-3028 add apache release
46c2f93 [Norbert Kalmar] ZOOKEEPER-3028 add release plugin
8c56e3c [Norbert Kalmar] ZOOKEEPER-3028 - Create maven assembly

Author: Norbert Kalmar <nkalmar@yahoo.com>

Reviewers: andor@apache.org

Closes #814 from nkalmar/ZK-3028_3.4 and squashes the following commits:

f3a2f05 [Norbert Kalmar] ZOOKEEPER-3028 - fix failing unit tests when runing maven
52d6574 [Norbert Kalmar] ZOOKEEPER-3028: MAVEN MIGRATION - - Create maven assembly
  • Loading branch information
nkalmar authored and anmolnar committed Feb 21, 2019
1 parent 9de50d9 commit 812650d
Show file tree
Hide file tree
Showing 11 changed files with 457 additions and 85 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -9,6 +9,7 @@ zookeeper-server/version-2/*
# SVN
.svn
.revision
git.properties

# Eclipse
.metadata
Expand Down Expand Up @@ -83,4 +84,4 @@ zookeeper-client/zookeeper-client-c/install-sh
zookeeper-client/zookeeper-client-c/ltmain.sh
zookeeper-client/zookeeper-client-c/missing
zookeeper-server/src/main/java/org/apache/zookeeper/version/Info.java
zookeeper-server/src/test/resources/
zookeeper-server/src/test/resources/data/**/
9 changes: 8 additions & 1 deletion README.md
Expand Up @@ -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:

Expand Down
197 changes: 181 additions & 16 deletions pom.xml
Expand Up @@ -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>
Expand Down Expand Up @@ -236,6 +236,12 @@
<email>andor@apache.org</email>
<timezone>+1</timezone>
</developer>
<developer>
<id>lvfangmin</id>
<name>Allan Lyu</name>
<email>fangmin@apache.org</email>
<timezone>-8</timezone>
</developer>
</developers>

<profiles>
Expand Down Expand Up @@ -587,10 +593,6 @@
<version>${apache-directory-server.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.apache.directory.jdbm</groupId>
<artifactId>apacheds-jdbm1</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.directory.api</groupId>
<artifactId>api-ldap-schema-data</artifactId>
Expand Down Expand Up @@ -650,6 +652,11 @@
<build>
<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>
Expand All @@ -660,6 +667,33 @@
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
</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>
Expand All @@ -684,6 +718,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>
Expand Down Expand Up @@ -713,10 +748,44 @@
<artifactId>dependency-check-maven</artifactId>
<version>4.0.2</version>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.1.0</version>
</plugin>
</plugins>
</pluginManagement>

<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>
Expand All @@ -740,22 +809,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>
Expand Down
91 changes: 91 additions & 0 deletions 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>

0 comments on commit 812650d

Please sign in to comment.