accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject svn commit: r1477338 - in /accumulo/branches/1.5: ./ assemble/ assemble/src/ assemble/src/main/ assemble/src/main/assemblies/ contrib/ core/ core/src/main/java-filtered/ core/src/main/java-filtered/org/ core/src/main/java-filtered/org/apache/ core/src/...
Date Mon, 29 Apr 2013 20:58:57 GMT
Author: ctubbsii
Date: Mon Apr 29 20:58:56 2013
New Revision: 1477338

URL: http://svn.apache.org/r1477338
Log:
ACCUMULO-1271 Make version derived from build (no more sed to update version numbers) to reduce
steps in releasing; configure necessary properties; update assemble/build.sh; remove warnings
from tarball assembly; obsolete assemble/build.sh invocation of rat plugin (ACCUMULO-1181);
use classifiers for assemble artifacts and move assembly descriptor to subdirectory; make
rpm plugin do gpg signing with gpg-agent; fix license info for rpm; add license/notice files
to rpm; remove custom file output names for deb since they're attached to the build anyway;
updated documentation


Added:
    accumulo/branches/1.5/assemble/src/
    accumulo/branches/1.5/assemble/src/main/
    accumulo/branches/1.5/assemble/src/main/assemblies/
    accumulo/branches/1.5/assemble/src/main/assemblies/bin.xml
      - copied, changed from r1475757, accumulo/branches/1.5/assemble/dist.xml
    accumulo/branches/1.5/contrib/dotfile-rpmmacros
    accumulo/branches/1.5/core/src/main/java-filtered/
    accumulo/branches/1.5/core/src/main/java-filtered/org/
    accumulo/branches/1.5/core/src/main/java-filtered/org/apache/
    accumulo/branches/1.5/core/src/main/java-filtered/org/apache/accumulo/
    accumulo/branches/1.5/core/src/main/java-filtered/org/apache/accumulo/core/
    accumulo/branches/1.5/core/src/main/java-filtered/org/apache/accumulo/core/FilteredConstants.java
Removed:
    accumulo/branches/1.5/assemble/dist.xml
Modified:
    accumulo/branches/1.5/README
    accumulo/branches/1.5/assemble/build.sh
    accumulo/branches/1.5/assemble/pom.xml
    accumulo/branches/1.5/core/pom.xml
    accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/Constants.java
    accumulo/branches/1.5/docs/src/user_manual/chapters/administration.tex
    accumulo/branches/1.5/pom.xml

Modified: accumulo/branches/1.5/README
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/README?rev=1477338&r1=1477337&r2=1477338&view=diff
==============================================================================
--- accumulo/branches/1.5/README (original)
+++ accumulo/branches/1.5/README Mon Apr 29 20:58:56 2013
@@ -44,7 +44,7 @@ easier to install.
 
 Copy the accumulo tar file produced by mvn package from the assemble/target/
 directory to the desired destination, then untar it (e.g. 
-tar xzf apache-accumulo-1.5.0-SNAPSHOT-dist.tar.gz).
+tar xzf accumulo-assemble-1.5.0-bin.tar.gz).
 
 If you are using the RPM, install the RPM on every machine that will run
 accumulo.

Modified: accumulo/branches/1.5/assemble/build.sh
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/assemble/build.sh?rev=1477338&r1=1477337&r2=1477338&view=diff
==============================================================================
--- accumulo/branches/1.5/assemble/build.sh (original)
+++ accumulo/branches/1.5/assemble/build.sh Mon Apr 29 20:58:56 2013
@@ -38,13 +38,48 @@ runAt() {
   ( cd $1 ; echo in `pwd`; shift ; run $@ ) || fail 
 }
 
-run mvn -U clean 
-mvn rat:check 
-COUNT=`grep '!????' target/rat.txt | wc -l`
-EXPECTED=53
-if [ "$COUNT" -ne $EXPECTED ]
-then
-   fail expected $EXPECTED files missing licenses, but saw "$COUNT"
+# Allow skipping tests; This option is not possible
+# with the --create-release-candidate option
+if [[ $1 != '--skipTests' ]]; then
+  # Run all tests with Hadoop 1.0.x
+  run mvn clean
+  run mvn verify
+
+  # Run all tests with Hadoop 2.0.x
+  run mvn clean
+  run mvn verify -Dhadoop.profile=2.0
+fi
+
+# Build and stage release artifacts; dryRun is assumed, unless
+# this script is executed with --create-release-candidate flag.
+DRYRUN='-DdryRun'
+if [[ $1 = '--create-release-candidate' ]]; then
+  DRYRUN=''
+fi
+
+# make sure gpg agent has key cached; TODO prompt for key instead of using default
+# if you want the RPM signed, copy contrib/dotfiles-rpmmacros to $HOME/.rpmmacros
+TESTFILE=/tmp/${USER}-gpgTestFile.txt
+touch "${TESTFILE}" && gpg --sign "${TESTFILE}" && rm -f "${TESTFILE}" "${TESTFILE}.gpg"
+
+run mvn clean release:clean release:prepare $DRYRUN
+run mvn release:perform $DRYRUN
+
+if [[ $DRYRUN = '-DdryRun' ]]; then
+  echo '**************************************************'
+  echo '  You performed a dryRun release. To tag and'
+  echo '  stage a real release candidate for a vote,'
+  echo '  execute this script as:'
+  echo "    $0 --create-release-candidate"
+  echo '**************************************************'
+else
+  echo '**************************************************'
+  echo '  You\'ve successfully tagged and staged a'
+  echo '  release candidate. If the vote succeeds, rename'
+  echo '  the release candidate to its final name,'
+  echo '  promote the staging repository, copy the'
+  echo '  artifacts to the dist svn, update the web page,'
+  echo '  and create a release announcement for the'
+  echo '  mailing lists.'
+  echo '**************************************************'
 fi
-run mvn package javadoc:aggregate javadoc:jar source:jar -Pdist
-run mvn -P assemble

Modified: accumulo/branches/1.5/assemble/pom.xml
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/assemble/pom.xml?rev=1477338&r1=1477337&r2=1477338&view=diff
==============================================================================
--- accumulo/branches/1.5/assemble/pom.xml (original)
+++ accumulo/branches/1.5/assemble/pom.xml Mon Apr 29 20:58:56 2013
@@ -36,7 +36,7 @@
        Further, the dependencies for Accumulo artifacts must be
        here so they will be copied into the lib directory for
        the binary distribution assemblies.
-   -->
+    -->
     <dependency>
       <groupId>org.apache.accumulo</groupId>
       <artifactId>accumulo-core</artifactId>
@@ -106,14 +106,8 @@
       <build>
         <plugins>
           <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-assembly-plugin</artifactId>
-            <configuration>
-              <finalName>apache-${project.parent.artifactId}-${project.version}</finalName>
-              <descriptors>
-                <descriptor>dist.xml</descriptor>
-              </descriptors>
-              <tarLongFileMode>gnu</tarLongFileMode>
-            </configuration>
             <executions>
               <execution>
                 <id>distro-assembly</id>
@@ -121,6 +115,11 @@
                   <goal>single</goal>
                 </goals>
                 <phase>package</phase>
+                <configuration>
+                  <descriptors>
+                    <descriptor>src/main/assemblies/bin.xml</descriptor>
+                  </descriptors>
+                </configuration>
               </execution>
             </executions>
           </plugin>
@@ -136,12 +135,21 @@
             <artifactId>rpm-maven-plugin</artifactId>
             <inherited>false</inherited>
             <configuration>
-              <name>accumulo</name>
-              <projversion>${project.version}</projversion>
+              <!--
+                The following is a trick to get the plugin to sign the rpm.
+                However, these values are ignored, and gpg-agent is used instead.
+                Requires copying contrib/dotfiles-rpmmacros to $HOME/.rpmmacros
+                This is a workaround for bug http://jira.codehaus.org/browse/MRPM-139
+              -->
+              <keyname>dummy</keyname>
+              <keyPassphrase>
+                <passphrase>dummy</passphrase>
+              </keyPassphrase>
+              <classifier>bin</classifier>
               <summary>Apache Accumulo BigTable clone</summary>
-              <description>Apache Accumulo is a large distributed structured store
based on
-                Google's BigTable design.</description>
-              <copyright>2011 The Apache Software Foundation.</copyright>
+              <description>Apache Accumulo is a large distributed structured store
based on Google's BigTable design.</description>
+              <!-- This populates the license field of the RPM. -->
+              <copyright>Apache License, Version 2.0 and others (see included LICENSE
file)</copyright>
               <url>http://accumulo.apache.org</url>
               <group>Utilities</group>
               <requires>
@@ -159,6 +167,12 @@
                   <directory>/opt/accumulo/accumulo-${project.version}</directory>
                   <sources>
                     <source>
+                      <location>${accumulo-top}/LICENSE</location>
+                    </source>
+                    <source>
+                      <location>${accumulo-top}/NOTICE</location>
+                    </source>
+                    <source>
                       <location>${accumulo-top}/README</location>
                     </source>
                   </sources>
@@ -272,8 +286,7 @@
                 </goals>
                 <phase>package</phase>
                 <configuration>
-                  <classifier>deb</classifier>
-                  <deb>${project.build.directory}/${project.artifactId}_${project.version}.deb</deb>
+                  <classifier>bin</classifier>
                   <controlDir>assemble/deb/accumulo</controlDir>
                   <installDir>/usr/lib/accumulo</installDir>
                   <dataSet>
@@ -359,8 +372,7 @@
                 <configuration>
                   <controlDir>assemble/deb/accumulo-native</controlDir>
                   <installDir>/usr/lib/accumulo</installDir>
-                  <classifier>native-deb</classifier>
-                  <deb>${project.build.directory}/${project.artifactId}-native_${project.version}-${os.arch}.deb</deb>
+                  <classifier>native-libs</classifier>
                   <dataSet>
                     <data>
                       <src>${accumulo-top}/server/src/main/c++</src>
@@ -399,8 +411,7 @@
                 <configuration>
                   <controlDir>assemble/deb/accumulo-test</controlDir>
                   <installDir>/usr/lib/accumulo</installDir>
-                  <classifier>test-deb</classifier>
-                  <deb>${project.build.directory}/${project.artifactId}-test_${project.version}-${os.arch}.deb</deb>
+                  <classifier>tests</classifier>
                   <dataSet>
                     <data>
                       <src>${accumulo-top}/test</src>

Copied: accumulo/branches/1.5/assemble/src/main/assemblies/bin.xml (from r1475757, accumulo/branches/1.5/assemble/dist.xml)
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/assemble/src/main/assemblies/bin.xml?p2=accumulo/branches/1.5/assemble/src/main/assemblies/bin.xml&p1=accumulo/branches/1.5/assemble/dist.xml&r1=1475757&r2=1477338&rev=1477338&view=diff
==============================================================================
--- accumulo/branches/1.5/assemble/dist.xml (original)
+++ accumulo/branches/1.5/assemble/src/main/assemblies/bin.xml Mon Apr 29 20:58:56 2013
@@ -16,11 +16,10 @@
   limitations under the License.
 -->
 <assembly>
-  <id>dist</id>
+  <id>bin</id>
   <formats>
     <format>tar.gz</format>
   </formats>
-  <baseDirectory>apache-accumulo-${project.version}</baseDirectory>
   <fileSets>
     <fileSet>
       <directory>../bin</directory>

Added: accumulo/branches/1.5/contrib/dotfile-rpmmacros
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/contrib/dotfile-rpmmacros?rev=1477338&view=auto
==============================================================================
--- accumulo/branches/1.5/contrib/dotfile-rpmmacros (added)
+++ accumulo/branches/1.5/contrib/dotfile-rpmmacros Mon Apr 29 20:58:56 2013
@@ -0,0 +1,20 @@
+# 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.
+
+# Copying this to $HOME/.rpmmacros is a workaround to use gpg-agent
+# to sign RPMs, given http://jira.codehaus.org/browse/MRPM-139
+
+%__gpg_check_password_cmd /bin/true
+%__gpg_sign_cmd %{__gpg}  gpg --batch --no-verbose --no-armor --use-agent --no-secmem-warning
-sbo %{__signature_filename} %{__plaintext_filename}

Modified: accumulo/branches/1.5/core/pom.xml
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/core/pom.xml?rev=1477338&r1=1477337&r2=1477338&view=diff
==============================================================================
--- accumulo/branches/1.5/core/pom.xml (original)
+++ accumulo/branches/1.5/core/pom.xml Mon Apr 29 20:58:56 2013
@@ -108,6 +108,50 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>prepare-filtered-java-source</id>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <phase>generate-sources</phase>
+            <configuration>
+              <outputDirectory>${project.build.directory}/filtered-java-src</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>src/main/java-filtered</directory>
+                  <filtering>true</filtering>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>add-filtered-java-source</id>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
+            <phase>generate-sources</phase>
+            <configuration>
+              <sources>
+                <source>${project.build.directory}/filtered-java-src</source>
+              </sources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
   <profiles>
     <profile>
       <id>thrift</id>

Added: accumulo/branches/1.5/core/src/main/java-filtered/org/apache/accumulo/core/FilteredConstants.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/core/src/main/java-filtered/org/apache/accumulo/core/FilteredConstants.java?rev=1477338&view=auto
==============================================================================
--- accumulo/branches/1.5/core/src/main/java-filtered/org/apache/accumulo/core/FilteredConstants.java
(added)
+++ accumulo/branches/1.5/core/src/main/java-filtered/org/apache/accumulo/core/FilteredConstants.java
Mon Apr 29 20:58:56 2013
@@ -0,0 +1,21 @@
+/*
+ * 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.
+ */
+package org.apache.accumulo.core;
+
+public class FilteredConstants {
+  public static final String VERSION = "${accumulo.release.version}";
+}

Modified: accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/Constants.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/Constants.java?rev=1477338&r1=1477337&r2=1477338&view=diff
==============================================================================
--- accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/Constants.java (original)
+++ accumulo/branches/1.5/core/src/main/java/org/apache/accumulo/core/Constants.java Mon Apr
29 20:58:56 2013
@@ -31,7 +31,7 @@ import org.apache.hadoop.io.Text;
 
 public class Constants {
   public static final Charset UTF8 = Charset.forName("UTF-8");
-  public static final String VERSION = "1.5.0-SNAPSHOT";
+  public static final String VERSION = FilteredConstants.VERSION;
   
   // versions should never be negative
   public static final Integer WIRE_VERSION = 2;

Modified: accumulo/branches/1.5/docs/src/user_manual/chapters/administration.tex
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/docs/src/user_manual/chapters/administration.tex?rev=1477338&r1=1477337&r2=1477338&view=diff
==============================================================================
--- accumulo/branches/1.5/docs/src/user_manual/chapters/administration.tex (original)
+++ accumulo/branches/1.5/docs/src/user_manual/chapters/administration.tex Mon Apr 29 20:58:56
2013
@@ -45,7 +45,8 @@ by the environment variable \texttt{\$AC
 
 \small
 \begin{verbatim}
-$ tar xzf $ACCUMULO_HOME/apache-accumulo-1.5.tar.gz
+$ tar xzf accumulo-assemble-1.5.0-bin.tar.gz    # unpack to subdirectory
+$ mv accumulo-assemble-1.5.0-bin $ACCUMULO_HOME # move to desired location
 \end{verbatim}
 \normalsize
 

Modified: accumulo/branches/1.5/pom.xml
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/pom.xml?rev=1477338&r1=1477337&r2=1477338&view=diff
==============================================================================
--- accumulo/branches/1.5/pom.xml (original)
+++ accumulo/branches/1.5/pom.xml Mon Apr 29 20:58:56 2013
@@ -104,12 +104,25 @@
     </site>
   </distributionManagement>
   <properties>
+    <!-- used for filtering the java source with the current version -->
+    <accumulo.release.version>${project.version}</accumulo.release.version>
+    <!-- arguments for the release plugin goals;
+         these are in addition to apache-release defined in the parent POM -->
+    <arguments>-P seal-jars,check-licenses,thrift,dist,assemble,docs,rpm,deb</arguments>
+    <!-- only prompt once for the next version -->
     <autoVersionSubmodules>true</autoVersionSubmodules>
-    <maven.min-version>3.0.3</maven.min-version>
+    <!-- the maven-release-plugin makes this recommendation, due to plugin bugs -->
+    <maven.min-version>3.0.4</maven.min-version>
     <powermock.version>1.5</powermock.version>
+    <!-- for the release plugin -->
+    <preparationGoals>clean compile javadoc:aggregate install</preparationGoals>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     <sealJars>false</sealJars>
+    <!-- include the tarball, as well as the zip, for the Apache source-release artifact
-->
+    <sourceReleaseAssemblyDescriptor>source-release-zip-tar</sourceReleaseAssemblyDescriptor>
+    <!-- stage the RC in the tags directory -->
+    <tagNameFormat>@{project.version}-RC</tagNameFormat>
     <!-- ZooKeeper 3.4.x works also, but we're not using new features yet; this ensures
3.3.x compatibility. -->
     <zookeeper.version>3.3.6</zookeeper.version>
   </properties>
@@ -330,6 +343,13 @@
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-assembly-plugin</artifactId>
+          <configuration>
+            <tarLongFileMode>gnu</tarLongFileMode>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-changes-plugin</artifactId>
           <version>2.9</version>
           <configuration>
@@ -421,6 +441,20 @@
           </configuration>
         </plugin>
         <plugin>
+          <groupId>org.apache.rat</groupId>
+          <artifactId>apache-rat-plugin</artifactId>
+          <configuration>
+            <excludes>
+              <exclude>docs/apidocs/package-list</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>build-helper-maven-plugin</artifactId>
+          <version>1.8</version>
+        </plugin>
+        <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>cobertura-maven-plugin</artifactId>
           <version>2.5.2</version>
@@ -718,6 +752,15 @@
       </build>
     </profile>
     <profile>
+      <!-- Seal jars and skip tests when the
+           apache-release profile is activated. -->
+      <id>seal-jars</id>
+      <properties>
+        <sealJars>true</sealJars>
+        <skipTests>true</skipTests>
+      </properties>
+    </profile>
+    <profile>
       <!-- Automatically check for licenses.
            Activate with -P check-licenses -->
       <id>check-licenses</id>
@@ -858,30 +901,5 @@
         </dependencies>
       </dependencyManagement>
     </profile>
-    <profile>
-      <!-- Seal jars, skip tests, and do license checks when
-           the apache-release profile is activated. -->
-      <id>apache-release</id>
-      <properties>
-        <sealJars>true</sealJars>
-        <skipTests>true</skipTests>
-      </properties>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.rat</groupId>
-            <artifactId>apache-rat-plugin</artifactId>
-            <executions>
-              <execution>
-                <goals>
-                  <goal>check</goal>
-                </goals>
-                <phase>verify</phase>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
   </profiles>
 </project>



Mime
View raw message