Repository: accumulo
Updated Branches:
  refs/heads/master 6d2cd6596 -> 85d254e12


ACCUMULO-2863 Add VERSIONS file

Added a VERSIONS file to the lib directory of the binary tarball for releases,
so users know what versions of bundled dependencies are included in that
directory.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/85d254e1
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/85d254e1
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/85d254e1

Branch: refs/heads/master
Commit: 85d254e12fadc1e6c06a8e03900f5f60a978deb6
Parents: 6d2cd65
Author: Christopher Tubbs <ctubb...@apache.org>
Authored: Mon Apr 13 18:47:23 2015 -0400
Committer: Christopher Tubbs <ctubb...@apache.org>
Committed: Mon Apr 13 18:47:23 2015 -0400

----------------------------------------------------------------------
 assemble/pom.xml                                | 32 ++++++++++++++++++++
 assemble/src/main/assemblies/component.xml      | 11 +++++++
 .../main/scripts/generate-versions-listing.sh   | 27 +++++++++++++++++
 3 files changed, 70 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/85d254e1/assemble/pom.xml
----------------------------------------------------------------------
diff --git a/assemble/pom.xml b/assemble/pom.xml
index 2a7156b..f15c5f4 100644
--- a/assemble/pom.xml
+++ b/assemble/pom.xml
@@ -172,10 +172,42 @@
   <build>
     <plugins>
       <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <!-- generate version listing for packaged dependencies -->
+            <id>generate-dependencies-raw</id>
+            <goals>
+              <goal>list</goal>
+            </goals>
+            <phase>compile</phase>
+            <configuration>
+              
<outputFile>${project.build.directory}/dependencies.raw.txt</outputFile>
+              <outputScope>false</outputScope>
+              <sort>true</sort>
+              <!-- this list should match that in 
src/main/assemblies/component.xml -->
+              
<includeArtifactIds>commons-math,commons-vfs2,gson,guava,htrace-core,javax.servlet-api,jcommander,jetty-http,jetty-io,jetty-security,jetty-server,jetty-servlet,jetty-util,jline,libthrift,protobuf-java,slf4j-api,slf4j-log4j12</includeArtifactIds>
+              <excludeTransitive>true</excludeTransitive>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>exec-maven-plugin</artifactId>
         <executions>
           <execution>
+            <id>generate-dependencies-listing</id>
+            <goals>
+              <goal>exec</goal>
+            </goals>
+            <phase>prepare-package</phase>
+            <configuration>
+              
<executable>${basedir}/src/main/scripts/generate-versions-listing.sh</executable>
+            </configuration>
+          </execution>
+          <execution>
             <id>generate-example-configs</id>
             <goals>
               <goal>exec</goal>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/85d254e1/assemble/src/main/assemblies/component.xml
----------------------------------------------------------------------
diff --git a/assemble/src/main/assemblies/component.xml 
b/assemble/src/main/assemblies/component.xml
index a48023e..463bcf6 100644
--- a/assemble/src/main/assemblies/component.xml
+++ b/assemble/src/main/assemblies/component.xml
@@ -26,6 +26,9 @@
       
<outputFileNameMapping>${artifact.artifactId}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
       <useTransitiveDependencies>false</useTransitiveDependencies>
       <includes>
+        <!-- if you update this list, you should also update the assembly
+        pom.xml section which executes the maven-dependency-plugin to generate 
a
+        version listing for packaged artifacts -->
         <include>${groupId}:${artifactId}-*</include>
         <include>com.beust:jcommander</include>
         <include>com.google.code.gson:gson</include>
@@ -253,5 +256,13 @@
         <include>BUILD.md</include>
       </includes>
     </fileSet>
+    <fileSet>
+      <directory>target</directory>
+      <outputDirectory>lib</outputDirectory>
+      <fileMode>0644</fileMode>
+      <includes>
+        <include>VERSIONS</include>
+      </includes>
+    </fileSet>
   </fileSets>
 </component>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/85d254e1/assemble/src/main/scripts/generate-versions-listing.sh
----------------------------------------------------------------------
diff --git a/assemble/src/main/scripts/generate-versions-listing.sh 
b/assemble/src/main/scripts/generate-versions-listing.sh
new file mode 100755
index 0000000..0d19254
--- /dev/null
+++ b/assemble/src/main/scripts/generate-versions-listing.sh
@@ -0,0 +1,27 @@
+#! /usr/bin/env bash
+
+# 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.
+
+# This script will generate a DEPENDENCIES listing of packaged dependencies
+
+in=target/dependencies.raw.txt
+out=target/VERSIONS
+
+echo 'This build bundles the following jars, identified by their maven' > 
"$out"
+echo 'address: <groupId>:<artifactId>:<version>' >> "$out"
+echo '' >> "$out"
+
+cat "$in" | grep '^   [a-z]' | sed 's/:jar:/:/' >> "$out"

Reply via email to