You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jh...@apache.org on 2014/09/05 09:18:49 UTC

git commit: [OPTIQ-384] Add "apache-" prefix to tarball and directory within tarball

Repository: incubator-optiq
Updated Branches:
  refs/heads/master c3bf95bb5 -> d63f5d561


[OPTIQ-384] Add "apache-" prefix to tarball and directory within tarball


Project: http://git-wip-us.apache.org/repos/asf/incubator-optiq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-optiq/commit/d63f5d56
Tree: http://git-wip-us.apache.org/repos/asf/incubator-optiq/tree/d63f5d56
Diff: http://git-wip-us.apache.org/repos/asf/incubator-optiq/diff/d63f5d56

Branch: refs/heads/master
Commit: d63f5d561b99740238b09dcf7587cf81185152c0
Parents: c3bf95b
Author: Julian Hyde <jh...@apache.org>
Authored: Thu Sep 4 23:39:07 2014 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Thu Sep 4 23:39:07 2014 -0700

----------------------------------------------------------------------
 doc/HOWTO.md                                   |  50 ++++++----
 pom.xml                                        |  46 +++++++++
 src/main/config/assemblies/source-assembly.xml | 103 ++++++++++++++++++++
 3 files changed, 180 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/d63f5d56/doc/HOWTO.md
----------------------------------------------------------------------
diff --git a/doc/HOWTO.md b/doc/HOWTO.md
index c703c50..2ad43be 100644
--- a/doc/HOWTO.md
+++ b/doc/HOWTO.md
@@ -321,7 +321,7 @@ read GPG_PASSPHRASE
 git clean -xn
 
 # Set the version numbers
-mvn -DskipTests -DreleaseVersion=x.y.z-incubating -DdevelopmentVersion=x.y.z+1-incubating-SNAPSHOT -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" clean release:prepare 2>&1 | tee /tmp/prepare.log
+mvn -DskipTests -DreleaseVersion=X.Y.Z-incubating -DdevelopmentVersion=X.Y.Z+1-incubating-SNAPSHOT -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" clean release:prepare 2>&1 | tee /tmp/prepare.log
 
 # Perform the release
 mvn -DskipTests -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" clean release:prepare 2>&1 | tee /tmp/perform.log
@@ -332,29 +332,42 @@ If any of the above steps fail, clean up (see below), fix the problem,
 and start again from the top.
 
 Check the artifacts:
-* Make sure that the source distro (currently there is no binary
-  distro) has a README file (README.md does not count) and that the
-  version in the README is correct
-* The file name must start `optiq-` and include `incubating`.
+* In the `target` directory should be these 8 files, among others:
+  * apache-optiq-X.Y.Z-incubating-src.tar.gz
+  * apache-optiq-X.Y.Z-incubating-src.tar.gz.asc
+  * apache-optiq-X.Y.Z-incubating-src.tar.gz.md5
+  * apache-optiq-X.Y.Z-incubating-src.tar.gz.sha1
+  * apache-optiq-X.Y.Z-incubating-src.zip
+  * apache-optiq-X.Y.Z-incubating-src.zip.asc
+  * apache-optiq-X.Y.Z-incubating-src.zip.md5
+  * apache-optiq-X.Y.Z-incubating-src.zip.sha1
+* Note that the file names start `apache-optiq-` and include
+  `incubating` in the version.
+* In the two source distros `.tar.gz` and `.zip` (currently there is
+  no binary distro), check that all files belong to a directory called
+  `apache-optiq-X.Y.Z-incubating-src`.
+* That directory must contain files `NOTICE`, `LICENSE`, `README`,
+  `README.md`, `git.properties`
+  * Check that  the version in `README` is correct
+  * Check that `git.properties` is current
+* In each .jar (for example
+  `core/target/optiq-core-X.Y.Z-incubating.jar` and
+  `mongodb/target/optiq-mongodb-X.Y.Z-incubating-sources.jar`), check
+  that the `META-INF` directory contains `DEPENDENCIES`, `LICENSE`,
+  `NOTICE` and `git.properties`
 * Check PGP, per https://httpd.apache.org/dev/verification.html
 
 Upload the artifacts to a staging area (in this case, your
 people.apache.org home directory):
 
 ```bash
-# Generate checksum files
-cd target
-for i in *.zip; do
-  gpg --print-md SHA512 $i > $i.sha
-  gpg --print-md MD5 $i > $i.md5
-done
-
 # Move the files into a directory
-mkdir optiq-x.y.z-incubating
-mv optiq-* optiq-x.y.z-incubating
+cd target
+mkdir apache-optiq-X.Y.Z-incubating-rcN
+mv apache-optiq-* optiq-X.Y.Z-incubating-rcN
 
 # Upload to staging area (your people.apache.org home directory)
-scp -rp apache-optiq-x.y.z-incubating people.apache.org:public_html
+scp -rp apache-optiq-X.Y.Z-incubating-rcN people.apache.org:public_html
 ```
 
 ## Cleaning up after a failed release attempt (for Optiq committers)
@@ -365,8 +378,8 @@ scp -rp apache-optiq-x.y.z-incubating people.apache.org:public_html
 git tag
 
 # If the tag exists, delete it locally and remotely
-git tag -d optiq-x.y.z-incubating
-git push origin :refs/tags/optiq-x.y.z-incubating
+git tag -d optiq-X.Y.Z-incubating
+git push origin :refs/tags/optiq-X.Y.Z-incubating
 
 # Remove modified files
 mvn release:clean
@@ -419,8 +432,7 @@ function checkHash() {
     fi
   done
 }
-checkHash optiq-x.y.z-incubating
-
+checkHash optiq-X.Y.Z-incubating
 ```
 
 ## Get approval for a release via Apache voting process (for Optiq committers)

http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/d63f5d56/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ef451b9..595af1a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -375,6 +375,11 @@ limitations under the License.
           <version>0.2</version>
         </plugin>
         <plugin>
+          <groupId>net.ju-n.maven.plugins</groupId>
+          <artifactId>checksum-maven-plugin</artifactId>
+          <version>1.2</version>
+        </plugin>
+        <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-checkstyle-plugin</artifactId>
           <version>2.12.1</version>
@@ -466,6 +471,8 @@ limitations under the License.
 
   <profiles>
     <profile>
+      <!-- This profile adds/overrides few features of the 'apache-release'
+           profile in the parent pom. -->
       <id>apache-release</id>
       <build>
         <plugins>
@@ -492,6 +499,45 @@ limitations under the License.
               </execution>
             </executions>
           </plugin>
+          <plugin>
+            <groupId>net.ju-n.maven.plugins</groupId>
+            <artifactId>checksum-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>artifacts</goal>
+                </goals>
+              </execution>
+            </executions>
+            <configuration>
+              <algorithms>
+                <algorithm>MD5</algorithm>
+                <algorithm>SHA-1</algorithm>
+              </algorithms>
+              <failOnError>false</failOnError>
+            </configuration>
+          </plugin>
+          <!-- Override the parent assembly execution to customize the assembly
+               descriptor and final name. -->
+          <plugin>
+            <artifactId>maven-assembly-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>source-release-assembly</id>
+                <phase>package</phase>
+                <goals>
+                  <goal>single</goal>
+                </goals>
+                <configuration>
+                  <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
+                  <appendAssemblyId>false</appendAssemblyId>
+                  <descriptor>src/main/config/assemblies/source-assembly.xml</descriptor>
+                  <finalName>apache-optiq-${project.version}-src</finalName>
+                  <tarLongFileMode>gnu</tarLongFileMode>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
         </plugins>
       </build>
     </profile>

http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/d63f5d56/src/main/config/assemblies/source-assembly.xml
----------------------------------------------------------------------
diff --git a/src/main/config/assemblies/source-assembly.xml b/src/main/config/assemblies/source-assembly.xml
new file mode 100644
index 0000000..2b1f930
--- /dev/null
+++ b/src/main/config/assemblies/source-assembly.xml
@@ -0,0 +1,103 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+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>
+  <id>source-release</id>
+  <formats>
+    <format>zip</format>
+    <format>tar.gz</format>
+  </formats>
+  <fileSets>
+    <!-- main project directory structure -->
+    <fileSet>
+      <directory>.</directory>
+      <outputDirectory>/</outputDirectory>
+      <useDefaultExcludes>true</useDefaultExcludes>
+      <excludes>
+        <!-- build output -->
+        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*]
+        </exclude>
+
+        <!-- NOTE: Most of the following excludes should not be required
+          if the standard release process is followed. This is because the release
+          plugin checks out project sources into a location like target/checkout, then
+          runs the build from there. The result is a source-release archive that comes
+          from a pretty clean directory structure. HOWEVER, if the release plugin is
+          configured to run extra goals or generate a project website, it's definitely
+          possible that some of these files will be present. So, it's safer to exclude
+          them. -->
+
+        <!-- IDEs -->
+        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml]
+        </exclude>
+        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project]
+        </exclude>
+        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath]
+        </exclude>
+        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws]
+        </exclude>
+        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.idea(/.*)?]
+        </exclude>
+        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?out(/.*)?]
+        </exclude>
+        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr]
+        </exclude>
+        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]
+        </exclude>
+        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?]
+        </exclude>
+        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?]
+        </exclude>
+        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?]
+        </exclude>
+        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?]
+        </exclude>
+
+
+        <!-- scm -->
+        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.gitignore(/.*)?]
+        </exclude>
+
+        <exclude>**/.buildpath</exclude>
+        <exclude>**/sandbox/**</exclude>
+
+        <!-- misc -->
+        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?cobertura\.ser]
+        </exclude>
+
+        <!-- release-plugin temp files -->
+        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]
+        </exclude>
+        <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties]
+        </exclude>
+      </excludes>
+    </fileSet>
+    <!-- LICENSE, NOTICE, DEPENDENCIES, git.properties, etc. calculated at build time -->
+    <fileSet>
+      <directory>${project.build.directory}/maven-shared-archive-resources/META-INF
+      </directory>
+      <outputDirectory>/</outputDirectory>
+    </fileSet>
+    <fileSet>
+      <directory>${project.build.directory}</directory>
+      <includes>
+        <include>git.properties</include>
+      </includes>
+      <outputDirectory>/</outputDirectory>
+    </fileSet>
+  </fileSets>
+</assembly>