Update version to 0.3.0-SNAPSHOT and fixes to signing/staging.
diff --git a/build.xml b/build.xml
index f4b184f..824e17d 100644
--- a/build.xml
+++ b/build.xml
@@ -24,7 +24,7 @@
<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="gateway-version" value="0.3.0-SNAPSHOT"/>
<property name="release-manager" value="kminder"/>
<property name="gateway-home" value="${gateway-artifact}-${gateway-version}"/>
@@ -47,7 +47,7 @@
</target>
<target name="clean" depends="init" description="Clean up any build artifacts.">
- <delete file="target/${gateway-version}"/>
+ <delete file="target/dist/${gateway-version}"/>
</target>
<target name="build" depends="init" description="Build the product.">
@@ -58,7 +58,7 @@
</target>
<target name="verify" depends="package" description="Perform the verification build."/>
- <target name="package" depends="init" description="Build and package the product.">
+ <target name="package" depends="init" description="Build and package the product (aka verify).">
<exec executable="${mvn.cmd}">
<arg value="-Prelease"/>
<arg value="clean"/>
@@ -66,7 +66,8 @@
</exec>
</target>
- <target name="daily" depends="init" description="Perform the daily build.">
+ <target name="daily" depends="package" description="Perform the daily build."/>
+ <target name="full" depends="init" description="Perform a full build (aka daily).">
<exec executable="${mvn.cmd}">
<arg value="-Panalyze"/>
<arg value="-Prelease"/>
@@ -103,23 +104,23 @@
-->
<target name="sign" depends="init" description="Sign a previously created release.">
- <exec executable="gpg" dir="target">
+ <exec executable="gpg" dir="target/dist">
<arg value="--armor"/>
<arg value="--detach-sig"/>
<arg value="${gateway-artifact}-${gateway-version}.zip"/>
</exec>
- <exec executable="gpg" dir="target">
+ <exec executable="gpg" dir="target/dist">
<arg value="--armor"/>
<arg value="--detach-sig"/>
<arg value="${gateway-artifact}-${gateway-version}-src.zip"/>
</exec>
- <exec executable="gpg" dir="target">
+ <exec executable="gpg" dir="target/dist">
<arg value="--export"/>
<arg value="--armor"/>
<arg value="--output"/>
<arg value="KEYS"/>
</exec>
- <checksum file="target/${gateway-artifact}-${gateway-version}-src.zip" algorithm="SHA1" property="checksum" />
+ <checksum file="target/dist/${gateway-artifact}-${gateway-version}-src.zip" algorithm="SHA1" property="checksum" />
<copy file="src/vote.txt" tofile="target/vote.txt">
<filterchain>
<expandproperties/>
@@ -138,7 +139,7 @@
<arg value="clean"/>
</exec>
<mkdir dir="gateway-site/target/site"/>
- <exec executable="${svn.cmd}" dir="gateway-site/target">
+ <exec executable="${svn.cmd}" dir="gateway-site/target/dist">
<arg value="checkout"/>
<arg value="https://svn.apache.org/repos/asf/incubator/knox/site"/>
</exec>
diff --git a/gateway-demo/pom.xml b/gateway-demo/pom.xml
index 65ba113..c3c068c 100644
--- a/gateway-demo/pom.xml
+++ b/gateway-demo/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-demo</artifactId>
diff --git a/gateway-i18n-logging-log4j/pom.xml b/gateway-i18n-logging-log4j/pom.xml
index b430faf..0d11c18 100644
--- a/gateway-i18n-logging-log4j/pom.xml
+++ b/gateway-i18n-logging-log4j/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-i18n-logging-log4j</artifactId>
diff --git a/gateway-i18n-logging-sl4j/pom.xml b/gateway-i18n-logging-sl4j/pom.xml
index 2c0be1f..5a021aa 100644
--- a/gateway-i18n-logging-sl4j/pom.xml
+++ b/gateway-i18n-logging-sl4j/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-i18n-logging-sl4j</artifactId>
diff --git a/gateway-i18n/pom.xml b/gateway-i18n/pom.xml
index 44213b5..2b0b43f 100644
--- a/gateway-i18n/pom.xml
+++ b/gateway-i18n/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-i18n</artifactId>
diff --git a/gateway-provider-hostmap-static/pom.xml b/gateway-provider-hostmap-static/pom.xml
index 1d41015..612d013 100644
--- a/gateway-provider-hostmap-static/pom.xml
+++ b/gateway-provider-hostmap-static/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-provider-hostmap-static</artifactId>
diff --git a/gateway-provider-identity-assertion-pseudo/pom.xml b/gateway-provider-identity-assertion-pseudo/pom.xml
index 4e7d839..6e83bb9 100644
--- a/gateway-provider-identity-assertion-pseudo/pom.xml
+++ b/gateway-provider-identity-assertion-pseudo/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-provider-identity-assertion-pseudo</artifactId>
diff --git a/gateway-provider-rewrite/pom.xml b/gateway-provider-rewrite/pom.xml
index 56f3acd..96108d4 100644
--- a/gateway-provider-rewrite/pom.xml
+++ b/gateway-provider-rewrite/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-provider-rewrite</artifactId>
diff --git a/gateway-provider-secure-query/pom.xml b/gateway-provider-secure-query/pom.xml
index 38eabd3..829e719 100644
--- a/gateway-provider-secure-query/pom.xml
+++ b/gateway-provider-secure-query/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>gateway</artifactId>
<groupId>org.apache.hadoop</groupId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-provider-secure-query</artifactId>
diff --git a/gateway-provider-security-jwt/pom.xml b/gateway-provider-security-jwt/pom.xml
index 9a15a04..e1d2d31 100644
--- a/gateway-provider-security-jwt/pom.xml
+++ b/gateway-provider-security-jwt/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-provider-security-jwt</artifactId>
diff --git a/gateway-provider-security-shiro/pom.xml b/gateway-provider-security-shiro/pom.xml
index ce8260a..3a49f41 100644
--- a/gateway-provider-security-shiro/pom.xml
+++ b/gateway-provider-security-shiro/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-provider-security-shiro</artifactId>
diff --git a/gateway-release/home/CHANGES b/gateway-release/home/CHANGES
index 40a6ddc..9fdb658 100644
--- a/gateway-release/home/CHANGES
+++ b/gateway-release/home/CHANGES
@@ -1,4 +1,8 @@
------------------------------------------------------------------------------
+Changes v0.2.0 - v0.3.0
+------------------------------------------------------------------------------
+
+------------------------------------------------------------------------------
Changes v0.1.0 - v0.2.0
------------------------------------------------------------------------------
HTTPS Support (Client side)
diff --git a/gateway-release/pom.xml b/gateway-release/pom.xml
index 7289778..f406343 100644
--- a/gateway-release/pom.xml
+++ b/gateway-release/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-release</artifactId>
@@ -53,7 +53,7 @@
<goals><goal>single</goal></goals>
<configuration>
<finalName>${gateway-artifact}-${gateway-version}</finalName>
- <outputDirectory>../target</outputDirectory>
+ <outputDirectory>../target/dist</outputDirectory>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/assembly.xml</descriptor>
@@ -71,13 +71,13 @@
<configuration>
<tasks>
<checksum algorithm="MD5" fileext=".md5">
- <fileset dir="../target">
+ <fileset dir="../target/dist">
<include name="*.zip" />
<include name="*.tar.gz" />
</fileset>
</checksum>
<checksum algorithm="SHA1" fileext=".sha">
- <fileset dir="../target">
+ <fileset dir="../target/dist">
<include name="*.zip" />
<include name="*.tar.gz" />
</fileset>
diff --git a/gateway-server-launcher/pom.xml b/gateway-server-launcher/pom.xml
index 1646e1c..acaa145 100644
--- a/gateway-server-launcher/pom.xml
+++ b/gateway-server-launcher/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>gateway</artifactId>
<groupId>org.apache.hadoop</groupId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-server-launcher</artifactId>
diff --git a/gateway-server/pom.xml b/gateway-server/pom.xml
index f182daf..877c9ed 100644
--- a/gateway-server/pom.xml
+++ b/gateway-server/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-server</artifactId>
diff --git a/gateway-service-hdfs/pom.xml b/gateway-service-hdfs/pom.xml
index 1177c03..a273a34 100644
--- a/gateway-service-hdfs/pom.xml
+++ b/gateway-service-hdfs/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-service-hdfs</artifactId>
diff --git a/gateway-service-oozie/pom.xml b/gateway-service-oozie/pom.xml
index 70db05a..cb9a981 100644
--- a/gateway-service-oozie/pom.xml
+++ b/gateway-service-oozie/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>gateway</artifactId>
<groupId>org.apache.hadoop</groupId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-service-oozie</artifactId>
diff --git a/gateway-service-templeton/pom.xml b/gateway-service-templeton/pom.xml
index 217ed66..7ef4953 100644
--- a/gateway-service-templeton/pom.xml
+++ b/gateway-service-templeton/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-service-templeton</artifactId>
diff --git a/gateway-shell-launcher/pom.xml b/gateway-shell-launcher/pom.xml
index d056e93..2851dac 100644
--- a/gateway-shell-launcher/pom.xml
+++ b/gateway-shell-launcher/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>gateway</artifactId>
<groupId>org.apache.hadoop</groupId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-shell-launcher</artifactId>
diff --git a/gateway-shell/pom.xml b/gateway-shell/pom.xml
index 3ee8493..f586cc7 100644
--- a/gateway-shell/pom.xml
+++ b/gateway-shell/pom.xml
@@ -23,12 +23,10 @@
<parent>
<artifactId>gateway</artifactId>
<groupId>org.apache.hadoop</groupId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
- <groupId>org.apache.hadoop</groupId>
<artifactId>gateway-shell</artifactId>
- <version>0.2.0-SNAPSHOT</version>
<dependencies>
<dependency>
diff --git a/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/hdfs/Example.groovy b/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/hdfs/Example.groovy
index 23eec1c..671d8ad 100644
--- a/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/hdfs/Example.groovy
+++ b/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/hdfs/Example.groovy
@@ -24,9 +24,9 @@
gateway = "https://localhost:8443/gateway/sample"
username = "mapred"
password = "mapred-password"
-jarFile = "/Users/kevin.minder/Projects/gateway-0.2.0-SNAPSHOT/hadoop-examples.jar"
-inputFile = "/Users/kevin.minder/Projects/gateway-0.2.0-SNAPSHOT/LICENSE"
-outputFile = "/Users/kevin.minder/Projects/gateway-0.2.0-SNAPSHOT/OUTPUT"
+jarFile = "samples/hadoop-examples.jar"
+inputFile = "LICENSE"
+outputFile = "OUTPUT"
hadoop = Hadoop.login( gateway, username, password )
diff --git a/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/job/ExampleHive.groovy b/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/job/ExampleHive.groovy
index 8f09906..066cee3 100644
--- a/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/job/ExampleHive.groovy
+++ b/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/job/ExampleHive.groovy
@@ -26,7 +26,7 @@
gateway = "https://localhost:8443/gateway/sample"
username = "mapred"
password = "mapred-password"
-inputFile = "/Users/kevin.minder/Projects/gateway-0.2.0-SNAPSHOT/LICENSE"
+inputFile = "LICENSE"
script = "select+*+from+pokes;"
diff --git a/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/job/ExampleJava.groovy b/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/job/ExampleJava.groovy
index 6681fa1..a9dfcad 100644
--- a/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/job/ExampleJava.groovy
+++ b/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/job/ExampleJava.groovy
@@ -26,8 +26,8 @@
gateway = "https://localhost:8443/gateway/sample"
username = "mapred"
password = "mapred-password"
-inputFile = "/Users/kevin.minder/Projects/gateway-0.2.0-SNAPSHOT/LICENSE"
-jarFile = "/Users/kevin.minder/Projects/gateway-0.2.0-SNAPSHOT/hadoop-examples.jar"
+inputFile = "LICENSE"
+jarFile = "samples/hadoop-examples.jar"
hadoop = Hadoop.login( gateway, username, password )
diff --git a/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/job/ExamplePig.groovy b/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/job/ExamplePig.groovy
index 734208a..1118422 100644
--- a/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/job/ExamplePig.groovy
+++ b/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/job/ExamplePig.groovy
@@ -26,7 +26,7 @@
gateway = "https://localhost:8443/gateway/sample"
username = "mapred"
password = "mapred-password"
-inputFile = "/Users/kevin.minder/Projects/gateway-0.2.0-SNAPSHOT/LICENSE"
+inputFile = "LICENSE"
script = """\
A = load '/tmp/test/input/FILE' using PigStorage(':');
diff --git a/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/workflow/Example.groovy b/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/workflow/Example.groovy
index 16a698f..c67e8e4 100644
--- a/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/workflow/Example.groovy
+++ b/gateway-shell/src/main/java/org/apache/hadoop/gateway/shell/workflow/Example.groovy
@@ -28,8 +28,8 @@
nameNode = "sandbox:8020";
username = "mapred"
password = "mapred-password"
-inputFile = "/Users/kevin.minder/Projects/gateway-0.2.0-SNAPSHOT/LICENSE"
-jarFile = "/Users/kevin.minder/Projects/gateway-0.2.0-SNAPSHOT/hadoop-examples.jar"
+inputFile = "LICENSE"
+jarFile = "samples/hadoop-examples.jar"
definition = """\
<workflow-app xmlns="uri:oozie:workflow:0.2" name="wordcount-workflow">
diff --git a/gateway-spi/pom.xml b/gateway-spi/pom.xml
index 24e48c9..655041b 100644
--- a/gateway-spi/pom.xml
+++ b/gateway-spi/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-spi</artifactId>
diff --git a/gateway-test-ldap-launcher/pom.xml b/gateway-test-ldap-launcher/pom.xml
index d82af93..517dcb5 100644
--- a/gateway-test-ldap-launcher/pom.xml
+++ b/gateway-test-ldap-launcher/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>gateway</artifactId>
<groupId>org.apache.hadoop</groupId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-test-ldap-launcher</artifactId>
diff --git a/gateway-test-ldap/pom.xml b/gateway-test-ldap/pom.xml
index 6456b14..d554a55 100644
--- a/gateway-test-ldap/pom.xml
+++ b/gateway-test-ldap/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-test-ldap</artifactId>
diff --git a/gateway-test-utils/pom.xml b/gateway-test-utils/pom.xml
index 20a5c96..392a7a8 100644
--- a/gateway-test-utils/pom.xml
+++ b/gateway-test-utils/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-test-utils</artifactId>
diff --git a/gateway-test/pom.xml b/gateway-test/pom.xml
index 60bda95..1fa55f1 100644
--- a/gateway-test/pom.xml
+++ b/gateway-test/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>gateway</artifactId>
<groupId>org.apache.hadoop</groupId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-test</artifactId>
diff --git a/gateway-util-common/pom.xml b/gateway-util-common/pom.xml
index 74768d1..4decd49 100644
--- a/gateway-util-common/pom.xml
+++ b/gateway-util-common/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-util-common</artifactId>
diff --git a/gateway-util-launcher/pom.xml b/gateway-util-launcher/pom.xml
index 3e142e9..2745ce0 100644
--- a/gateway-util-launcher/pom.xml
+++ b/gateway-util-launcher/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>gateway</artifactId>
<groupId>org.apache.hadoop</groupId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-util-launcher</artifactId>
diff --git a/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Command.java b/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Command.java
index a0c4615..10d3f8b 100644
--- a/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Command.java
+++ b/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Command.java
@@ -36,6 +36,7 @@
private static String MAIN_METHOD = "main.method";
private static String MAIN_ARGS = "main.args";
private static String CLASS_PATH = "class.path";
+ private static String CLASS_PATH_DELIM = ",;";
private static String FORK = "fork";
private static String REDIRECT = "redirect";
private static String RESTREAM = "restream";
@@ -113,7 +114,7 @@
private static List<URL> loadClassPath( File base, String classPath ) throws MalformedURLException {
List<URL> urls = new ArrayList<URL>();
- StringTokenizer parser = new StringTokenizer( classPath, ";", false );
+ StringTokenizer parser = new StringTokenizer( classPath, CLASS_PATH_DELIM, false );
while( parser.hasMoreTokens() ) {
String libPath = parser.nextToken().trim();
File libFile = new File( base, libPath );
diff --git a/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Config.java b/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Config.java
new file mode 100644
index 0000000..cc74c4c
--- /dev/null
+++ b/gateway-util-launcher/src/main/java/org/apache/hadoop/gateway/launcher/Config.java
@@ -0,0 +1,149 @@
+/**
+ * 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.launcher;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.Reader;
+import java.io.Writer;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class Config {
+
+ static String DEFAULT_NAME = "";
+ static String COMMENT_PREFIX = "#";
+ static String SECTION_PREFIX = "[";
+ static String SECTION_SUFFIX = "]";
+ static Pattern SECTION_PATTERN = Pattern.compile( "^\\[(.*?)\\]?$" );
+ static Pattern PAIR_PATTERN = Pattern.compile( "^(.*?)=(.*)$" );
+
+ Map<String,Map<String,String>> sections;
+
+ public Config() {
+ sections = new LinkedHashMap<String,Map<String,String>>();
+ }
+
+ public void load( Reader reader ) throws IOException {
+ if( reader != null ) {
+ BufferedReader input = new BufferedReader( reader );
+ String profile = null;
+ String line = input.readLine();
+ while( line != null ) {
+ line = line.trim();
+ if( line.length() == 0 ) {
+ // Ignore blank lines.
+ } else if( line.startsWith( COMMENT_PREFIX ) ) {
+ // Ignore comments.
+ } else if( line.startsWith( SECTION_PREFIX ) ) {
+ // Switch sections.
+ Matcher matcher = SECTION_PATTERN.matcher( line );
+ if( matcher.matches() ) {
+ profile = matcher.group( 1 );
+ }
+ } else {
+ // Consume line.
+ Matcher matcher = PAIR_PATTERN.matcher( line );
+ if( matcher.matches() ) {
+ if( matcher.groupCount() > 0 ) {
+ String name = matcher.group( 1 );
+ String value = null;
+ if( matcher.groupCount() > 1 ) {
+ value = matcher.group( 2 );
+ }
+ set( profile, name, value );
+ }
+ }
+ }
+ line = input.readLine();
+ }
+ }
+ }
+
+ public void save( Writer writer ) {
+ boolean empty = true;
+ if( writer != null ) {
+ PrintWriter output = new PrintWriter( writer );
+ Map<String,String> map = sections.get( DEFAULT_NAME );
+ if( map != null ) {
+ empty &= ( map.size() == 0 );
+ saveMap( output, map );
+ }
+ for( Map.Entry<String,Map<String,String>> entry : sections.entrySet() ) {
+ if( !empty ) {
+ output.println();
+ }
+ String section = entry.getKey();
+ if( section != null && !section.equals( DEFAULT_NAME ) ) {
+ map = sections.get( section );
+ output.print( SECTION_PREFIX );
+ output.print( section );
+ output.println( SECTION_SUFFIX );
+ empty = false;
+ saveMap( output, map );
+ }
+ }
+ }
+ }
+
+ void saveMap( PrintWriter output, Map<String,String> map ) {
+ for( Map.Entry<String,String> entry : map.entrySet() ) {
+ output.print( entry.getKey() );
+ output.print( "=" );
+ String value = entry.getValue();
+ if( value != null ) {
+ output.print( entry.getValue() );
+ }
+ }
+ }
+
+ public String get( String section, String name ) {
+ section = fixName( section );
+ name = fixName( name );
+ String value = null;
+ Map<String,String> map = sections.get( section );
+ if( map != null && map.containsKey( name ) ) {
+ value = map.get( name );
+ } else {
+ map = sections.get( DEFAULT_NAME );
+ if( map != null ) {
+ value = map.get( name );
+ }
+ }
+ return value;
+ }
+
+ public void set( String section, String name, String value ) {
+ section = fixName( section );
+ name = fixName( name );
+ Map<String,String> map = sections.get( section );
+ if( map == null ) {
+ map = new LinkedHashMap<String, String>();
+ sections.put( section, map );
+ }
+ map.put( name, value );
+ }
+
+ private static String fixName( String name ) {
+ return( name == null ? DEFAULT_NAME : name.trim() );
+ }
+
+}
diff --git a/gateway-util-launcher/src/test/java/org/apache/hadoop/gateway/launcher/ConfigTest.java b/gateway-util-launcher/src/test/java/org/apache/hadoop/gateway/launcher/ConfigTest.java
new file mode 100644
index 0000000..7068308
--- /dev/null
+++ b/gateway-util-launcher/src/test/java/org/apache/hadoop/gateway/launcher/ConfigTest.java
@@ -0,0 +1,114 @@
+/**
+ * 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.launcher;
+
+import org.junit.Test;
+
+import java.io.StringReader;
+import java.io.StringWriter;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class ConfigTest {
+
+ @Test
+ public void testLoad() throws Exception {
+ Config c;
+ String s;
+
+ c = new Config();
+ c.load( null );
+
+ c = new Config();
+ s = "";
+ c.load( new StringReader( s ) );
+ assertThat( c.get( null, null ), nullValue() );
+
+ c = new Config();
+ s = "name=value";
+ c.load( new StringReader( s ) );
+ assertThat( c.get( null, "name" ), is( "value" ) );
+ assertThat( c.get( null, "wrong-name" ), nullValue() );
+
+ s = "name1=value1\n\n[section1]\nname1=value2";
+ c = new Config();
+ c.load( new StringReader( s ) );
+ assertThat( c.get( "", "name1" ), is( "value1" ) );
+ assertThat( c.get( "", "name2" ), nullValue() );
+ assertThat( c.get( "section1", "name1" ), is( "value2" ) );
+ assertThat( c.get( "section1", "name2" ), nullValue() );
+ }
+
+ @Test
+ public void testSave() throws Exception {
+ Config c = null;
+ StringWriter w = null;
+
+ c = new Config();
+ c.save( null );
+
+ c = new Config();
+ w = new StringWriter();
+ c.save( w );
+ assertThat( w.toString(), is( "" ) );
+
+ c = new Config();
+ c.set( null, null, null );
+ w = new StringWriter();
+ c.save( w );
+ assertThat( w.toString(), is( "=\n" ) );
+
+ c = new Config();
+ c.set( null, "name1", "value1" );
+ c.set( "section1", "name1", "value2" );
+ w = new StringWriter();
+ c.save( w );
+ assertThat( w.toString(), is( "name1=value1\n\n[section1]\nname1=value2" ) );
+ }
+
+ @Test
+ public void testSetGet() throws Exception {
+ Config c;
+
+ c = new Config();
+
+ c.set( null, null, "value" );
+ assertThat( c.get( null, null ), is( "value" ) );
+ assertThat( c.get( "", null ), is( "value" ) );
+ assertThat( c.get( null, "" ), is( "value" ) );
+ assertThat( c.get( "", "" ), is( "value" ) );
+
+ c = new Config();
+ assertThat( c.get( null, "name" ), nullValue() );
+ c.set( null, "name", null );
+ assertThat( c.get( null, "name" ), nullValue() );
+ c.set( null, "name", "value1" );
+ assertThat( c.get( null, "name" ), is( "value1" ) );
+ assertThat( c.get( "section1", "name" ), is( "value1" ) );
+ c.set( "section1", "name", null );
+ assertThat( c.get( null, "name" ), is( "value1" ) );
+ assertThat( c.get( "section1", "name" ), nullValue() );
+ c.set( "section1", "name", "value2" );
+ assertThat( c.get( null, "name" ), is( "value1" ) );
+ assertThat( c.get( "section1", "name" ), is( "value2" ) );
+ assertThat( c.get( "section2", "name" ), is( "value1" ) );
+ }
+
+}
diff --git a/gateway-util-urltemplate/pom.xml b/gateway-util-urltemplate/pom.xml
index d4d1d82..4a9faaf 100644
--- a/gateway-util-urltemplate/pom.xml
+++ b/gateway-util-urltemplate/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
</parent>
<artifactId>gateway-util-urltemplate</artifactId>
diff --git a/pom.xml b/pom.xml
index 558396a..d943679 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.hadoop</groupId>
<artifactId>gateway</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>gateway</name>
@@ -63,7 +63,7 @@
<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-version>0.3.0-SNAPSHOT</gateway-version>
<gateway-group>org.apache.hadoop</gateway-group>
</properties>
@@ -112,6 +112,7 @@
<goals><goal>single</goal></goals>
<configuration>
<finalName>${gateway-artifact}-${gateway-version}</finalName>
+ <outputDirectory>target/dist</outputDirectory>
<descriptors>
<descriptor>src/assembly.xml</descriptor>
</descriptors>
diff --git a/src/stage.txt b/src/stage.txt
index 9dd2206..a714b66 100644
--- a/src/stage.txt
+++ b/src/stage.txt
@@ -1,10 +1,10 @@
The release candidate has been prepared in:
- target
+ target/dist
Please stage it to people.apache.org like this:
- scp -r target people.apache.org:public_html/${gateway-project}/
+ scp -r target ${release-manager}:people.apache.org:public_html/${gateway-project}/${gateway-version}
A release vote template has been generated here:
diff --git a/src/vote.txt b/src/vote.txt
index 736406c..6dcd44d 100644
--- a/src/vote.txt
+++ b/src/vote.txt
@@ -1,5 +1,5 @@
From: ${release-manager}@apache.org
-To: dev@${gateway-project}.apache.org
+To: dev@${gateway-project}.incubator.apache.org
Subject: [VOTE] Release ${gateway-name} ${gateway-version}
A candidate for the ${gateway-name} ${gateway-version} release is available at:
@@ -8,7 +8,8 @@
The release candidate is a zip archive of the sources in:
-http://svn.apache.org/repos/asf/${gateway-project}/tags/${gateway-version}/
+https://git-wip-us.apache.org/repos/asf/incubator-knox.git
+Branch v${gateway-version}/
The SHA1 checksum of the archive is ${checksum}.