You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by km...@apache.org on 2013/03/21 22:26:22 UTC

git commit: Updates to build.xml to support generating source distribution zip and and signing both the source and binary zips.

Updated Branches:
  refs/heads/master cad8683ab -> 777d48357


Updates to build.xml to support generating source distribution zip and and signing both the source and binary zips.


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

Branch: refs/heads/master
Commit: 777d4835710ab1857d47d96842c5c622757cac03
Parents: cad8683
Author: Kevin Minder <ke...@hortonworks.com>
Authored: Thu Mar 21 17:26:17 2013 -0400
Committer: Kevin Minder <ke...@hortonworks.com>
Committed: Thu Mar 21 17:26:17 2013 -0400

----------------------------------------------------------------------
 STAGE                                              |   11 ++
 VOTE                                               |   20 ++++
 assembly.xml                                       |   31 ++++++
 build.xml                                          |   77 ++++++++++++---
 .../federation/jwt/filter/JWTFederationFilter.java |   41 ++++----
 .../federation/jwt/filter/JWTProviderMessages.java |   22 +++-
 .../gateway/provider/federation/JWTTokenTest.java  |   20 ++++-
 pom.xml                                            |   70 ++++++++++----
 8 files changed, 232 insertions(+), 60 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/777d4835/STAGE
----------------------------------------------------------------------
diff --git a/STAGE b/STAGE
new file mode 100644
index 0000000..be2496c
--- /dev/null
+++ b/STAGE
@@ -0,0 +1,11 @@
+The release candidate has been prepared in:
+
+    target/${gateway-version}
+
+Please stage it to people.apache.org like this:
+
+    scp -r target/${gateway-version} people.apache.org:public_html/${gateway-project}/
+
+A release vote template has been generated here:
+
+    file://target/vote.txt

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/777d4835/VOTE
----------------------------------------------------------------------
diff --git a/VOTE b/VOTE
new file mode 100644
index 0000000..4d4ff51
--- /dev/null
+++ b/VOTE
@@ -0,0 +1,20 @@
+From: ${release-manager}@apache.org
+To: dev@${gateway-project}.apache.org
+Subject: [VOTE] Release ${gateway-name} ${gateway-version}
+
+A candidate for the ${gateway-name} ${gateway-version} release is available at:
+
+http://people.apache.org/~${release-manager}/${gateway-project}/${gateway-version}/
+
+The release candidate is a zip archive of the sources in:
+
+http://svn.apache.org/repos/asf/${gateway-project}/tags/${gateway-version}/
+
+The SHA1 checksum of the archive is ${checksum}.
+
+Please vote on releasing this package as ${gateway-name} ${gateay-version}.
+The vote is open for the next 72 hours and passes if a majority of at
+least three +1 ${project-name} PMC votes are cast.
+
+[ ] +1 Release this package as ${gateway-name} ${gateway-version}
+[ ] -1 Do not release this package because...${line.separator}

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/777d4835/assembly.xml
----------------------------------------------------------------------
diff --git a/assembly.xml b/assembly.xml
new file mode 100644
index 0000000..43f1180
--- /dev/null
+++ b/assembly.xml
@@ -0,0 +1,31 @@
+<!--
+ 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>src</id>
+  <formats>
+    <format>zip</format>
+  </formats>
+  <fileSets>
+    <fileSet>
+      <directory>${project.basedir}</directory>
+      <excludes>
+        <exclude>**/target/**</exclude>
+        <exclude>**/.*/**</exclude>
+      </excludes>
+    </fileSet>
+  </fileSets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/777d4835/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 7c414a7..03462b1 100644
--- a/build.xml
+++ b/build.xml
@@ -21,9 +21,13 @@
         Release build file for the Hadoop Gateway
     </description>
 
-    <property name="version" value="0.2.0-SNAPSHOT"/>
-    <property name="archive" value="target/gateway-${version}.zip"/>
-    <property name="gateway_home" value="gateway-${version}"/>
+    <property name="gateway-name" value="Apache Knox (Incubator)"/>
+    <property name="gateway-project" value="knox"/>
+    <property name="gateway-artifact" value="knox"/>
+    <property name="gateway-version" value="0.2.0-SNAPSHOT"/>
+    <property name="release-manager" value="kminder"/>
+
+    <property name="gateway-home" value="${gateway-artifact}-${gateway-version}"/>
 
     <condition property="mvn.cmd" value="mvn">
         <os family="unix" />
@@ -43,7 +47,7 @@
     </target>
 
     <target name="clean" depends="init" description="Clean up any build artifacts.">
-        <delete file="${archive}"/>
+        <delete file="target/${gateway-version}"/>
     </target>
 
     <target name="build" depends="init" description="Build the product.">
@@ -55,27 +59,74 @@
     </target>
 
     <target name="archive" depends="init" description="Create the release ZIP.">
-        <zip destfile="${archive}">
+        <zip destfile="target/${gateway-version}/${gateway-artifact}-${gateway-version}.zip">
             <zipfileset
                     dir="gateway-release"
                     includes="**/*"
                     excludes="src,target,*.xml,*.iml,*.md"
-                    prefix="${gateway_home}"/>
+                    prefix="${gateway-home}"/>
             <zipfileset
                     dir="gateway-test-ldap/target"
-                    includes="gateway-test-ldap-${version}.jar"
-                    fullpath="${gateway_home}/bin/ldap-${version}.jar"/>
+                    includes="gateway-test-ldap-${gateway-version}.jar"
+                    fullpath="${gateway-home}/bin/ldap-${gateway-version}.jar"/>
             <zipfileset
                     dir="gateway-release/target"
-                    includes="gateway-release-${version}.jar"
-                    fullpath="${gateway_home}/bin/gateway-${version}.jar"/>
+                    includes="gateway-release-${gateway-version}.jar"
+                    fullpath="${gateway-home}/bin/gateway-${gateway-version}.jar"/>
             <zipfileset
                     dir="gateway-shell/target"
-                    includes="gateway-shell-${version}.jar"
-                    fullpath="${gateway_home}/bin/shell-${version}.jar"/>
+                    includes="gateway-shell-${gateway-version}.jar"
+                    fullpath="${gateway-home}/bin/shell-${gateway-version}.jar"/>
         </zip>
     </target>
 
+    <target name="release" depends="init,clean,build,archive" description="Create the release."/>
+
+    <target name="sign" depends="init" description="Sign a previously created release.">
+        <checksum algorithm="MD5" fileext=".md5">
+            <fileset dir="target/${gateway-version}">
+                <include name="*.zip" />
+                <include name="*.jar" />
+                <include name="*.tar" />
+            </fileset>
+        </checksum>
+        <checksum algorithm="SHA1" fileext=".sha">
+            <fileset dir="target/${gateway-version}">
+                <include name="*.zip" />
+                <include name="*.jar" />
+                <include name="*.tar" />
+            </fileset>
+        </checksum>
+        <exec executable="gpg" dir="target/${gateway-version}">
+            <arg value="--armor"/>
+            <arg value="--detach-sig"/>
+            <arg value="${gateway-artifact}-${gateway-version}.zip"/>
+        </exec>
+        <exec executable="gpg" dir="target/${gateway-version}">
+            <arg value="--armor"/>
+            <arg value="--detach-sig"/>
+            <arg value="${gateway-artifact}-${gateway-version}-src.zip"/>
+        </exec>
+        <exec executable="gpg" dir="target/${gateway-version}">
+            <arg value="--export"/>
+            <arg value="--armor"/>
+            <arg value="--output"/>
+            <arg value="KEYS"/>
+        </exec>
+        <checksum file="target/${gateway-version}/${gateway-artifact}-${gateway-version}-src.zip" algorithm="SHA1" property="checksum" />
+        <copy file="VOTE" tofile="target/vote.txt">
+            <filterchain>
+                <expandproperties/>
+            </filterchain>
+        </copy>
+        <loadfile property="deploy-message" srcFile="DEPLOY">
+            <filterchain>
+                <expandproperties/>
+            </filterchain>
+        </loadfile>
+        <echo message="${deploy-message}"/>
+    </target>
+
     <target name="publish" description="Generate and publish the Apache web site.">
         <exec executable="${mvn.cmd}" dir="gateway-site">
             <arg value="clean"/>
@@ -104,6 +155,4 @@
         </exec>
     </target>
 
-    <target name="release" depends="init,clean,build,archive" description="Create the release."/>
-
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/777d4835/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTFederationFilter.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTFederationFilter.java b/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTFederationFilter.java
index be92b40..64d6a01 100644
--- a/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTFederationFilter.java
+++ b/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTFederationFilter.java
@@ -1,22 +1,25 @@
-  /**
-   * 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.
-   */
+/**
+ * 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.hadoop.gateway.provider.federation.jwt.filter;
 
+import org.apache.hadoop.gateway.services.GatewayServices;
+import org.apache.hadoop.gateway.services.security.CryptoService;
+
 import javax.security.auth.Subject;
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
@@ -26,10 +29,6 @@ import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-
-import org.apache.hadoop.gateway.services.GatewayServices;
-import org.apache.hadoop.gateway.services.security.CryptoService;
-
 import java.io.IOException;
 import java.security.Principal;
 import java.security.PrivilegedActionException;

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/777d4835/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTProviderMessages.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTProviderMessages.java b/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTProviderMessages.java
index af2eabe..8e58c42 100644
--- a/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTProviderMessages.java
+++ b/gateway-provider-security-jwt/src/main/java/org/apache/hadoop/gateway/provider/federation/jwt/filter/JWTProviderMessages.java
@@ -1,13 +1,25 @@
+/**
+ * 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.hadoop.gateway.provider.federation.jwt.filter;
 
-import org.apache.commons.cli.ParseException;
 import org.apache.hadoop.gateway.i18n.messages.Message;
 import org.apache.hadoop.gateway.i18n.messages.MessageLevel;
 import org.apache.hadoop.gateway.i18n.messages.Messages;
-import org.apache.hadoop.gateway.i18n.messages.StackTrace;
-
-import java.io.File;
-import java.net.URI;
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/777d4835/gateway-provider-security-jwt/src/test/java/org/apache/hadoop/gateway/provider/federation/JWTTokenTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-jwt/src/test/java/org/apache/hadoop/gateway/provider/federation/JWTTokenTest.java b/gateway-provider-security-jwt/src/test/java/org/apache/hadoop/gateway/provider/federation/JWTTokenTest.java
index bdc34a0..c651bd2 100644
--- a/gateway-provider-security-jwt/src/test/java/org/apache/hadoop/gateway/provider/federation/JWTTokenTest.java
+++ b/gateway-provider-security-jwt/src/test/java/org/apache/hadoop/gateway/provider/federation/JWTTokenTest.java
@@ -1,10 +1,26 @@
+/**
+ * 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.hadoop.gateway.provider.federation;
 
+import junit.framework.TestCase;
 import org.apache.hadoop.gateway.provider.federation.jwt.filter.JWTToken;
 import org.junit.Test;
 
-import junit.framework.TestCase;
-
 public class JWTTokenTest extends TestCase {
 
   private static final String JWT_TOKEN = "eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiAiZ2F0ZXdheSIsICJwcm4iOiAiam9obi5kb2VAZXhhbXBsZS5jb20iLCAiYXVkIjogImh0dHBzOi8vbG9naW4uZXhhbXBsZS5jb20iLCAiZXhwIjogIjEzNjMzNjA5MTMifQ.AUecCHfxT84-zllHs6_XvQuIx8186Y9s5waNOILVBoV11b4RINvknVDhIyR-j35LUn2ayQ9J2e1psey3-slWCs9B40_W-VeG5mPdtT6Job9c6ZX_eIgwSh-d88MlYoSXNt2oWcabMi6HmKeOxc6MfX__R4AMKdgXx5Jido5RRiw";

http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/777d4835/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 88f18f7..85d3784 100644
--- a/pom.xml
+++ b/pom.xml
@@ -68,9 +68,11 @@
     </modules>
 
     <properties>
-        <gateway-group>org.apache.hadoop</gateway-group>
-        <gateway-artifact>gateway</gateway-artifact>
+        <gateway-name>Apache Knox (Incubator)</gateway-name>
+        <gateway-project>knox</gateway-project>
+        <gateway-artifact>knox</gateway-artifact>
         <gateway-version>0.2.0-SNAPSHOT</gateway-version>
+        <gateway-group>org.apache.hadoop</gateway-group>
     </properties>
 
     <licenses>
@@ -135,28 +137,28 @@
             <build>
                 <plugins>
                     <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-javadoc-plugin</artifactId>
-                        <version>2.9</version>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <configuration>
+                            <outputDirectory>target/${pom.version}</outputDirectory>
+                            <finalName>${gateway-artifact}-${pom.version}</finalName>
+                        </configuration>
                         <executions>
                             <execution>
-                                <id>attach-javadocs</id>
+                                <id>src</id>
                                 <goals>
-                                    <goal>jar</goal>
+                                    <goal>single</goal>
                                 </goals>
+                                <phase>package</phase>
+                                <configuration>
+                                    <descriptors>
+                                        <descriptor>assembly.xml</descriptor>
+                                    </descriptors>
+                                </configuration>
                             </execution>
-                        </executions>
-                    </plugin>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-source-plugin</artifactId>
-                        <version>2.2.1</version>
-                        <executions>
                             <execution>
-                                <id>attach-sources</id>
-                                <goals>
-                                    <goal>jar</goal>
-                                </goals>
+                                <id>source-release-assembly</id>
+                                <configuration>
+                                </configuration>
                             </execution>
                         </executions>
                     </plugin>
@@ -184,6 +186,34 @@
                             </excludes>
                         </configuration>
                     </plugin>
+                    <!--
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-javadoc-plugin</artifactId>
+                        <version>2.9</version>
+                        <executions>
+                            <execution>
+                                <id>attach-javadocs</id>
+                                <goals>
+                                    <goal>jar</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-source-plugin</artifactId>
+                        <version>2.2.1</version>
+                        <executions>
+                            <execution>
+                                <id>attach-sources</id>
+                                <goals>
+                                    <goal>jar</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    -->
                 </plugins>
             </build>
         </profile>
@@ -219,6 +249,8 @@
                 <configuration>
                     <excludeSubProjects>false</excludeSubProjects>
                     <excludes>
+                        <exclude>VOTE</exclude>
+                        <exclude>DEPLOY</exclude>
                         <exclude>.git/**</exclude>
                         <exclude>.svn/**</exclude>
                         <exclude>.idea/**</exclude>
@@ -227,6 +259,8 @@
                         <exclude>**/target/**</exclude>
                         <exclude>**/test/resources/**</exclude>
                         <exclude>**/main/resources/**/*.json</exclude>
+                        <exclude>gateway-release/CHANGES</exclude>
+                        <exclude>gateway-release/ISSUES</exclude>
                     </excludes>
                 </configuration>
             </plugin>