You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by ma...@apache.org on 2017/08/09 17:09:41 UTC

[1/8] oodt git commit: Added maven-resource-plugin for example resource copying and CLI improvements

Repository: oodt
Updated Branches:
  refs/heads/feature/zookeeper-config 8b02792ae -> 1d70bd559


http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/examples/filemgr/oodt/elements.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/filemgr/oodt/elements.xml b/config/src/main/resources/examples/filemgr/oodt/elements.xml
deleted file mode 100755
index d56c44b..0000000
--- a/config/src/main/resources/examples/filemgr/oodt/elements.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?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.
--->
-<cas:elements xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
-<element id="urn:oodt:ProductId" name="CAS.ProductId">
-<dcElement>Identifier</dcElement>
-        <!--
-You can optionally specify a 'trim' tag to identify whether
-or not you want newlines trimmed from the element description. To
-turn off trimming (now done by default), include the following with your
-description definition: trim="false"
--->
-<description>
-A Product's unique identifier within the CAS namespace.
-</description>
-</element>
-<element id="urn:oodt:ProductName" name="CAS.ProductName">
-<dcElement>Title</dcElement>
-<description>
-A Product's name within the CAS namespace.
-</description>
-</element>
-<element id="urn:oodt:ProductReceivedTime"
-name="CAS.ProductReceivedTime">
-<dcElement />
-<description>
-The ISO 8601 formatted time that the Product was received.
-</description>
-</element>
-<element id="urn:oodt:Filename" name="Filename">
-<description>
-The names of the files that represent this product.
-</description>
-<dcElement />
-</element>
-<element id="urn:oodt:FileLocation" name="FileLocation">
-<description>
-The locations of the files that represent this product.
-</description>
-<dcElement />
-</element>
-<element id="urn:oodt:ProductType" name="ProductType">
-<description>
-Type of product, as specified by, e.g., a data bible.
-</description>
-<dcElement />
-</element>
-<element id="urn:oodt:ProductStructure" name="ProductStructure">
-<description>
-Whether or not a product is Flat (e.g., a set of independent
-files), or hierarchical, e.g., a dir structure.
-</description>
-<dcElement />
-</element>
-<element id="urn:oodt:MimeType" name="MimeType">
-<description>The IETF mime type of this product.</description>
-<dcElement />
-</element>
-<element id="urn:test:DataVersion" name="DataVersion">
-<description>The version of the data product</description>
-<dcElement />
-</element>
-</cas:elements>

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/examples/filemgr/oodt/product-type-element-map.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/filemgr/oodt/product-type-element-map.xml b/config/src/main/resources/examples/filemgr/oodt/product-type-element-map.xml
deleted file mode 100755
index 418c0d9..0000000
--- a/config/src/main/resources/examples/filemgr/oodt/product-type-element-map.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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.
--->
-<cas:producttypemap xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
- <!-- can set the "parent" attribute on types below to allow inheritance
-of elements between the types
--->
-   <type id="urn:oodt:GenericFile">
-       <element id="urn:oodt:ProductReceivedTime"/>
-       <element id="urn:oodt:ProductName"/>
-       <element id="urn:oodt:ProductId"/>
-       <element id="urn:oodt:ProductType"/>
-       <element id="urn:oodt:ProductStructure"/>
-       <element id="urn:oodt:Filename"/>
-       <element id="urn:oodt:FileLocation"/>
-       <element id="urn:oodt:MimeType"/>
-       <element id="urn:test:DataVersion"/>
-  </type>
-</cas:producttypemap>

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/examples/filemgr/oodt/product-types.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/filemgr/oodt/product-types.xml b/config/src/main/resources/examples/filemgr/oodt/product-types.xml
deleted file mode 100755
index 2d40847..0000000
--- a/config/src/main/resources/examples/filemgr/oodt/product-types.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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.
--->
-<cas:producttypes xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
-  <type id="urn:oodt:GenericFile" name="GenericFile">
-    <repository path="file://[OODT_HOME]/data/archive"/>
-    <versioner class="org.apache.oodt.cas.filemgr.versioning.BasicVersioner"/>
-    <!--
-You can optionally specify a 'trim' tag to identify whether
-or not you want newlines trimmed from the product type description. To
-turn off trimming (now done by default), include the following attribute with your
-description definition: trim="false"
--->
-    <description>The default product type for any kind of file.</description>
-    <metExtractors>
-      <extractor
-        class="org.apache.oodt.cas.filemgr.metadata.extractors.CoreMetExtractor">
-        <configuration>
-          <!-- you can optionally include the envReplace tag to turn on/off environment var replacement -->
-          <property name="nsAware" value="true" />
-          <property name="elementNs" value="CAS" />
-          <property name="elements"
-            value="ProductReceivedTime,ProductName,ProductId" />
-        </configuration>
-      </extractor>
-      <extractor class="org.apache.oodt.cas.filemgr.metadata.extractors.examples.MimeTypeExtractor" />
-      <extractor class="org.apache.oodt.cas.filemgr.metadata.extractors.examples.FinalFileLocationExtractor">
-        <configuration>
-          <!-- this property specifies whether you want the FILE_LOCATION field
-computed by this extractor to replace any other FILE_LOCATION met
-attribute.
--->
-           <property name="replace" value="true"/>
-        </configuration>
-      </extractor>
-    </metExtractors>
-    <metadata/>
-  </type>
-</cas:producttypes>

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/examples/resmgr/cmd-line-actions.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/resmgr/cmd-line-actions.xml b/config/src/main/resources/examples/resmgr/cmd-line-actions.xml
deleted file mode 100755
index 04919e9..0000000
--- a/config/src/main/resources/examples/resmgr/cmd-line-actions.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?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.
-
-  Author: bfoster (Brian Foster)
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
-
-	<bean id="addNode"
-		class="org.apache.oodt.cas.resource.cli.action.AddNodeCliAction">
-		<property name="description" value="Adds a ResourceNode" />
-	</bean>
-	<bean id="addNodeToQueue"
-		class="org.apache.oodt.cas.resource.cli.action.AddNodeToQueueCliAction">
-		<property name="description" value="Adds a ResourceNode to a Queue" />
-	</bean>
-	<bean id="addQueue"
-		class="org.apache.oodt.cas.resource.cli.action.AddQueueCliAction">
-		<property name="description" value="Adds a queue" />
-	</bean>
-	<bean id="getExecNode"
-		class="org.apache.oodt.cas.resource.cli.action.GetExecNodeCliAction">
-		<property name="description" value="Get execution node for a job" />
-	</bean>
-	<bean id="getJobInfo"
-		class="org.apache.oodt.cas.resource.cli.action.GetJobInfoCliAction">
-		<property name="description" value="Gets information about a job" />
-	</bean>
-	<bean id="getNodeById"
-		class="org.apache.oodt.cas.resource.cli.action.GetNodeByIdCliAction">
-		<property name="description" value="Gets information about a node" />
-	</bean>
-	<bean id="getNodeLoad"
-		class="org.apache.oodt.cas.resource.cli.action.GetNodeLoadCliAction">
-		<property name="description" value="Gets the current job load of a node" />
-	</bean>
-	<bean id="getNodes"
-		class="org.apache.oodt.cas.resource.cli.action.GetNodesCliAction">
-		<property name="description" value="Gets a list of managed nodes" />
-	</bean>
-	<bean id="getNodesInQueue"
-		class="org.apache.oodt.cas.resource.cli.action.GetNodesInQueueCliAction">
-		<property name="description"
-			value="Gets list of nodes which belong to given queue" />
-	</bean>
-	<bean id="getQueues"
-		class="org.apache.oodt.cas.resource.cli.action.GetQueuesCliAction">
-		<property name="description" value="Gets list of queues" />
-	</bean>
-	<bean id="getQueuesWithNode"
-		class="org.apache.oodt.cas.resource.cli.action.GetQueuesWithNodeCliAction">
-		<property name="description" value="Gets list of queues which contain given node" />
-	</bean>
-	<bean id="kill" class="org.apache.oodt.cas.resource.cli.action.KillCliAction">
-		<property name="description" value="Kills a job" />
-	</bean>
-	<bean id="removeNode"
-		class="org.apache.oodt.cas.resource.cli.action.RemoveNodeCliAction">
-		<property name="description" value="Removes given node from managed nodes" />
-	</bean>
-	<bean id="removeNodeFromQueue"
-		class="org.apache.oodt.cas.resource.cli.action.RemoveNodeFromQueueCliAction">
-		<property name="description" value="Removes given node from given queue" />
-	</bean>
-	<bean id="removeQueue"
-		class="org.apache.oodt.cas.resource.cli.action.RemoveQueueCliAction">
-		<property name="description" value="Removes a queue" />
-	</bean>
-	<bean id="setNodeCapacity"
-		class="org.apache.oodt.cas.resource.cli.action.SetNodeCapacityCliAction">
-		<property name="description" value="Changes a nodes capacity" />
-	</bean>
-	<bean id="submitJob"
-		class="org.apache.oodt.cas.resource.cli.action.SubmitJobCliAction">
-		<property name="description" value="Submits a job for execution" />
-	</bean>
-</beans>

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/examples/resmgr/cmd-line-options.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/resmgr/cmd-line-options.xml b/config/src/main/resources/examples/resmgr/cmd-line-options.xml
deleted file mode 100755
index a7a1fde..0000000
--- a/config/src/main/resources/examples/resmgr/cmd-line-options.xml
+++ /dev/null
@@ -1,601 +0,0 @@
-<?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.
-
-  Author: bfoster (Brian Foster)
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
-
-	<bean id="url" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-		<property name="shortOption" value="u" />
-		<property name="longOption" value="url" />
-		<property name="description" value="Resource Manager URL" />
-		<property name="hasArgs" value="true" />
-		<property name="argsDescription" value="url" />
-		<property name="required" value="true" />
-		<property name="handler">
-			<bean
-				class="org.apache.oodt.cas.cli.option.handler.SetJavaPropertiesHandler">
-				<property name="propertyNames">
-					<list>
-						<value>org.apache.oodt.cas.resource.url</value>
-					</list>
-				</property>
-			</bean>
-		</property>
-	</bean>
-
-	<bean id="operation" class="org.apache.oodt.cas.cli.option.GroupCmdLineOption">
-		<property name="shortOption" value="op" />
-		<property name="longOption" value="operation" />
-		<property name="description"
-			value="Declare that you wish to present an operation" />
-		<property name="hasArgs" value="false" />
-		<property name="required" value="true" />
-		<property name="subOptions">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-					p:option-ref="getNodeById" p:required="false" />
-				<bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-					p:option-ref="getNodes" p:required="false" />
-				<bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-					p:option-ref="getQueues" p:required="false" />
-				<bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-					p:option-ref="addNode" p:required="false" />
-				<bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-					p:option-ref="removeNode" p:required="false" />
-				<bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-					p:option-ref="setNodeCapacity" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="getExecNode" p:required="false" />
-				<bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-					p:option-ref="addQueue" p:required="false" />
-				<bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-					p:option-ref="removeQueue" p:required="false" />
-				<bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-					p:option-ref="addNodeToQueue" p:required="false" />
-				<bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-					p:option-ref="getNodesInQueue" p:required="false" />
-				<bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-					p:option-ref="getQueuesWithNode" p:required="false" />
-				<bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-					p:option-ref="removeNodeFromQueue" p:required="false" />
-				<bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-					p:option-ref="getNodeLoad" p:required="false" />
-				<bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-					p:option-ref="submitJob" p:required="false" />
-				<bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-					p:option-ref="getJobInfo" p:required="false" />
-				<bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-					p:option-ref="kill" p:required="false" />
-			</list>
-		</property>
-	</bean>
-
-	<!-- GetNodeById Options -->
-	<bean id="getNodeById" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-		p:isSubOption="true">
-		<property name="shortOption" value="nbyid" />
-		<property name="longOption" value="getNodeById" />
-		<property name="description" value="Triggers getNodeById Action" />
-		<property name="hasArgs" value="false" />
-		<property name="staticArgs">
-			<list>
-				<value>getNodeById</value>
-			</list>
-		</property>
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="getNodeById" p:relation="REQUIRED" />
-			</list>
-		</property>
-	</bean>
-
-	<!-- GetNodes Options -->
-	<bean id="getNodes" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-		p:isSubOption="true">
-		<property name="shortOption" value="nodes" />
-		<property name="longOption" value="getNodes" />
-		<property name="description" value="Triggers getNodes Action" />
-		<property name="hasArgs" value="false" />
-		<property name="staticArgs">
-			<list>
-				<value>getNodes</value>
-			</list>
-		</property>
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="getNodes" p:relation="REQUIRED" />
-			</list>
-		</property>
-	</bean>
-
-	<!-- GetQueues Options -->
-	<bean id="getQueues" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-		p:isSubOption="true">
-		<property name="shortOption" value="queues" />
-		<property name="longOption" value="getQueues" />
-		<property name="description" value="Triggers getQueues Action" />
-		<property name="hasArgs" value="false" />
-		<property name="staticArgs">
-			<list>
-				<value>getQueues</value>
-			</list>
-		</property>
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="getQueues" p:relation="REQUIRED" />
-			</list>
-		</property>
-	</bean>
-
-	<!-- AddNode Options -->
-	<bean id="addNode" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-		p:isSubOption="true">
-		<property name="shortOption" value="an" />
-		<property name="longOption" value="addNode" />
-		<property name="description" value="Triggers addNode Action" />
-		<property name="hasArgs" value="false" />
-		<property name="staticArgs">
-			<list>
-				<value>addNode</value>
-			</list>
-		</property>
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="addNode" p:relation="REQUIRED" />
-			</list>
-		</property>
-	</bean>
-
-	<bean id="ipAddr" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-		<property name="shortOption" value="addr" />
-		<property name="longOption" value="ipAddr" />
-		<property name="description" value="Node IP Address" />
-		<property name="type" value="java.net.URL" />
-		<property name="hasArgs" value="true" />
-		<property name="argsDescription" value="ip-addr" />
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="addNode" p:relation="REQUIRED" />
-			</list>
-		</property>
-		<property name="handler">
-			<bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
-				<property name="applyToActions">
-					<list>
-						<bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
-							p:actionName="addNode" p:methodName="setNodeUrl" />
-					</list>
-				</property>
-			</bean>
-		</property>
-	</bean>
-
-	<!-- RemoveNode Options -->
-	<bean id="removeNode" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-		p:isSubOption="true">
-		<property name="shortOption" value="rn" />
-		<property name="longOption" value="removeNode" />
-		<property name="description" value="Triggers removeNode Action" />
-		<property name="hasArgs" value="false" />
-		<property name="staticArgs">
-			<list>
-				<value>removeNode</value>
-			</list>
-		</property>
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="removeNode" p:relation="REQUIRED" />
-			</list>
-		</property>
-	</bean>
-
-	<!-- SetNodeCapacity Options -->
-	<bean id="setNodeCapacity" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-		p:isSubOption="true">
-		<property name="shortOption" value="sncap" />
-		<property name="longOption" value="setNodeCapacity" />
-		<property name="description" value="Triggers setNodeCapacity Action" />
-		<property name="hasArgs" value="false" />
-		<property name="staticArgs">
-			<list>
-				<value>setNodeCapacity</value>
-			</list>
-		</property>
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="setNodeCapacity" p:relation="REQUIRED" />
-			</list>
-		</property>
-	</bean>
-
-  <!-- SetNodeCapacity Options -->
-  <bean id="getExecNode" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="exeNode" />
-    <property name="longOption" value="getExecNode" />
-    <property name="description" value="Triggers getExecNode Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>getExecNode</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getExecNode" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-	<!-- AddQueue Options -->
-	<bean id="addQueue" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-		p:isSubOption="true">
-		<property name="shortOption" value="aq" />
-		<property name="longOption" value="addQueue" />
-		<property name="description" value="Triggers addQueue Action" />
-		<property name="hasArgs" value="false" />
-		<property name="staticArgs">
-			<list>
-				<value>addQueue</value>
-			</list>
-		</property>
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="addQueue" p:relation="REQUIRED" />
-			</list>
-		</property>
-	</bean>
-
-	<!-- RemoveQueue Options -->
-	<bean id="removeQueue" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-		p:isSubOption="true">
-		<property name="shortOption" value="rq" />
-		<property name="longOption" value="removeQueue" />
-		<property name="description" value="Triggers removeQueue Action" />
-		<property name="hasArgs" value="false" />
-		<property name="staticArgs">
-			<list>
-				<value>removeQueue</value>
-			</list>
-		</property>
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="removeQueue" p:relation="REQUIRED" />
-			</list>
-		</property>
-	</bean>
-
-	<!-- AddNodeToQueue Options -->
-	<bean id="addNodeToQueue" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-		p:isSubOption="true">
-		<property name="shortOption" value="antq" />
-		<property name="longOption" value="addNodeToQueue" />
-		<property name="description" value="Triggers addNodeToQueue Action" />
-		<property name="hasArgs" value="false" />
-		<property name="staticArgs">
-			<list>
-				<value>addNodeToQueue</value>
-			</list>
-		</property>
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="addNodeToQueue" p:relation="REQUIRED" />
-			</list>
-		</property>
-	</bean>
-
-	<!-- GetNodesInQueue Options -->
-	<bean id="getNodesInQueue" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-		p:isSubOption="true">
-		<property name="shortOption" value="ninq" />
-		<property name="longOption" value="getNodesInQueue" />
-		<property name="description" value="Triggers getNodesInQueue Action" />
-		<property name="hasArgs" value="false" />
-		<property name="staticArgs">
-			<list>
-				<value>getNodesInQueue</value>
-			</list>
-		</property>
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="getNodesInQueue" p:relation="REQUIRED" />
-			</list>
-		</property>
-	</bean>
-
-	<!-- GetQueuesWithNode Options -->
-	<bean id="getQueuesWithNode" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-		p:isSubOption="true">
-		<property name="shortOption" value="qwn" />
-		<property name="longOption" value="getQueuesWithNode" />
-		<property name="description" value="Triggers getQueuesWithNode Action" />
-		<property name="hasArgs" value="false" />
-		<property name="staticArgs">
-			<list>
-				<value>getQueuesWithNode</value>
-			</list>
-		</property>
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="getQueuesWithNode" p:relation="REQUIRED" />
-			</list>
-		</property>
-	</bean>
-
-	<!-- RemoveNodeFromQueue Options -->
-	<bean id="removeNodeFromQueue" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-		p:isSubOption="true">
-		<property name="shortOption" value="rnfq" />
-		<property name="longOption" value="removeNodeFromQueue" />
-		<property name="description" value="Triggers removeNodeFromQueue Action" />
-		<property name="hasArgs" value="false" />
-		<property name="staticArgs">
-			<list>
-				<value>removeNodeFromQueue</value>
-			</list>
-		</property>
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="removeNodeFromQueue" p:relation="REQUIRED" />
-			</list>
-		</property>
-	</bean>
-
-	<!-- GetNodeLoad Options -->
-	<bean id="getNodeLoad" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-		p:isSubOption="true">
-		<property name="shortOption" value="load" />
-		<property name="longOption" value="getNodeLoad" />
-		<property name="description" value="Triggers getNodeLoad Action" />
-		<property name="hasArgs" value="false" />
-		<property name="staticArgs">
-			<list>
-				<value>getNodeLoad</value>
-			</list>
-		</property>
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="getNodeLoad" p:relation="REQUIRED" />
-			</list>
-		</property>
-	</bean>
-
-	<!-- SubmitJob Options -->
-	<bean id="submitJob" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-		p:isSubOption="true">
-		<property name="shortOption" value="submit" />
-		<property name="longOption" value="submitJob" />
-		<property name="description" value="Triggers submitJob Action" />
-		<property name="hasArgs" value="false" />
-		<property name="staticArgs">
-			<list>
-				<value>submitJob</value>
-			</list>
-		</property>
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="submitJob" p:relation="REQUIRED" />
-			</list>
-		</property>
-	</bean>
-
-	<bean id="def" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-		<property name="shortOption" value="d" />
-		<property name="longOption" value="def" />
-		<property name="description" value="Job Definition File" />
-		<property name="hasArgs" value="true" />
-		<property name="argsDescription" value="xml-file" />
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="submitJob" p:relation="REQUIRED" />
-			</list>
-		</property>
-		<property name="handler">
-			<bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
-				<property name="applyToActions">
-					<list>
-						<bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
-							p:actionName="submitJob" p:methodName="setJobDefinitionFile" />
-					</list>
-				</property>
-			</bean>
-		</property>
-	</bean>
-
-  <bean id="nodeUrl" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="nu" />
-    <property name="longOption" value="nodeUrl" />
-    <property name="description" value="Node URL" />
-    <property name="type" value="java.net.URL" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="url" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="submitJob" p:relation="OPTIONAL" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
-        <property name="applyToActions">
-          <list>
-            <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
-              p:actionName="submitJob" p:methodName="setUrl" />
-          </list>
-        </property>
-      </bean>
-    </property>
-  </bean>
-
-	<!-- GetJobInfo Options -->
-	<bean id="getJobInfo" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-		p:isSubOption="true">
-		<property name="shortOption" value="info" />
-		<property name="longOption" value="getJobInfo" />
-		<property name="description" value="Triggers getJobInfo Action" />
-		<property name="hasArgs" value="false" />
-		<property name="staticArgs">
-			<list>
-				<value>getJobInfo</value>
-			</list>
-		</property>
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="getJobInfo" p:relation="REQUIRED" />
-			</list>
-		</property>
-	</bean>
-
-	<!-- Kill Options -->
-	<bean id="kill" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-		p:isSubOption="true">
-		<property name="shortOption" value="k" />
-		<property name="longOption" value="kill" />
-		<property name="description" value="Triggers kill Action" />
-		<property name="hasArgs" value="false" />
-		<property name="staticArgs">
-			<list>
-				<value>kill</value>
-			</list>
-		</property>
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="kill" p:relation="REQUIRED" />
-			</list>
-		</property>
-	</bean>
-
-	<!-- Options used for multiple Actions -->
-	<bean id="nodeId" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-		<property name="shortOption" value="nid" />
-		<property name="longOption" value="nodeId" />
-		<property name="description" value="Node ID" />
-		<property name="hasArgs" value="true" />
-		<property name="argsDescription" value="node-id" />
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="getNodeById" p:relation="REQUIRED" />
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="addNode" p:relation="REQUIRED" />
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="removeNode" p:relation="REQUIRED" />
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="setNodeCapacity" p:relation="REQUIRED" />
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="addNodeToQueue" p:relation="REQUIRED" />
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="getQueuesWithNode" p:relation="REQUIRED" />
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="removeNodeFromQueue" p:relation="REQUIRED" />
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="getNodeLoad" p:relation="REQUIRED" />
-			</list>
-		</property>
-		<property name="handler">
-			<bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-		</property>
-	</bean>
-
-	<bean id="capacity" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-		<property name="shortOption" value="cap" />
-		<property name="longOption" value="capacity" />
-		<property name="description" value="Node Capacity" />
-		<property name="type" value="int" />
-		<property name="hasArgs" value="true" />
-		<property name="argsDescription" value="capacity" />
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="addNode" p:relation="REQUIRED" />
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="setNodeCapacity" p:relation="REQUIRED" />
-			</list>
-		</property>
-		<property name="handler">
-			<bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-		</property>
-	</bean>
-
-	<bean id="queueName" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-		<property name="shortOption" value="qn" />
-		<property name="longOption" value="queueName" />
-		<property name="description" value="Queue name" />
-		<property name="hasArgs" value="true" />
-		<property name="argsDescription" value="queue-name" />
-		<property name="requirementRules">
-			<list>
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="addQueue" p:relation="REQUIRED" />
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="removeQueue" p:relation="REQUIRED" />
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="addNodeToQueue" p:relation="REQUIRED" />
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="getNodesInQueue" p:relation="REQUIRED" />
-				<bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-					p:actionName="removeNodeFromQueue" p:relation="REQUIRED" />
-			</list>
-		</property>
-		<property name="handler">
-			<bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-		</property>
-	</bean>
-
-  <bean id="jobId" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="jid" />
-    <property name="longOption" value="jobId" />
-    <property name="description" value="Job ID" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="job-id" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getJobInfo" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getExecNode" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="kill" p:relation="REQUIRED" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-</beans>

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/examples/resmgr/jobs/exJob.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/resmgr/jobs/exJob.xml b/config/src/main/resources/examples/resmgr/jobs/exJob.xml
deleted file mode 100755
index bbe0def..0000000
--- a/config/src/main/resources/examples/resmgr/jobs/exJob.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?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.
--->
-<cas:job xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas" id="abcd"
-	name="TestJob">
-	<instanceClass
-		name="org.apache.oodt.cas.resource.examples.HelloWorldJob" />
-	<inputClass
-		name="org.apache.oodt.cas.resource.structs.NameValueJobInput">
-		<properties>
-			<property name="user.name" value="Homer!" />
-		</properties>
-	</inputClass>
-	<queue>quick</queue>
-	<load>1</load>
-</cas:job>

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/examples/resmgr/jobs/exLongJob.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/resmgr/jobs/exLongJob.xml b/config/src/main/resources/examples/resmgr/jobs/exLongJob.xml
deleted file mode 100755
index 3cbeb29..0000000
--- a/config/src/main/resources/examples/resmgr/jobs/exLongJob.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?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.
--->
-<cas:job xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas" id="abcd"
-	name="TestJob">
-	<instanceClass
-		name="org.apache.oodt.cas.resource.examples.LongJob" />
-	<inputClass
-		name="org.apache.oodt.cas.resource.structs.NameValueJobInput">
-		<properties>
-			<property name="wait" value="60" />
-		</properties>
-	</inputClass>
-	<queue>quick</queue>
-	<load>1</load>
-</cas:job>

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/examples/resmgr/logging.properties
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/resmgr/logging.properties b/config/src/main/resources/examples/resmgr/logging.properties
deleted file mode 100755
index 8785c8b..0000000
--- a/config/src/main/resources/examples/resmgr/logging.properties
+++ /dev/null
@@ -1,67 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE.txt 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.    
-#
-
-# Specify the handlers to create in the root logger
-# (all loggers are children of the root logger)
-# The following creates two handlers
-handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
-
-# Set the default logging level for the root logger
-.level = ALL
-    
-# Set the default logging level for new ConsoleHandler instances
-java.util.logging.ConsoleHandler.level = ALL
-java.util.logging.FileHandler.level = ALL
-        
-# Set the default formatter for new ConsoleHandler instances
-java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
-
-# default file output is in user's home directory.
-java.util.logging.FileHandler.pattern = ../logs/cas_resource%g.log
-java.util.logging.FileHandler.limit = 50000
-java.util.logging.FileHandler.count = 5
-java.util.logging.FileHandler.append = true
-java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
-    
-# Set the default logging level for the subsystems
-
-# batchmgr subsystem
-org.apache.oodt.cas.resource.batchmgr.level = INFO
-
-# monitor subsystem
-org.apache.oodt.cas.resource.monitor.level = INFO
-
-# jobqueue subsystem
-org.apache.oodt.cas.resource.jobqueue.level = INFO
-
-# scheduler subsystem
-org.apache.oodt.cas.resource.scheduler.level = INFO
-
-# system subsystem
-org.apache.oodt.cas.resource.system.level = FINE
-
-# control the underlying commons-httpclient transport layer for xmlrpc 
-org.apache.commons.httpclient.level = INFO
-httpclient.wire.header.level = INFO
-httpclient.wire.level = INFO
-
-# spring framework logging
-org.springframework.beans.level = SEVERE
-org.springframework.core.level = SEVERE
-org.springframework.level = SEVERE
-org.springframework.beans.factory.level = SEVERE
-org.springframework.beans.factory.config.level = SEVERE
-org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.level = SEVERE

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/examples/resmgr/node-to-queue-mapping.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/resmgr/node-to-queue-mapping.xml b/config/src/main/resources/examples/resmgr/node-to-queue-mapping.xml
deleted file mode 100755
index 73b0eba..0000000
--- a/config/src/main/resources/examples/resmgr/node-to-queue-mapping.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more contributor
-license agreements.  See the NOTICE.txt 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.
--->
-<cas:node-to-queue-mapping xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
-	<node id="localhost">
-		<queues>
-			<queue name="high"/>
-			<queue name="quick"/>
-			<queue name="long"/>
-		</queues>
-	</node>	
-</cas:node-to-queue-mapping>

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/examples/resmgr/nodes.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/resmgr/nodes.xml b/config/src/main/resources/examples/resmgr/nodes.xml
deleted file mode 100755
index d3d415d..0000000
--- a/config/src/main/resources/examples/resmgr/nodes.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more contributor
-license agreements.  See the NOTICE.txt 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.
--->
-<cas:resourcenodes xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
-	<node nodeId="localhost" ip="http://localhost:2001" capacity="8"/>
-	<!-- EnvReplace Example 
-	<node nodeId="somehost" ip="http://somehost:[BATCH_STUB_PORT]" capacity="8" envReplace="true"/>
-	-->
-</cas:resourcenodes>

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/examples/resmgr/resource.properties
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/resmgr/resource.properties b/config/src/main/resources/examples/resmgr/resource.properties
deleted file mode 100755
index 5520c7b..0000000
--- a/config/src/main/resources/examples/resmgr/resource.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE.txt 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.    
-#
-#
-# Properties required to configure the Resource Manager
-
-# resource batchmgr factory
-resource.batchmgr.factory = org.apache.oodt.cas.resource.batchmgr.XmlRpcBatchMgrFactory
-
-# resource monitor factory
-resource.monitor.factory = org.apache.oodt.cas.resource.monitor.AssignmentMonitorFactory
-
-# resource scheduler factory
-resource.scheduler.factory = org.apache.oodt.cas.resource.scheduler.LRUSchedulerFactory
-
-# resource jobqueue factory
-resource.jobqueue.factory = org.apache.oodt.cas.resource.jobqueue.JobStackJobQueueFactory
-
-# resource job repository factory
-resource.jobrepo.factory = org.apache.oodt.cas.resource.jobrepo.MemoryJobRepositoryFactory
-
-# node repository factory
-org.apache.oodt.cas.resource.nodes.repo.factory = org.apache.oodt.cas.resource.noderepo.XmlNodeRepositoryFactory
-
-# queue repository factory
-org.apache.oodt.cas.resource.queues.repo.factory = org.apache.oodt.cas.resource.queuerepo.XmlQueueRepositoryFactory
-
-# JobStack JobQueue config properties
-org.apache.oodt.cas.resource.jobqueue.jobstack.maxstacksize=1000
-
-# XML LRUScheduler config properties
-org.apache.oodt.cas.resource.scheduler.wait.seconds=20
-
-# XML-RPC configuration props
-org.apache.oodt.cas.resource.system.xmlrpc.requestTimeout.minutes=20
-org.apache.oodt.cas.resource.system.xmlrpc.connectionTimeout.minutes=60
-
-# XStream JobRepo configuration props
-org.apache.oodt.cas.resource.jobrepo.xstream.working.dir=[HOME]/job-repo
-org.apache.oodt.cas.resource.jobrepo.xstream.max.history=4000
-
-# XML Node Repository config properties
-org.apache.oodt.cas.resource.nodes.dirs=file://[RESMGR_HOME]/policy
-
-# XML Queue Repository config properties
-org.apache.oodt.cas.resource.nodetoqueues.dirs=file://[RESMGR_HOME]/policy
-
-
-

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java b/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
index 4694dfa..27174ba 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
@@ -27,6 +27,8 @@ import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
 
 public abstract class AbstractDistributedConfigurationTest {
 
+    protected static final String CONFIG_PUBLISHER_XML = "config-publisher.xml";
+
     protected static TestingServer zookeeper;
     protected static CuratorFramework client;
 

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
index 71ce713..d96767b 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
@@ -38,7 +38,6 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
-import static org.apache.oodt.config.Constants.CONFIG_PUBLISHER_XML;
 import static org.apache.oodt.config.Constants.SEPARATOR;
 import static org.junit.Assert.fail;
 
@@ -58,6 +57,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
 
         ConfigPublisher.main(new String[]{
                 "-connectString", zookeeper.getConnectString(),
+                "-config", CONFIG_PUBLISHER_XML,
                 "-a", "publish"
         });
 
@@ -140,6 +140,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
 
         ConfigPublisher.main(new String[]{
                 "-connectString", zookeeper.getConnectString(),
+                "-config", CONFIG_PUBLISHER_XML,
                 "-a", "clear"
         });
 

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
index 5a529ed..24a43e3 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
@@ -29,8 +29,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
-import static org.apache.oodt.config.Constants.CONFIG_PUBLISHER_XML;
-
 /**
  * Testing the functionality of {@link DistributedConfigurationPublisher} and its CLI
  *
@@ -43,6 +41,7 @@ public class DistributedConfigurationPublisherTest extends AbstractDistributedCo
         // Publishing configuration through CLI and verifying whether they were stored correctly
         ConfigPublisher.main(new String[]{
                 "-connectString", zookeeper.getConnectString(),
+                "-config", CONFIG_PUBLISHER_XML,
                 "-a", "publish"
         });
 
@@ -83,6 +82,7 @@ public class DistributedConfigurationPublisherTest extends AbstractDistributedCo
         // Clearing configuration through CLI and checking whether the configuration has actually been gone
         ConfigPublisher.main(new String[]{
                 "-connectString", zookeeper.getConnectString(),
+                "-config", CONFIG_PUBLISHER_XML,
                 "-a", "clear"
         });
 

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/test/resources/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/test/resources/config-publisher.xml b/config/src/test/resources/config-publisher.xml
new file mode 100644
index 0000000..5720dab
--- /dev/null
+++ b/config/src/test/resources/config-publisher.xml
@@ -0,0 +1,74 @@
+<!--
+  ~ 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.
+  -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+    <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
+        <constructor-arg value="FILE_MANAGER"/>
+        <property name="propertiesFiles">
+            <map key-type="java.lang.String" value-type="java.lang.String">
+                <entry key="target/resources/examples/filemgr/filemgr.properties" value="/etc/filemgr.properties"/>
+                <entry key="target/resources/examples/filemgr/logging.properties" value="/etc/logging.properties"/>
+            </map>
+        </property>
+        <property name="configFiles">
+            <map key-type="java.lang.String" value-type="java.lang.String">
+                <!-- Examples - Core-->
+                <entry key="target/resources/examples/filemgr/core/elements.xml" value="/policy/core/elements.xml"/>
+                <entry key="target/resources/examples/filemgr/core/product-types.xml" value="/policy/core/product-types.xml"/>
+                <entry key="target/resources/examples/filemgr/core/product-type-element-map.xml" value="/policy/core/product-type-element-map.xml"/>
+
+                <!-- Examples - Geo-->
+                <entry key="target/resources/examples/filemgr/geo/elements.xml" value="/policy/geo/elements.xml"/>
+                <entry key="target/resources/examples/filemgr/geo/product-types.xml" value="/policy/geo/product-types.xml"/>
+                <entry key="target/resources/examples/filemgr/geo/product-type-element-map.xml" value="/policy/geo/product-type-element-map.xml"/>
+
+                <!-- Examples - Trace-->
+                <entry key="target/resources/examples/filemgr/trace/elements.xml" value="/policy/trace/elements.xml"/>
+                <entry key="target/resources/examples/filemgr/trace/product-types.xml" value="/policy/trace/product-types.xml"/>
+                <entry key="target/resources/examples/filemgr/trace/product-type-element-map.xml" value="/policy/trace/product-type-element-map.xml"/>
+            </map>
+        </property>
+    </bean>
+
+    <bean id="resmgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
+        <constructor-arg value="RESOURCE_MANAGER"/>
+        <property name="propertiesFiles">
+            <map key-type="java.lang.String" value-type="java.lang.String">
+                <entry key="target/resources/examples/resmgr/resource.properties" value="/etc/resource.properties"/>
+                <entry key="target/resources/examples/resmgr/logging.properties" value="/etc/logging.properties"/>
+            </map>
+        </property>
+        <property name="configFiles">
+            <map key-type="java.lang.String" value-type="java.lang.String">
+                <entry key="target/resources/examples/resmgr/node-to-queue-mapping.xml" value="/policy/node-to-queue-mapping.xml"/>
+                <entry key="target/resources/examples/resmgr/nodes.xml" value="/policy/nodes.xml"/>
+                <entry key="target/resources/examples/resmgr/queue-to-backend-mapping.xml" value="/policy/queue-to-backend-mapping.xml"/>
+
+                <entry key="target/resources/examples/resmgr/jobs/exJob.xml" value="/policy/jobs/exJob.xml"/>
+                <entry key="target/resources/examples/resmgr/jobs/exLongJob.xml" value="/policy/jobs/exLongJob.xml"/>
+                <entry key="target/resources/examples/resmgr/jobs/exPalindrome.xml" value="/policy/jobs/exPalindrome.xml"/>
+                <entry key="target/resources/examples/resmgr/jobs/exSparkJob.xml" value="/policy/jobs/exSparkJob.xml"/>
+                <entry key="target/resources/examples/resmgr/jobs/exSparkPalindrome.xml" value="/policy/jobs/exSparkPalindrome.xml"/>
+                <entry key="target/resources/examples/resmgr/jobs/exStreamingPalindrome.xml" value="/policy/jobs/exStreamingPalindrome.xml"/>
+            </map>
+        </property>
+    </bean>
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/test/resources/etc/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/test/resources/etc/config-publisher.xml b/config/src/test/resources/etc/config-publisher.xml
deleted file mode 100644
index ecae033..0000000
--- a/config/src/test/resources/etc/config-publisher.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<!--
-  ~ 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.
-  -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
-    <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
-        <constructor-arg value="FILE_MANAGER"/>
-        <property name="propertiesFiles">
-            <map key-type="java.lang.String" value-type="java.lang.String">
-                <entry key="src/main/resources/examples/filemgr/filemgr.properties" value="/etc/filemgr.properties"/>
-            </map>
-        </property>
-        <property name="configFiles">
-            <map key-type="java.lang.String" value-type="java.lang.String">
-                <entry key="src/main/resources/examples/filemgr/mime-types.xml" value="/etc/mime-types.xml"/>
-                <entry key="src/main/resources/examples/filemgr/cmd-line-actions.xml" value="/policy/cmd-line-actions.xml"/>
-                <entry key="src/main/resources/examples/filemgr/cmd-line-options.xml" value="/policy/cmd-line-options.xml"/>
-                <entry key="src/main/resources/examples/filemgr/oodt/elements.xml" value="/policy/oodt/elements.xml"/>
-                <entry key="src/main/resources/examples/filemgr/oodt/product-types.xml" value="/policy/oodt/product-types.xml"/>
-                <entry key="src/main/resources/examples/filemgr/oodt/product-type-element-map.xml" value="/policy/oodt/product-type-element-map.xml"/>
-            </map>
-        </property>
-    </bean>
-
-    <bean id="resmgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
-        <constructor-arg value="RESOURCE_MANAGER"/>
-        <property name="propertiesFiles">
-            <map key-type="java.lang.String" value-type="java.lang.String">
-                <entry key="src/main/resources/examples/resmgr/resource.properties" value="/etc/resource.properties"/>
-                <entry key="src/main/resources/examples/resmgr/logging.properties" value="/etc/logging.properties"/>
-            </map>
-        </property>
-        <property name="configFiles">
-            <map key-type="java.lang.String" value-type="java.lang.String">
-                <entry key="src/main/resources/examples/resmgr/cmd-line-actions.xml" value="/policy/cmd-line-actions.xml"/>
-                <entry key="src/main/resources/examples/resmgr/cmd-line-options.xml" value="/policy/cmd-line-options.xml"/>
-                <entry key="src/main/resources/examples/resmgr/nodes.xml" value="/policy/nodes.xml"/>
-                <entry key="src/main/resources/examples/resmgr/node-to-queue-mapping.xml" value="/policy/node-to-queue-mapping.xml"/>
-                <entry key="src/main/resources/examples/resmgr/jobs/exJob.xml" value="/policy/jobs/exJob.xml"/>
-                <entry key="src/main/resources/examples/resmgr/jobs/exLongJob.xml" value="/policy/jobs/exLongJob.xml"/>
-            </map>
-        </property>
-    </bean>
-
-</beans>
\ No newline at end of file


[7/8] oodt git commit: Clear configuration files option for configuration manager

Posted by ma...@apache.org.
Clear configuration files option for configuration manager


Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/72722e03
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/72722e03
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/72722e03

Branch: refs/heads/feature/zookeeper-config
Commit: 72722e0339c522bfdeac3e13278e8682e9cf13df
Parents: e32f2bb
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Sun Aug 6 12:59:21 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Sun Aug 6 12:59:21 2017 +0530

----------------------------------------------------------------------
 .../oodt/config/ConfigurationManager.java       | 18 +++++
 .../DistributedConfigurationManager.java        | 72 ++++++++++++++++----
 .../StandaloneConfigurationManager.java         | 12 ++++
 .../DistributedConfigurationManagerTest.java    | 29 ++------
 4 files changed, 97 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oodt/blob/72722e03/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
index 56fea0d..2554604 100644
--- a/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
@@ -17,6 +17,8 @@
 
 package org.apache.oodt.config;
 
+import java.util.List;
+
 /**
  * The abstract class to define functions of the configuration managers.
  *
@@ -32,7 +34,23 @@ public abstract class ConfigurationManager {
 
     public abstract void loadConfiguration() throws Exception;
 
+    /**
+     * Clears loaded configuration. Invocation of this method will remove the downloaded configuration files to be
+     * deleted in the distributed configuration management scenario. Any child class that is extending this class should
+     * implement this operation on their own.
+     */
+    public abstract void clearConfiguration();
+
     public Component getComponent() {
         return component;
     }
+
+    /**
+     * Returns a list of file paths which are the locations of the files stored locally corresponding to configuration.
+     * In distributed configuration management scenario, this stands for the files downloaded and stored in local file
+     * system.
+     *
+     * @return list of locally stored files
+     */
+    public abstract List<String> getSavedFiles();
 }

http://git-wip-us.apache.org/repos/asf/oodt/blob/72722e03/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
index 122a78e..6b6ef21 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
@@ -32,6 +32,7 @@ import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
 
@@ -55,6 +56,8 @@ public class DistributedConfigurationManager extends ConfigurationManager {
     private Component component;
     private ZNodePaths zNodePaths;
 
+    private List<String> savedFiles = new ArrayList<>();
+
     public DistributedConfigurationManager(Component component) {
         super(component);
         this.component = component;
@@ -78,20 +81,17 @@ public class DistributedConfigurationManager extends ConfigurationManager {
 
         connectString = System.getProperty(Constants.Properties.ZK_CONNECT_STRING);
         logger.info("Using zookeeper connect string : {}", connectString);
-
         startZookeeper();
     }
 
     /**
-     * Creates a {@link CuratorFramework} instance and start it. This method will wait a maximum amount of
-     * {@link Properties#ZK_STARTUP_TIMEOUT} milli-seconds until the client connects to the zookeeper ensemble.
+     * Creates a {@link CuratorFramework} instance and start it. This method will wait a maximum amount of {@link
+     * Properties#ZK_STARTUP_TIMEOUT} milli-seconds until the client connects to the zookeeper ensemble.
      */
     private void startZookeeper() {
         client = CuratorUtils.newCuratorFrameworkClient(connectString, logger);
-
         client.start();
         logger.info("Curator framework start operation invoked");
-
         int startupTimeOutMs = Integer.parseInt(System.getProperty(Properties.ZK_STARTUP_TIMEOUT, "30000"));
         try {
             logger.info("Waiting to connect to zookeeper, startupTimeout : {}", startupTimeOutMs);
@@ -141,10 +141,7 @@ public class DistributedConfigurationManager extends ConfigurationManager {
             logger.info("Properties loaded from ZNode at : {}", propertiesFileZNodePath);
 
             String localFilePath = zNodePaths.getLocalPropertiesFilePath(propertiesFileZNodePath);
-            localFilePath = FilePathUtils.fixForComponentHome(component, localFilePath);
-            logger.debug("Storing configuration in file: {}", localFilePath);
-            FileUtils.writeByteArrayToFile(new File(localFilePath), bytes);
-            logger.info("Properties file from ZNode at {} saved to {}", propertiesFileZNodePath, localFilePath);
+            saveFile(localFilePath, bytes);
         }
     }
 
@@ -168,16 +165,67 @@ public class DistributedConfigurationManager extends ConfigurationManager {
             byte[] bytes = client.getData().forPath(configFileZNodePath);
 
             String localFilePath = zNodePaths.getLocalConfigFilePath(configFileZNodePath);
-            localFilePath = FilePathUtils.fixForComponentHome(component, localFilePath);
-            FileUtils.writeByteArrayToFile(new File(localFilePath), bytes);
-            logger.info("Config file from ZNode at {} saved to {}", configFileZNodePath, localFilePath);
+            saveFile(localFilePath, bytes);
+        }
+    }
+
+    private void saveFile(String path, byte[] data) throws IOException {
+        String localFilePath = FilePathUtils.fixForComponentHome(component, path);
+        File localFile = new File(localFilePath);
+        if (localFile.exists()) {
+            logger.warn("Deleting already existing file at {} before writing new content", localFilePath);
+            localFile.delete();
+        }
+
+        logger.debug("Storing configuration in file: {}", localFilePath);
+        FileUtils.writeByteArrayToFile(localFile, data);
+        logger.info("File from ZNode at {} saved to {}", path, localFilePath);
+        savedFiles.add(localFilePath);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void clearConfiguration() {
+        for (String path : savedFiles) {
+            logger.debug("Removing saved file {}", path);
+            File file = new File(path);
+            if (file.delete()) {
+                logger.debug("Deleted saved file {}", path);
+
+                int lastIndex = path.lastIndexOf(Constants.SEPARATOR);
+                String parentPath = path.substring(0, lastIndex == -1 ? 0 : lastIndex);
+                while (!parentPath.isEmpty()) {
+                    // Deleting parent if empty
+                    File parent = new File(parentPath);
+                    File[] files = parent.listFiles();
+                    if (files == null || files.length != 0) {
+                        break;
+                    }
+
+                    if (!parent.delete()) {
+                        break;
+                    }
+                    logger.debug("Deleted directory {} since it is empty", parentPath);
+                    lastIndex = parentPath.lastIndexOf(Constants.SEPARATOR);
+                    parentPath = path.substring(0, lastIndex == -1 ? 0 : lastIndex);
+                }
+            } else {
+                logger.warn("Unable to delete saved file {}", path);
+            }
         }
+        savedFiles.clear();
     }
 
     public Component getComponent() {
         return component;
     }
 
+    /** {@inheritDoc} */
+    @Override
+    public List<String> getSavedFiles() {
+        return new ArrayList<>(savedFiles);
+    }
+
     public ZNodePaths getzNodePaths() {
         return zNodePaths;
     }

http://git-wip-us.apache.org/repos/asf/oodt/blob/72722e03/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
index cc3fe1a..94269bb 100644
--- a/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/standalone/StandaloneConfigurationManager.java
@@ -52,4 +52,16 @@ public class StandaloneConfigurationManager extends ConfigurationManager {
             logger.debug("Properties loaded from file : {}", file);
         }
     }
+
+    /** {@inheritDoc} */
+    @Override
+    public void clearConfiguration() {
+
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public List<String> getSavedFiles() {
+        return new ArrayList<>();
+    }
 }

http://git-wip-us.apache.org/repos/asf/oodt/blob/72722e03/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
index 064d1c6..a4315a5 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
@@ -17,7 +17,6 @@
 
 package org.apache.oodt.config.distributed;
 
-import org.apache.commons.io.FileUtils;
 import org.apache.oodt.config.ConfigurationManager;
 import org.apache.oodt.config.distributed.cli.ConfigPublisher;
 import org.apache.oodt.config.distributed.utils.FilePathUtils;
@@ -33,11 +32,9 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.InputStream;
 import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
-import java.util.Set;
 
 import static org.apache.oodt.config.Constants.SEPARATOR;
 import static org.junit.Assert.fail;
@@ -114,6 +111,13 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
                 File file = new File(fileName);
                 Assert.assertTrue(file.exists());
             }
+
+            List<String> localFiles = configurationManager.getSavedFiles();
+            configurationManager.clearConfiguration();
+            for (String localFile : localFiles) {
+                File file = new File(localFile);
+                Assert.assertFalse(file.exists());
+            }
         }
     }
 
@@ -121,25 +125,6 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
     public void tearDownTest() throws Exception {
         for (DistributedConfigurationPublisher publisher : publishers) {
             publisher.destroy();
-
-            // deleting all locally created conf file directories
-            Set<Map.Entry<String, String>> files = new HashSet<>(publisher.getConfigFiles().entrySet());
-            files.addAll(publisher.getPropertiesFiles().entrySet());
-
-            for (Map.Entry<String, String> entry : files) {
-                String fileName = entry.getValue();
-                fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(1) : fileName;
-
-                String prefixPath = System.getProperty(publisher.getComponent().getHome());
-                if (prefixPath == null) {
-                    prefixPath = System.getenv(publisher.getComponent().getHome());
-                }
-                String confDir = prefixPath != null && !prefixPath.trim().isEmpty() ?
-                        prefixPath.trim() + SEPARATOR + fileName.split(SEPARATOR)[0] : fileName.split(SEPARATOR)[0];
-
-                File dir = new File(confDir);
-                FileUtils.deleteDirectory(dir);
-            }
         }
 
         ConfigPublisher.main(new String[]{


[3/8] oodt git commit: Added maven-resource-plugin for example resource copying and CLI improvements

Posted by ma...@apache.org.
Added maven-resource-plugin for example resource copying and CLI improvements


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

Branch: refs/heads/feature/zookeeper-config
Commit: d2f2d49d119abfaf07407422a9df1779df236027
Parents: 0133112
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Thu Jul 27 22:03:48 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Fri Jul 28 21:20:43 2017 +0530

----------------------------------------------------------------------
 config/pom.xml                                  |   57 +
 config/src/main/assembly/assembly.xml           |   31 +-
 .../java/org/apache/oodt/config/Constants.java  |    2 +-
 .../DistributedConfigurationPublisher.java      |    8 +-
 .../oodt/config/distributed/cli/CLIAction.java  |   14 +-
 .../config/distributed/utils/CuratorUtils.java  |    2 +-
 config/src/main/resources/cmd-line-options.xml  |   37 +-
 config/src/main/resources/config-publisher.xml  |   48 +-
 .../examples/filemgr/cmd-line-actions.xml       |  123 -
 .../examples/filemgr/cmd-line-options.xml       | 1175 -----
 .../examples/filemgr/filemgr.properties         |  114 -
 .../resources/examples/filemgr/mime-types.xml   | 4119 ------------------
 .../examples/filemgr/oodt/elements.xml          |   77 -
 .../filemgr/oodt/product-type-element-map.xml   |   33 -
 .../examples/filemgr/oodt/product-types.xml     |   53 -
 .../examples/resmgr/cmd-line-actions.xml        |   92 -
 .../examples/resmgr/cmd-line-options.xml        |  601 ---
 .../resources/examples/resmgr/jobs/exJob.xml    |   30 -
 .../examples/resmgr/jobs/exLongJob.xml          |   30 -
 .../examples/resmgr/logging.properties          |   67 -
 .../examples/resmgr/node-to-queue-mapping.xml   |   26 -
 .../main/resources/examples/resmgr/nodes.xml    |   23 -
 .../examples/resmgr/resource.properties         |   61 -
 .../AbstractDistributedConfigurationTest.java   |    2 +
 .../DistributedConfigurationManagerTest.java    |    3 +-
 .../DistributedConfigurationPublisherTest.java  |    4 +-
 config/src/test/resources/config-publisher.xml  |   74 +
 .../src/test/resources/etc/config-publisher.xml |   61 -
 28 files changed, 260 insertions(+), 6707 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/pom.xml
----------------------------------------------------------------------
diff --git a/config/pom.xml b/config/pom.xml
index 438efc4..21d28d8 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -79,6 +79,63 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-filemgr-resources</id>
+                        <phase>process-test-classes</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.directory}/resources/examples/filemgr</outputDirectory>
+                            <overwrite>true</overwrite>
+                            <resources>
+                                <resource>
+                                    <directory>../filemgr/src/main/resources/examples</directory>
+                                    <includes>
+                                        <include>**/*</include>
+                                    </includes>
+                                </resource>
+                                <resource>
+                                    <directory>../filemgr/src/main/resources</directory>
+                                    <includes>
+                                        <include>filemgr.properties</include>
+                                        <include>logging.properties</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>copy-resource-manager-resources</id>
+                        <phase>process-test-classes</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.directory}/resources/examples/resmgr</outputDirectory>
+                            <overwrite>true</overwrite>
+                            <resources>
+                                <resource>
+                                    <directory>../resource/src/main/resources/examples</directory>
+                                    <includes>
+                                        <include>**/*</include>
+                                    </includes>
+                                </resource>
+                                <resource>
+                                    <directory>../resource/src/main/resources</directory>
+                                    <includes>
+                                        <include>resource.properties</include>
+                                        <include>logging.properties</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 </project>

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/config/src/main/assembly/assembly.xml b/config/src/main/assembly/assembly.xml
index a6db0fc..a1bc3dd 100644
--- a/config/src/main/assembly/assembly.xml
+++ b/config/src/main/assembly/assembly.xml
@@ -55,9 +55,34 @@
             </includes>
         </fileSet>
         <fileSet>
-            <directory>${basedir}/src/main/resources/examples</directory>
-            <outputDirectory>examples</outputDirectory>
-            <includes/>
+            <directory>${basedir}/../filemgr/src/main/resources/examples</directory>
+            <outputDirectory>examples/filemgr</outputDirectory>
+            <includes>
+                <include>**/*</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>${basedir}/../filemgr/src/main/resources</directory>
+            <outputDirectory>examples/filemgr</outputDirectory>
+            <includes>
+                <include>filemgr.properties</include>
+                <include>logging.properties</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>${basedir}/../resource/src/main/resources/examples</directory>
+            <outputDirectory>examples/resmgr</outputDirectory>
+            <includes>
+                <include>**/*</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>${basedir}/../resource/src/main/resources</directory>
+            <outputDirectory>examples/resmgr</outputDirectory>
+            <includes>
+                <include>resource.properties</include>
+                <include>logging.properties</include>
+            </includes>
         </fileSet>
     </fileSets>
     <dependencySets>

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/java/org/apache/oodt/config/Constants.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/Constants.java b/config/src/main/java/org/apache/oodt/config/Constants.java
index 0453eaa..53a1116 100644
--- a/config/src/main/java/org/apache/oodt/config/Constants.java
+++ b/config/src/main/java/org/apache/oodt/config/Constants.java
@@ -38,7 +38,7 @@ public class Constants {
     public static final String DEFAULT_ENVIRONMENT = "default";
 
     /** The XML file name in which the configuration to be published to zookeeper is defined */
-    public static final String CONFIG_PUBLISHER_XML = "etc" + SEPARATOR + "config-publisher.xml";
+    public static final String DEFAULT_CONFIG_PUBLISHER_XML = "etc" + SEPARATOR + "config-publisher.xml";
 
     public static class Properties {
         /** The system property to be set in order to enable distributed configuration management */

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
index 81fe2af..a36aee2 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
@@ -161,7 +161,7 @@ public class DistributedConfigurationPublisher {
         for (Map.Entry<String, String> entry : fileMapping.entrySet()) {
             String filePath = entry.getKey();
             String relativeZNodePath = entry.getValue();
-            logger.info("Publishing configuration {} - {}", filePath, relativeZNodePath);
+            logger.info("Publishing configuration {} to {}", filePath, relativeZNodePath);
 
             String content = getFileContent(filePath);
 
@@ -174,9 +174,9 @@ public class DistributedConfigurationPublisher {
                 } else {
                     Stat stat = client.setData().forPath(zNodePath, content.getBytes());
                     if (stat != null) {
-                        logger.info("Published configuration file {} to {}", filePath, relativeZNodePath);
+                        logger.info("Replaced old published configuration at {} with content of file : {}", relativeZNodePath, filePath);
                     } else {
-                        logger.warn("Unable to publish configuration file {} to {}", filePath, relativeZNodePath);
+                        logger.warn("Unable to replace published configuration at {} with file: {}", relativeZNodePath, filePath);
                     }
                 }
             } else {
@@ -185,7 +185,7 @@ public class DistributedConfigurationPublisher {
                  * when no child node is present under them.
                  */
                 client.create().creatingParentContainersIfNeeded().forPath(zNodePath, content.getBytes());
-                logger.info("Replaced old published configuration at {} with content of file : {}", relativeZNodePath, filePath);
+                logger.info("Published configuration file {} to {}", filePath, relativeZNodePath);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java b/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java
index 32fd640..1ab1b30 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java
@@ -19,7 +19,6 @@ package org.apache.oodt.config.distributed.cli;
 
 import org.apache.oodt.cas.cli.action.CmdLineAction;
 import org.apache.oodt.cas.cli.exception.CmdLineActionException;
-import org.apache.oodt.config.Constants;
 import org.apache.oodt.config.distributed.DistributedConfigurationPublisher;
 import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;
@@ -27,6 +26,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 import java.util.Map;
 
+import static org.apache.oodt.config.Constants.DEFAULT_CONFIG_PUBLISHER_XML;
 import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
 
 /**
@@ -41,6 +41,8 @@ public class CLIAction extends CmdLineAction {
     }
 
     private String connectString;
+    private String configFile = DEFAULT_CONFIG_PUBLISHER_XML;
+
     private Action action;
 
     public CLIAction(Action action) {
@@ -50,7 +52,7 @@ public class CLIAction extends CmdLineAction {
     @Override
     public void execute(ActionMessagePrinter printer) throws CmdLineActionException {
         try {
-            ApplicationContext applicationContext = new ClassPathXmlApplicationContext(Constants.CONFIG_PUBLISHER_XML);
+            ApplicationContext applicationContext = new ClassPathXmlApplicationContext(configFile);
             Map distributedConfigurationPublisher = applicationContext.getBeansOfType(DistributedConfigurationPublisher.class);
 
             for (Object bean : distributedConfigurationPublisher.values()) {
@@ -113,4 +115,12 @@ public class CLIAction extends CmdLineAction {
         System.setProperty(ZK_CONNECT_STRING, connectString);
         this.connectString = connectString;
     }
+
+    public String getConfigFile() {
+        return configFile;
+    }
+
+    public void setConfigFile(String configFile) {
+        this.configFile = configFile;
+    }
 }

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java b/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
index 6f2ff27..c559f55 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/utils/CuratorUtils.java
@@ -187,7 +187,7 @@ public class CuratorUtils {
             }
             logger.debug("Deleted children ZNodes of {}", parentZNodePath);
         } else {
-            logger.warn("ZNode - {} doesn't exist. Nothing to delete");
+            logger.warn("ZNode - {} doesn't exist. Nothing to delete", parentZNodePath);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/cmd-line-options.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/cmd-line-options.xml b/config/src/main/resources/cmd-line-options.xml
index 9aff21e..698ad32 100644
--- a/config/src/main/resources/cmd-line-options.xml
+++ b/config/src/main/resources/cmd-line-options.xml
@@ -29,7 +29,11 @@
         <property name="requirementRules">
             <list>
                 <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-                      p:actionName="publishConfiguration" p:relation="REQUIRED"/>
+                      p:actionName="publish" p:relation="REQUIRED"/>
+                <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+                      p:actionName="clear" p:relation="REQUIRED"/>
+                <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+                      p:actionName="verify" p:relation="REQUIRED"/>
             </list>
         </property>
         <property name="handler">
@@ -47,4 +51,35 @@
             </bean>
         </property>
     </bean>
+
+    <bean id="publisherXML" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+        <property name="shortOption" value="c"/>
+        <property name="longOption" value="config"/>
+        <property name="description" value="Configuration publisher spring configuration XML"/>
+        <property name="hasArgs" value="true"/>
+        <property name="requirementRules">
+            <list>
+                <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+                      p:actionName="publish" p:relation="OPTIONAL"/>
+                <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+                      p:actionName="clear" p:relation="OPTIONAL"/>
+                <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+                      p:actionName="verify" p:relation="OPTIONAL"/>
+            </list>
+        </property>
+        <property name="handler">
+            <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
+                <property name="applyToActions">
+                    <list>
+                        <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+                              p:actionName="publish" p:methodName="setConfigFile"/>
+                        <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+                              p:actionName="verify" p:methodName="setConfigFile"/>
+                        <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+                              p:actionName="clear" p:methodName="setConfigFile"/>
+                    </list>
+                </property>
+            </bean>
+        </property>
+    </bean>
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/config-publisher.xml b/config/src/main/resources/config-publisher.xml
index 88ba33b..d5b387a 100644
--- a/config/src/main/resources/config-publisher.xml
+++ b/config/src/main/resources/config-publisher.xml
@@ -19,22 +19,56 @@
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
 
-    <!-- Configuration publisher for File Manager OODT Component -->
+    <!-- File Manager example configuration publisher -->
     <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
         <constructor-arg value="FILE_MANAGER"/>
         <property name="propertiesFiles">
             <map key-type="java.lang.String" value-type="java.lang.String">
                 <entry key="examples/filemgr/filemgr.properties" value="/etc/filemgr.properties"/>
+                <entry key="examples/filemgr/logging.properties" value="/etc/logging.properties"/>
             </map>
         </property>
         <property name="configFiles">
             <map key-type="java.lang.String" value-type="java.lang.String">
-                <entry key="examples/filemgr/mime-types.xml" value="/etc/mime-types.xml"/>
-                <entry key="examples/filemgr/cmd-line-actions.xml" value="/policy/cmd-line-actions.xml"/>
-                <entry key="examples/filemgr/cmd-line-options.xml" value="/policy/cmd-line-options.xml"/>
-                <entry key="examples/filemgr/oodt/elements.xml" value="/policy/oodt/elements.xml"/>
-                <entry key="examples/filemgr/oodt/product-types.xml" value="/policy/oodt/product-types.xml"/>
-                <entry key="examples/filemgr/oodt/product-type-element-map.xml" value="/policy/oodt/product-type-element-map.xml"/>
+                <!-- Examples - Core-->
+                <entry key="examples/filemgr/core/elements.xml" value="/policy/core/elements.xml"/>
+                <entry key="examples/filemgr/core/product-types.xml" value="/policy/core/product-types.xml"/>
+                <entry key="examples/filemgr/core/product-type-element-map.xml" value="/policy/core/product-type-element-map.xml"/>
+
+                <!-- Examples - Geo-->
+                <entry key="examples/filemgr/geo/elements.xml" value="/policy/geo/elements.xml"/>
+                <entry key="examples/filemgr/geo/product-types.xml" value="/policy/geo/product-types.xml"/>
+                <entry key="examples/filemgr/geo/product-type-element-map.xml" value="/policy/geo/product-type-element-map.xml"/>
+
+                <!-- Examples - Trace-->
+                <entry key="examples/filemgr/trace/elements.xml" value="/policy/trace/elements.xml"/>
+                <entry key="examples/filemgr/trace/product-types.xml" value="/policy/trace/product-types.xml"/>
+                <entry key="examples/filemgr/trace/product-type-element-map.xml" value="/policy/trace/product-type-element-map.xml"/>
+            </map>
+        </property>
+    </bean>
+
+    <!-- Resource Manager example configuration publisher -->
+    <bean id="resmgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
+        <constructor-arg value="RESOURCE_MANAGER"/>
+        <property name="propertiesFiles">
+            <map key-type="java.lang.String" value-type="java.lang.String">
+                <entry key="examples/resmgr/resource.properties" value="/etc/resource.properties"/>
+                <entry key="examples/resmgr/logging.properties" value="/etc/logging.properties"/>
+            </map>
+        </property>
+        <property name="configFiles">
+            <map key-type="java.lang.String" value-type="java.lang.String">
+                <entry key="examples/resmgr/node-to-queue-mapping.xml" value="/policy/node-to-queue-mapping.xml"/>
+                <entry key="examples/resmgr/nodes.xml" value="/policy/nodes.xml"/>
+                <entry key="examples/resmgr/queue-to-backend-mapping.xml" value="/policy/queue-to-backend-mapping.xml"/>
+
+                <entry key="examples/resmgr/jobs/exJob.xml" value="/policy/jobs/exJob.xml"/>
+                <entry key="examples/resmgr/jobs/exLongJob.xml" value="/policy/jobs/exLongJob.xml"/>
+                <entry key="examples/resmgr/jobs/exPalindrome.xml" value="/policy/jobs/exPalindrome.xml"/>
+                <entry key="examples/resmgr/jobs/exSparkJob.xml" value="/policy/jobs/exSparkJob.xml"/>
+                <entry key="examples/resmgr/jobs/exSparkPalindrome.xml" value="/policy/jobs/exSparkPalindrome.xml"/>
+                <entry key="examples/resmgr/jobs/exStreamingPalindrome.xml" value="/policy/jobs/exStreamingPalindrome.xml"/>
             </map>
         </property>
     </bean>

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/examples/filemgr/cmd-line-actions.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/filemgr/cmd-line-actions.xml b/config/src/main/resources/examples/filemgr/cmd-line-actions.xml
deleted file mode 100755
index cf66c9d..0000000
--- a/config/src/main/resources/examples/filemgr/cmd-line-actions.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<?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.
-
-  Author: bfoster (Brian Foster)
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
-    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
-
-    <bean id="addProductType" class="org.apache.oodt.cas.filemgr.cli.action.AddProductTypeCliAction">
-        <property name="description" value="Adds a ProductType to list of supported ProductTypes" />
-    </bean>
-  <bean id="deleteProductByName" class="org.apache.oodt.cas.filemgr.cli.action.DeleteProductByNameCliAction">
-    <property name="description" value="Delete Product by name" />
-  </bean>
-  <bean id="deleteProductById" class="org.apache.oodt.cas.filemgr.cli.action.DeleteProductByIdCliAction">
-    <property name="description" value="Delete Product by ID" />
-  </bean>
-  <bean id="dumpMetadata" class="org.apache.oodt.cas.filemgr.cli.action.DumpMetadataCliAction">
-    <property name="description" value="Dumps Product Metadata out to XML" />
-  </bean>
-    <bean id="getCurrentTransfer" class="org.apache.oodt.cas.filemgr.cli.action.GetCurrentTransferCliAction">
-    <property name="description" value="Gets the status of the current Product file transfer" />
-  </bean>
-  <bean id="getCurrentTransfers" class="org.apache.oodt.cas.filemgr.cli.action.GetCurrentTransfersCliAction">
-    <property name="description" value="Gets the status of the current Product file transfers" />
-  </bean>
-  <bean id="getFilePercentTransferred" class="org.apache.oodt.cas.filemgr.cli.action.GetFilePercentTransferredCliAction">
-    <property name="description" value="Gets the percent amount transferred of given file" />
-  </bean>
-  <bean id="getFirstPage" class="org.apache.oodt.cas.filemgr.cli.action.GetFirstPageCliAction">
-    <property name="description" value="Gets first page of Products of given ProductType" />
-  </bean>
-  <bean id="getLastPage" class="org.apache.oodt.cas.filemgr.cli.action.GetLastPageCliAction">
-    <property name="description" value="Gets last page of Products of given ProductType" />
-  </bean>
-  <bean id="getNextPage" class="org.apache.oodt.cas.filemgr.cli.action.GetNextPageCliAction">
-    <property name="description" value="Gets next page of Products of given ProductType" />
-  </bean>
-  <bean id="getNumProducts" class="org.apache.oodt.cas.filemgr.cli.action.GetNumProductsCliAction">
-    <property name="description" value="Gets number of Products ingested for a given ProductType" />
-  </bean>
-  <bean id="getPrevPage" class="org.apache.oodt.cas.filemgr.cli.action.GetPrevPageCliAction">
-    <property name="description" value="Gets prev page of Products of given ProductType" />
-  </bean>
-  <bean id="getProductByName" class="org.apache.oodt.cas.filemgr.cli.action.GetProductByNameCliAction">
-    <property name="description" value="Get Product info by name" />
-  </bean>
-  <bean id="getProductById" class="org.apache.oodt.cas.filemgr.cli.action.GetProductByIdCliAction">
-    <property name="description" value="Gets Product info by ID" />
-  </bean>
-  <bean id="getProductPercentTransferred" class="org.apache.oodt.cas.filemgr.cli.action.GetProductPercentTransferredCliAction">
-    <property name="description" value="Gets percent amount transferred of a Products data files" />
-  </bean>
-  <bean id="getProductTypeByName" class="org.apache.oodt.cas.filemgr.cli.action.GetProductTypeByNameCliAction">
-    <property name="description" value="Gets a ProductType by its name" />
-  </bean>
-  <bean id="hasProduct" class="org.apache.oodt.cas.filemgr.cli.action.HasProductCliAction">
-    <property name="description" value="Checks if Product with given name has been ingested" />
-  </bean>
-  <bean id="ingestProduct" class="org.apache.oodt.cas.filemgr.cli.action.IngestProductCliAction">
-    <property name="description" value="Ingests a Product" />
-  </bean>
-  <bean id="luceneQuery" class="org.apache.oodt.cas.filemgr.cli.action.LuceneQueryCliAction">
-    <property name="description" value="Queries by parsing an Lucene-like query into a FileManager Query" />
-  </bean>
-  <bean id="retrieveFilesById" class="org.apache.oodt.cas.filemgr.cli.action.RetrieveFilesCliAction">
-    <property name="description" value="Retrieve a Product's files by Product ID" />
-  </bean>
-  <bean id="retrieveFilesByName" class="org.apache.oodt.cas.filemgr.cli.action.RetrieveFilesCliAction">
-    <property name="description" value="Retrieve a Product's files by Product name" />
-  </bean>
-  <bean id="sqlQuery" class="org.apache.oodt.cas.filemgr.cli.action.SqlQueryCliAction">
-    <property name="description" value="Queries by parsing an SQL-like query into a FileManager Query" />
-    <property name="detailedDescription">
-      <value>
- This supports sending queries to the FileManager in form of
-  SELECT [Elements] FROM [ProductTypes] WHERE [where-clause], where:
-   - [Elements]: is a comma separated list of Element names; may also be * which
-    represents all Elements
-   - [ProductTypes]: is a comma separated list of ProductType names; may also
-    be * which represents all ProductTypes
-   - [where-clause]: is an optional Element name filter supporting the following:
-      * AND and OR boolean operators
-      * () grouping of queries
-      * element-name == 'element-value'
-      * element-name &#60; 'element-value'
-      * element-name &#62; 'element-value'
-      * element-name &#60;= 'element-value'
-      * element-name &#62;= 'element-value'"
-
- An additional post-query FilterAlgor can also be specified where you specify
-  which Metadata fields which should be used as each Product's StartDateTime,
-  EndDateTime, and Priority values
-      </value>
-    </property>
-    <property name="examples">
-      <value>
- (Assume you have a ProductType, GenericFile, which supports the
-    Elements: Filename, NominalDate, Group, and DataVersion)
-  $ ./filemgr-client -u http://localhost:9000 -op -sql
-    -q "SELECT Filename FROM GenericFile WHERE (NominalDate == '2011-20-10' OR
-      NominalDate == '2011-20-11') AND Group == 'Test' AND DataVersion > '1.0'"
- (Returns all Products in FileManager -- use with care)
-  $ ./filemgr-client -u http://localhost:9000 -op -sql -q "SELECT * FROM *"
-      </value>
-    </property>
-  </bean>
-</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/examples/filemgr/cmd-line-options.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/filemgr/cmd-line-options.xml b/config/src/main/resources/examples/filemgr/cmd-line-options.xml
deleted file mode 100755
index 227def2..0000000
--- a/config/src/main/resources/examples/filemgr/cmd-line-options.xml
+++ /dev/null
@@ -1,1175 +0,0 @@
-<?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.
-
-  Author: bfoster (Brian Foster)
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
-    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
-
-    <bean id="url" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-        <property name="shortOption" value="u" />
-        <property name="longOption" value="url" />
-        <property name="description" value="File Manager URL" />
-        <property name="hasArgs" value="true" />
-        <property name="argsDescription" value="url" />
-        <property name="required" value="true" />
-        <property name="handler">
-            <bean
-                class="org.apache.oodt.cas.cli.option.handler.SetJavaPropertiesHandler">
-                <property name="propertyNames">
-                    <list>
-                        <value>org.apache.oodt.cas.filemgr.url</value>
-                    </list>
-                </property>
-            </bean>
-        </property>
-    </bean>
-
-    <bean id="operation" class="org.apache.oodt.cas.cli.option.GroupCmdLineOption">
-        <property name="shortOption" value="op" />
-        <property name="longOption" value="operation" />
-        <property name="description"
-            value="Declare that you wish to present an operation" />
-        <property name="hasArgs" value="false" />
-        <property name="required" value="true" />
-        <property name="subOptions">
-            <list>
-                <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-                    p:option-ref="addProductType" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="deleteProductById" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="deleteProductByName" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="ingestProduct" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="hasProduct" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="getProductTypeByName" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="getNumProducts" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="getFirstPage" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="getNextPage" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="getPrevPage" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="getLastPage" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="getCurrentTransfer" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="getCurrentTransfers" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="getProductById" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="getProductByName" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="getProductPctTransferred" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="getFilePctTransferred" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="sqlQuery" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="dumpMetadata" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="luceneQuery" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="retrieveFilesById" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="retrieveFilesByName" p:required="false" />
-            </list>
-        </property>
-    </bean>
-
-    <!-- AddProductType Options -->
-    <bean id="addProductType" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-        p:isSubOption="true">
-        <property name="shortOption" value="addPT" />
-        <property name="longOption" value="addProductType" />
-        <property name="description" value="Triggers addProductType Action" />
-        <property name="hasArgs" value="false" />
-        <property name="staticArgs">
-            <list>
-                <value>addProductType</value>
-            </list>
-        </property>
-        <property name="requirementRules">
-            <list>
-                <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-                    p:actionName="addProductType" p:relation="REQUIRED" />
-            </list>
-        </property>
-    </bean>
-
-  <bean id="typeName" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="tn" />
-    <property name="longOption" value="typeName" />
-    <property name="description" value="ProductType name" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="product-type-name" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="addProductType" p:relation="REQUIRED" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
-        <property name="applyToActions">
-          <list>
-            <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
-              p:actionName="addProductType" p:methodName="setProductTypeName" />
-          </list>
-        </property>
-      </bean>
-    </property>
-  </bean>
-
-  <bean id="typeDesc" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="td" />
-    <property name="longOption" value="typeDesc" />
-    <property name="description" value="ProductType description" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="description" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="addProductType" p:relation="REQUIRED" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
-        <property name="applyToActions">
-          <list>
-            <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
-              p:actionName="addProductType" p:methodName="setProductTypeDescription" />
-          </list>
-        </property>
-      </bean>
-    </property>
-  </bean>
-
-  <bean id="repository" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="repo" />
-    <property name="longOption" value="repository" />
-    <property name="description" value="ProductType repository" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="file-path" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="addProductType" p:relation="REQUIRED" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
-        <property name="applyToActions">
-          <list>
-            <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
-              p:actionName="addProductType" p:methodName="setFileRepositoryPath" />
-          </list>
-        </property>
-      </bean>
-    </property>
-  </bean>
-
-  <bean id="versionClass" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="vc" />
-    <property name="longOption" value="versionClass" />
-    <property name="description" value="ProductType versioner class" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="classpath" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="addProductType" p:relation="REQUIRED" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
-        <property name="applyToActions">
-          <list>
-            <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
-              p:actionName="addProductType" p:methodName="setVersioner" />
-          </list>
-        </property>
-      </bean>
-    </property>
-  </bean>
-
-  <!-- IngestProduct Options -->
-  <bean id="ingestProduct" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="ingest" />
-    <property name="longOption" value="ingestProduct" />
-    <property name="description" value="Triggers ingestProduct Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>ingestProduct</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="ingestProduct" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <bean id="productStructure" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="ps" />
-    <property name="longOption" value="productStructure" />
-    <property name="description" value="Hierarchical | Flat" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="structure-type" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="ingestProduct" p:relation="REQUIRED" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
-        <property name="applyToActions">
-          <list>
-            <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
-              p:actionName="ingestProduct" p:methodName="setProductStructure" />
-          </list>
-        </property>
-      </bean>
-    </property>
-  </bean>
-
-  <bean id="metadataFile" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="mf" />
-    <property name="longOption" value="metadataFile" />
-    <property name="description" value="Metadata XML file path or URL" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="file-path-or-url" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="ingestProduct" p:relation="REQUIRED" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-
-  <bean id="clientTransfer" class="org.apache.oodt.cas.cli.option.GroupCmdLineOption">
-    <property name="shortOption" value="ct" />
-    <property name="longOption" value="clientTransfer" />
-    <property name="description" value="User client transferer" />
-    <property name="hasArgs" value="false" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="ingestProduct" p:relation="OPTIONAL" />
-      </list>
-    </property>
-    <property name="subOptions">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="dataTransfer" p:required="true" />
-      </list>
-    </property>
-  </bean>
-
-  <bean id="dataTransfer" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"
-      p:isSubOption="true">
-    <property name="shortOption" value="dt" />
-    <property name="longOption" value="dataTransfer" />
-    <property name="description" value="DataTransferer factory class" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="classpath" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="ingestProduct" p:relation="REQUIRED" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
-        <property name="applyToActions">
-          <list>
-            <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
-              p:actionName="ingestProduct" p:methodName="setDataTransferer" />
-          </list>
-        </property>
-      </bean>
-    </property>
-  </bean>
-
-  <bean id="refs" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="rs" />
-    <property name="longOption" value="refs" />
-    <property name="description" value="Data file path or URL" />
-    <property name="type" value="java.util.List" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="file-path-or-url" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="ingestProduct" p:relation="REQUIRED" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
-        <property name="applyToActions">
-          <list>
-            <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
-              p:actionName="ingestProduct" p:methodName="setReferences" />
-          </list>
-        </property>
-      </bean>
-    </property>
-  </bean>
-
-  <!-- HasProduct Options -->
-  <bean id="hasProduct" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="product" />
-    <property name="longOption" value="hasProduct" />
-    <property name="description" value="Triggers hasProduct Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>hasProduct</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="hasProduct" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <!-- GetProductTypeByName Options -->
-  <bean id="getProductTypeByName" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="ptbyn" />
-    <property name="longOption" value="getProductTypeByName" />
-    <property name="description" value="Triggers getProductTypeByName Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>getProductTypeByName</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getProductTypeByName" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <!-- GetNumProducts Options -->
-  <bean id="getNumProducts" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="num" />
-    <property name="longOption" value="getNumProducts" />
-    <property name="description" value="Triggers getNumProducts Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>getNumProducts</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getNumProducts" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <!-- GetFirstPage Options -->
-  <bean id="getFirstPage" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="page1" />
-    <property name="longOption" value="getFirstPage" />
-    <property name="description" value="Triggers getFirstPage Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>getFirstPage</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getFirstPage" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <!-- GetNextPage Options -->
-  <bean id="getNextPage" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="next" />
-    <property name="longOption" value="getNextPage" />
-    <property name="description" value="Triggers getNextPage Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>getNextPage</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getNextPage" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <!-- GetPrevPage Options -->
-  <bean id="getPrevPage" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="prev" />
-    <property name="longOption" value="getPrevPage" />
-    <property name="description" value="Triggers getPrevPage Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>getPrevPage</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getPrevPage" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <!-- GetLastPage Options -->
-  <bean id="getLastPage" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="last" />
-    <property name="longOption" value="getLastPage" />
-    <property name="description" value="Triggers getLastPage Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>getLastPage</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getLastPage" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <!-- GetCurrentTransfer Options -->
-  <bean id="getCurrentTransfer" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="curTran" />
-    <property name="longOption" value="getCurrentTransfer" />
-    <property name="description" value="Triggers getCurrentTransfer Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>getCurrentTransfer</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getCurrentTransfer" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <!-- GetCurrentTransfers Options -->
-  <bean id="getCurrentTransfers" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="curTrans" />
-    <property name="longOption" value="getCurrentTransfers" />
-    <property name="description" value="Triggers getCurrentTransfers Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>getCurrentTransfers</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getCurrentTransfers" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <!-- GetProductPercentTransferred Options -->
-  <bean id="getProductPctTransferred" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="pctTrans" />
-    <property name="longOption" value="getProductPctTransferred" />
-    <property name="description" value="Triggers getProductPercentTransferred Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>getProductPercentTransferred</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getProductPercentTransferred" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <!-- GetFilePercentTransferred Options -->
-  <bean id="getFilePctTransferred" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="filePctTrans" />
-    <property name="longOption" value="getFilePctTransferred" />
-    <property name="description" value="Triggers getFilePercentTransferred Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>getFilePercentTransferred</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getFilePercentTransferred" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <bean id="origRef" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="or" />
-    <property name="longOption" value="origRef" />
-    <property name="description" value="Original reference" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="file-path-or-url" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getFilePercentTransferred" p:relation="REQUIRED" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-
-  <!-- SqlQuery Options -->
-  <bean id="sqlQuery" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="sql" />
-    <property name="longOption" value="sqlQuery" />
-    <property name="description" value="Triggers sqlQuery Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>sqlQuery</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="sqlQuery" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-
-
-  <!-- GetProductById Options -->
-  <bean id="getProductById" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="pbyid" />
-    <property name="longOption" value="getProductById" />
-    <property name="description" value="Triggers getProductById Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>getProductById</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getProductById" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <!-- GetProductByName Options -->
-  <bean id="getProductByName" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="pbyn" />
-    <property name="longOption" value="getProductByName" />
-    <property name="description" value="Triggers getProductByName Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>getProductByName</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getProductByName" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <!-- DeleteProductById Options -->
-  <bean id="deleteProductById" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="dbyid" />
-    <property name="longOption" value="deleteProductById" />
-    <property name="description" value="Triggers deleteProductById Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>deleteProductById</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="deleteProductById" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <!-- DeleteProductByName Options -->
-  <bean id="deleteProductByName" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="dbyn" />
-    <property name="longOption" value="deleteProductByName" />
-    <property name="description" value="Triggers deleteProductByName Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>deleteProductByName</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="deleteProductByName" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <!-- DumpMetadata Options -->
-  <bean id="dumpMetadata" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="dmet" />
-    <property name="longOption" value="dumpMetadata" />
-    <property name="description" value="Triggers dumpMetadata Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>dumpMetadata</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="dumpMetadata" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <bean id="outputDir" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="out" />
-    <property name="longOption" value="outputDir" />
-    <property name="description" value="Output directory" />
-    <property name="type" value="java.io.File" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="file-dir" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="dumpMetadata" p:relation="OPTIONAL" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-
-  <!-- LuceneQuery Options -->
-  <bean id="luceneQuery" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="lucene" />
-    <property name="longOption" value="luceneQuery" />
-    <property name="description" value="Triggers luceneQuery Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>luceneQuery</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="luceneQuery" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <bean id="reducedProductTypes" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="pts" />
-    <property name="longOption" value="reducedProductTypes" />
-    <property name="description" value="Limit query ProductTypes queried against" />
-    <property name="type" value="java.util.List" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="list-of-product-types" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="luceneQuery" p:relation="OPTIONAL" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-
-  <bean id="reducedMetadataKeys" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="metKeys" />
-    <property name="longOption" value="reducedMetadataKeys" />
-    <property name="description" value="Limit Elements returned by query" />
-    <property name="type" value="java.util.List" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="list-of-elements" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="luceneQuery" p:relation="OPTIONAL" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-
-  <!-- retrieveFiles Options -->
-  <bean id="retrieveFilesById" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="rfbyid" />
-    <property name="longOption" value="retrieveFilesById" />
-    <property name="description" value="Triggers retrieveFilesById Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>retrieveFilesById</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="retrieveFilesById" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <bean id="retrieveFilesByName" class="org.apache.oodt.cas.cli.option.ActionCmdLineOption"
-    p:isSubOption="true">
-    <property name="shortOption" value="rfbyn" />
-    <property name="longOption" value="retrieveFilesByName" />
-    <property name="description" value="Triggers retrieveFilesByName Action" />
-    <property name="hasArgs" value="false" />
-    <property name="staticArgs">
-      <list>
-        <value>retrieveFilesByName</value>
-      </list>
-    </property>
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="retrieveFilesByName" p:relation="REQUIRED" />
-      </list>
-    </property>
-  </bean>
-
-  <bean id="transferer" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="trans" />
-    <property name="longOption" value="transferer" />
-    <property name="description" value="Factory for creating DataTransfer which will perform the file transfer(s)" />
-    <property name="type" value="org.apache.oodt.cas.filemgr.datatransfer.DataTransferFactory" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="transfer factory class" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="retrieveFilesById" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="retrieveFilesByName" p:relation="REQUIRED" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
-        <property name="applyToActions">
-          <list>
-            <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
-              p:actionName="retrieveFilesById" p:methodName="setDataTransferFactory" />
-            <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
-              p:actionName="retrieveFilesByName" p:methodName="setDataTransferFactory" />
-          </list>
-        </property>
-      </bean>
-    </property>
-  </bean>
-
-  <bean id="destination" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="dest" />
-    <property name="longOption" value="destination" />
-    <property name="description" value="Directory to transfer Product file to" />
-    <property name="type" value="java.io.File" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="directory" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="retrieveFilesById" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="retrieveFilesByName" p:relation="REQUIRED" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-
-    <!-- Options used for multiple Actions -->
-  <bean id="productId" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="pid" />
-    <property name="longOption" value="productId" />
-    <property name="description" value="Product ID" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="product-id" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getProductPercentTransferred" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getProductById" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="deleteProductById" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="dumpMetadata" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="retrieveFilesById" p:relation="REQUIRED" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-    
-  <bean id="productName" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="pn" />
-    <property name="longOption" value="productName" />
-    <property name="description" value="Product name" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="product-name" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="ingestProduct" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="hasProduct" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getProductByName" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="deleteProductByName" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="retrieveFilesByName" p:relation="REQUIRED" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-
-  <bean id="productTypeName" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="ptn" />
-    <property name="longOption" value="productTypeName" />
-    <property name="description" value="ProductType name" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="product-type-name" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="ingestProduct" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getProductTypeByName" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getNumProducts" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getFirstPage" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getNextPage" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getPrevPage" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getLastPage" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getProductPercentTransferred" p:relation="REQUIRED" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-  
-  <bean id="currentPageNum" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="curPage" />
-    <property name="longOption" value="currentPageNum" />
-    <property name="description" value="Current Page Number" />
-    <property name="type" value="int" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="page-number" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getNextPage" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="getPrevPage" p:relation="REQUIRED" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-
-  <bean id="query" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="q" />
-    <property name="longOption" value="query" />
-    <property name="description" value="File Manager query" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="query" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="sqlQuery" p:relation="REQUIRED" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="luceneQuery" p:relation="REQUIRED" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-
-  <bean id="sortBy" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="sb" />
-    <property name="longOption" value="sortBy" />
-    <property name="description" value="Metadata field to sort query results by" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="metadata field" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="sqlQuery" p:relation="OPTIONAL" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="luceneQuery" p:relation="OPTIONAL" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-
-  <bean id="outputFormat" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="of" />
-    <property name="longOption" value="outputFormat" />
-    <property name="description" value="Output format string (i.e. Filename = $Filename)" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="output-format-string" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="sqlQuery" p:relation="OPTIONAL" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="luceneQuery" p:relation="OPTIONAL" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-
-  <bean id="delimiter" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
-    <property name="shortOption" value="dlmtr" />
-    <property name="longOption" value="delimiter" />
-    <property name="description" value="String to use the separate query results" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="delimiter-string" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="sqlQuery" p:relation="OPTIONAL" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="luceneQuery" p:relation="OPTIONAL" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-
-  <bean id="filter" class="org.apache.oodt.cas.cli.option.GroupCmdLineOption">
-    <property name="shortOption" value="f" />
-    <property name="longOption" value="filter" />
-    <property name="description" value="Query filter" />
-    <property name="hasArgs" value="false" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="sqlQuery" p:relation="OPTIONAL" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="luceneQuery" p:relation="OPTIONAL" />
-      </list>
-    </property>
-    <property name="subOptions">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="algor" p:required="true" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="converter" p:required="false" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="startDateTimeMetKey" p:required="true" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="endDateTimeMetKey" p:required="true" />
-        <bean class="org.apache.oodt.cas.cli.option.GroupSubOption"
-          p:option-ref="priorityMetKey" p:required="true" />
-      </list>
-    </property>
-  </bean>
-
-  <bean id="algor" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"
-      p:isSubOption="true">
-    <property name="shortOption" value="algor" />
-    <property name="longOption" value="algor" />
-    <property name="description" value="FilterAlgor class" />
-    <property name="type" value="org.apache.oodt.cas.filemgr.structs.query.filter.FilterAlgor" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="classpath" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="sqlQuery" p:relation="OPTIONAL" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="luceneQuery" p:relation="OPTIONAL" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-  
-  <bean id="converter" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"
-      p:isSubOption="true">
-    <property name="shortOption" value="conv" />
-    <property name="longOption" value="converter" />
-    <property name="description" value="VersionConverter class" />
-    <property name="type" value="org.apache.oodt.cas.filemgr.structs.query.conv.VersionConverter" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="classpath" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="sqlQuery" p:relation="OPTIONAL" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="luceneQuery" p:relation="OPTIONAL" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-
-  <bean id="startDateTimeMetKey" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"
-      p:isSubOption="true">
-    <property name="shortOption" value="sdtMetKey" />
-    <property name="longOption" value="startDateTimeMetKey" />
-    <property name="description" value="Start date time metadata key" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="metadata-key" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="sqlQuery" p:relation="OPTIONAL" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="luceneQuery" p:relation="OPTIONAL" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-  
-  <bean id="endDateTimeMetKey" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"
-      p:isSubOption="true">
-    <property name="shortOption" value="edtMetKey" />
-    <property name="longOption" value="endDateTimeMetKey" />
-    <property name="description" value="End date time metadata key" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="metadata-key" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="sqlQuery" p:relation="OPTIONAL" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="luceneQuery" p:relation="OPTIONAL" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-  
-  <bean id="priorityMetKey" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption"
-      p:isSubOption="true">
-    <property name="shortOption" value="prMetKey" />
-    <property name="longOption" value="priorityMetKey" />
-    <property name="description" value="Priority metadata key" />
-    <property name="hasArgs" value="true" />
-    <property name="argsDescription" value="metadata-key" />
-    <property name="requirementRules">
-      <list>
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="sqlQuery" p:relation="OPTIONAL" />
-        <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
-          p:actionName="luceneQuery" p:relation="OPTIONAL" />
-      </list>
-    </property>
-    <property name="handler">
-      <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler" />
-    </property>
-  </bean>
-</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/examples/filemgr/filemgr.properties
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/filemgr/filemgr.properties b/config/src/main/resources/examples/filemgr/filemgr.properties
deleted file mode 100644
index 4d8d957..0000000
--- a/config/src/main/resources/examples/filemgr/filemgr.properties
+++ /dev/null
@@ -1,114 +0,0 @@
-#
-# 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.
-#
-
-# Configuration properties for the File Manager
-
-# repository factory
-filemgr.repository.factory=org.apache.oodt.cas.filemgr.repository.XMLRepositoryManagerFactory
-
-# Lucene catalog factory
-filemgr.catalog.factory=org.apache.oodt.cas.filemgr.catalog.LuceneCatalogFactory
-
-# data transfer factory
-filemgr.datatransfer.factory=org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory
-
-# validation layer factory
-filemgr.validationLayer.factory=org.apache.oodt.cas.filemgr.validation.XMLValidationLayerFactory
-
-# xml rpc client configuration
-org.apache.oodt.cas.filemgr.system.xmlrpc.connectionTimeout.minutes=20
-org.apache.oodt.cas.filemgr.system.xmlrpc.requestTimeout.minutes=60
-#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retries=0
-#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retry.interval.seconds=3
-
-# mapped data source catalog configuration
-#org.apache.oodt.cas.filemgr.catalog.mappeddatasource.mapFile=/path/to/ops.catalog.typemap.properties
-
-# lucene catalog configuration
-org.apache.oodt.cas.filemgr.catalog.lucene.idxPath=[OODT_HOME]/data/catalog
-org.apache.oodt.cas.filemgr.catalog.lucene.pageSize=20
-org.apache.oodt.cas.filemgr.catalog.lucene.commitLockTimeout.seconds=60
-org.apache.oodt.cas.filemgr.catalog.lucene.writeLockTimeout.seconds=60
-org.apache.oodt.cas.filemgr.catalog.lucene.mergeFactor=20
-
-# XML repository manager configuration
-org.apache.oodt.cas.filemgr.repositorymgr.dirs=file:[FILEMGR_HOME]/policy/oodt
-
-# XML validation layer configuration
-org.apache.oodt.cas.filemgr.validation.dirs=file:[FILEMGR_HOME]/policy/oodt
-
-# remote data transfer configuration
-org.apache.oodt.cas.filemgr.datatransfer.remote.chunkSize=1024
-
-# location of Mime-Type repository
-org.apache.oodt.cas.filemgr.mime.type.repository=[FILEMGR_HOME]/etc/mime-types.xml
-
-
-############ data source configuration ##################################
-#
-# These 3 blocks of config properties can be used to setup a catalog,
-# repository manager, and validation layer based on a RDBMS such as
-# Oracle, MySQL, PostgreSQL, or any others that support a jdbc connection.
-# Just un-comment the following blocks of properties and configure as
-# needed.
-#
-#########################################################################
-
-# datasource catalog config
-#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.url=some_jdbc_url
-#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.user=user
-#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.pass=pass
-#org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.driver=driver.class.name
-#org.apache.oodt.cas.filemgr.catalog.datasource.quoteFields=false
-#org.apache.oodt.cas.filemgr.catalog.datasource.pageSize=20
-#org.apache.oodt.cas.filemgr.catalog.datasource.cacheUpdateMinutes=5
-
-# data source repository manager configuration
-#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.url=some_jdbc_url
-#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.user=user
-#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.pass=pass
-#org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.driver=driver.class.name
-
-# data source validation layer configuration
-#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.url=some_jdbc_url
-#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.user=user
-#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.pass=pass
-#org.apache.oodt.cas.filemgr.validation.datasource.jdbc.driver=driver.class.name
-#org.apache.oodt.cas.filemgr.validation.datasource.quoteFields=false
-
-
-# tells the file manager system layer to include product instance metadata
-# NOTE: here are the expected field mappings
-#
-# product.getProductId() -> ProductId
-# product.getProductName() -> ProductName
-# product.getProductStructure() -> ProductStructure
-# product.getTransferStatus() -> ProductTransferStatus
-# product.getRootRef() -> ProductRootReference
-
-# for the references returned by product.getProductReferences() the following
-# metadata fields will be added (order will be maintained, such that data store
-# ref at index 0 will map to orig ref at index 0, etc.)
-#
-# ProductDataStoreReferences (list of all data store references:
-# note already translated into path, not URI)
-# ProductOrigReferences (list of all orig references:
-# note already translated into path, not URI)
-# ProductMimeType (list of all references' mime-types)
-# ProductFileSize (list of all references' file sizes)
-
-org.apache.oodt.cas.filemgr.metadata.expandProduct=false
\ No newline at end of file


[6/8] oodt git commit: Added a File Manager test with distributed configuration management

Posted by ma...@apache.org.
Added a File Manager test with distributed configuration management


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

Branch: refs/heads/feature/zookeeper-config
Commit: e32f2bb0cec2c5908ce81bd55cf602d1655ad6fc
Parents: d2f2d49
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Sat Jul 29 20:51:35 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Sat Jul 29 20:51:35 2017 +0530

----------------------------------------------------------------------
 config/pom.xml                                  |   3 +-
 .../AbstractDistributedConfigurationTest.java   |  51 +++++
 .../AbstractDistributedConfigurationTest.java   |  53 -----
 .../DistributedConfigurationManagerTest.java    |  23 ++-
 .../DistributedConfigurationPublisherTest.java  |  17 ++
 core/pom.xml                                    |   7 +-
 filemgr/pom.xml                                 |   4 +-
 .../TestDistributedXmlRpcFileManager.java       | 200 +++++++++++++++++++
 .../distributed/config/cmd-line-actions.xml     |  38 ++++
 .../distributed/config/cmd-line-options.xml     |  85 ++++++++
 .../distributed/config/config-publisher.xml     |  42 ++++
 .../distributed/config/filemgr.properties       | 157 +++++++++++++++
 filemgr/src/test/resources/filemgr.properties   | 155 --------------
 13 files changed, 614 insertions(+), 221 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/config/pom.xml
----------------------------------------------------------------------
diff --git a/config/pom.xml b/config/pom.xml
index 21d28d8..3380848 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -35,7 +35,6 @@
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
-            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
@@ -138,4 +137,4 @@
             </plugin>
         </plugins>
     </build>
-</project>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/config/src/main/java/org/apache/oodt/config/test/AbstractDistributedConfigurationTest.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/test/AbstractDistributedConfigurationTest.java b/config/src/main/java/org/apache/oodt/config/test/AbstractDistributedConfigurationTest.java
new file mode 100644
index 0000000..f8d421e
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/test/AbstractDistributedConfigurationTest.java
@@ -0,0 +1,51 @@
+/*
+ * 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.oodt.config.test;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.test.TestingServer;
+import org.apache.oodt.config.distributed.utils.CuratorUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
+
+public abstract class AbstractDistributedConfigurationTest {
+
+    protected static TestingServer zookeeper;
+    protected static CuratorFramework client;
+
+    @BeforeClass
+    public static void setUp() throws Exception {
+        zookeeper = new TestingServer();
+        zookeeper.start();
+
+        System.setProperty(ZK_CONNECT_STRING, zookeeper.getConnectString());
+
+        client = CuratorUtils.newCuratorFrameworkClient(zookeeper.getConnectString());
+        client.start();
+    }
+
+    @AfterClass
+    public static void tearDown() throws Exception {
+        System.clearProperty(ZK_CONNECT_STRING);
+
+        client.close();
+        zookeeper.stop();
+    }
+}

http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java b/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
deleted file mode 100644
index 27174ba..0000000
--- a/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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.oodt.config.distributed;
-
-import org.apache.curator.framework.CuratorFramework;
-import org.apache.curator.test.TestingServer;
-import org.apache.oodt.config.distributed.utils.CuratorUtils;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-
-import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
-
-public abstract class AbstractDistributedConfigurationTest {
-
-    protected static final String CONFIG_PUBLISHER_XML = "config-publisher.xml";
-
-    protected static TestingServer zookeeper;
-    protected static CuratorFramework client;
-
-    @BeforeClass
-    public static void setUp() throws Exception {
-        zookeeper = new TestingServer();
-        zookeeper.start();
-
-        System.setProperty(ZK_CONNECT_STRING, zookeeper.getConnectString());
-        System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "src/main/resources/cmd-line-actions.xml");
-        System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "src/main/resources/cmd-line-options.xml");
-
-        client = CuratorUtils.newCuratorFrameworkClient(zookeeper.getConnectString());
-        client.start();
-    }
-
-    @AfterClass
-    public static void tearDown() throws Exception {
-        client.close();
-        zookeeper.stop();
-    }
-}

http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
index d96767b..064d1c6 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
@@ -21,9 +21,10 @@ import org.apache.commons.io.FileUtils;
 import org.apache.oodt.config.ConfigurationManager;
 import org.apache.oodt.config.distributed.cli.ConfigPublisher;
 import org.apache.oodt.config.distributed.utils.FilePathUtils;
-import org.junit.AfterClass;
+import org.apache.oodt.config.test.AbstractDistributedConfigurationTest;
+import org.junit.After;
 import org.junit.Assert;
-import org.junit.BeforeClass;
+import org.junit.Before;
 import org.junit.Test;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -49,11 +50,14 @@ import static org.junit.Assert.fail;
  */
 public class DistributedConfigurationManagerTest extends AbstractDistributedConfigurationTest {
 
-    protected static List<DistributedConfigurationPublisher> publishers;
+    private static final String CONFIG_PUBLISHER_XML = "config-publisher.xml";
 
-    @BeforeClass
-    public static void setUp() throws Exception {
-        AbstractDistributedConfigurationTest.setUp();
+    private List<DistributedConfigurationPublisher> publishers;
+
+    @Before
+    public void setUpTest() throws Exception {
+        System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "src/main/resources/cmd-line-actions.xml");
+        System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "src/main/resources/cmd-line-options.xml");
 
         ConfigPublisher.main(new String[]{
                 "-connectString", zookeeper.getConnectString(),
@@ -113,8 +117,8 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
         }
     }
 
-    @AfterClass
-    public static void tearDown() throws Exception {
+    @After
+    public void tearDownTest() throws Exception {
         for (DistributedConfigurationPublisher publisher : publishers) {
             publisher.destroy();
 
@@ -144,6 +148,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
                 "-a", "clear"
         });
 
-        AbstractDistributedConfigurationTest.tearDown();
+        System.clearProperty("org.apache.oodt.cas.cli.action.spring.config");
+        System.clearProperty("org.apache.oodt.cas.cli.option.spring.config");
     }
 }

http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
index 24a43e3..b77683c 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
@@ -19,7 +19,10 @@ package org.apache.oodt.config.distributed;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.oodt.config.distributed.cli.ConfigPublisher;
+import org.apache.oodt.config.test.AbstractDistributedConfigurationTest;
+import org.junit.After;
 import org.junit.Assert;
+import org.junit.Before;
 import org.junit.Test;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -36,6 +39,20 @@ import java.util.Map;
  */
 public class DistributedConfigurationPublisherTest extends AbstractDistributedConfigurationTest {
 
+    private static final String CONFIG_PUBLISHER_XML = "config-publisher.xml";
+
+    @Before
+    public void setUpTest() {
+        System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "src/main/resources/cmd-line-actions.xml");
+        System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "src/main/resources/cmd-line-options.xml");
+    }
+
+    @After
+    public void tearDownTest() {
+        System.clearProperty("org.apache.oodt.cas.cli.action.spring.config");
+        System.clearProperty("org.apache.oodt.cas.cli.option.spring.config");
+    }
+
     @Test
     public void publishConfigurationTest() throws Exception {
         // Publishing configuration through CLI and verifying whether they were stored correctly

http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 118d171..b9f07e1 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -251,7 +251,6 @@ the License.
         <groupId>org.apache.curator</groupId>
         <artifactId>curator-test</artifactId>
         <version>3.3.0</version>
-        <scope>test</scope>
       </dependency>
       <dependency>
         <groupId>org.apache.cxf</groupId>
@@ -413,6 +412,12 @@ the License.
         <groupId>org.apache.solr</groupId>
         <artifactId>solr-solrj</artifactId>
         <version>6.2.1</version>
+        <exclusions>
+          <exclusion>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+          </exclusion>
+        </exclusions>
       </dependency>
       <dependency>
         <groupId>org.apache.tika</groupId>

http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/pom.xml
----------------------------------------------------------------------
diff --git a/filemgr/pom.xml b/filemgr/pom.xml
index 7e39f46..84d6198 100644
--- a/filemgr/pom.xml
+++ b/filemgr/pom.xml
@@ -116,7 +116,6 @@
       <groupId>org.apache.lucene</groupId>
       <artifactId>lucene-queryparser</artifactId>
     </dependency>
-
     <dependency>
       <groupId>org.apache.oodt</groupId>
       <artifactId>cas-cli</artifactId>
@@ -236,6 +235,9 @@
               <value>src/test/resources/test.logging.properties</value>
             </property>
           </systemProperties>
+          <environmentVariables>
+            <OODT_FILEMGR_HOME>${project.basedir}</OODT_FILEMGR_HOME>
+          </environmentVariables>
           <forkedProcessTimeoutInSeconds>0</forkedProcessTimeoutInSeconds>
           <redirectTestOutputToFile>true</redirectTestOutputToFile>
           <includes>

http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java
----------------------------------------------------------------------
diff --git a/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java
new file mode 100644
index 0000000..afbac03
--- /dev/null
+++ b/filemgr/src/test/java/org/apache/oodt/cas/filemgr/config/distributed/TestDistributedXmlRpcFileManager.java
@@ -0,0 +1,200 @@
+/*
+ * 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.oodt.cas.filemgr.config.distributed;
+
+import org.apache.oodt.cas.filemgr.ingest.StdIngester;
+import org.apache.oodt.cas.filemgr.metadata.CoreMetKeys;
+import org.apache.oodt.cas.filemgr.metadata.ProductMetKeys;
+import org.apache.oodt.cas.filemgr.structs.Product;
+import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
+import org.apache.oodt.cas.filemgr.system.XmlRpcFileManager;
+import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.SerializableMetadata;
+import org.apache.oodt.config.distributed.cli.ConfigPublisher;
+import org.apache.oodt.config.test.AbstractDistributedConfigurationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Collections;
+
+import static org.apache.oodt.config.Constants.Properties.ENABLE_DISTRIBUTED_CONFIGURATION;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+public class TestDistributedXmlRpcFileManager extends AbstractDistributedConfigurationTest {
+
+    private static final int FM_PORT = 9001;
+    private static final String CONF_PUBLISHER_XML = "distributed/config/config-publisher.xml";
+    private static final String TRANSFER_SERVICE_FACTORY_CLASS = "org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory";
+
+    private XmlRpcFileManager fileManager;
+
+    @Before
+    public void setUpTest() throws Exception {
+        System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "src/test/resources/distributed/config/cmd-line-actions.xml");
+        System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "src/test/resources/distributed/config/cmd-line-options.xml");
+        System.setProperty(ENABLE_DISTRIBUTED_CONFIGURATION, "true");
+
+        ConfigPublisher.main(new String[]{
+                "-connectString", zookeeper.getConnectString(),
+                "-config", CONF_PUBLISHER_XML,
+                "-a", "publish"
+        });
+
+        try {
+            fileManager = new XmlRpcFileManager(FM_PORT);
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+
+        ingestFile();
+    }
+
+    @Test
+    public void testDistributedConfigurationWithFileManager() {
+        XmlRpcFileManagerClient fmc = null;
+        try {
+            fmc = new XmlRpcFileManagerClient(new URL("http://localhost:" + FM_PORT));
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+
+        Metadata met = null;
+        try {
+            met = fmc.getMetadata(fmc.getProductByName("test.txt"));
+        } catch (CatalogException e) {
+            fail(e.getMessage());
+        }
+
+        assertNotNull(met);
+        assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ID));
+        assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_ID));
+        assertTrue(met.containsKey(ProductMetKeys.PRODUCT_NAME));
+        assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_NAME));
+        assertTrue(met.containsKey(ProductMetKeys.PRODUCT_STRUCTURE));
+        assertEquals("Flat", met.getMetadata(ProductMetKeys.PRODUCT_STRUCTURE));
+        assertTrue(met.containsKey(ProductMetKeys.PRODUCT_TRANSFER_STATUS));
+        assertEquals(Product.STATUS_RECEIVED, met.getMetadata(ProductMetKeys.PRODUCT_TRANSFER_STATUS));
+
+        assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ORIG_REFS));
+        assertTrue(met.containsKey(ProductMetKeys.PRODUCT_DATASTORE_REFS));
+        assertTrue(met.containsKey(ProductMetKeys.PRODUCT_FILE_SIZES));
+        assertTrue(met.containsKey(ProductMetKeys.PRODUCT_MIME_TYPES));
+
+        assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_ORIG_REFS).size());
+        assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS).size());
+        assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_FILE_SIZES).size());
+        assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_MIME_TYPES).size());
+
+        URL refUrl = this.getClass().getResource("/ingest/test.txt");
+
+        String origPath = null;
+        try {
+            origPath = new File(refUrl.getFile()).getCanonicalPath();
+        } catch (IOException e) {
+            fail(e.getMessage());
+        }
+        assertEquals(origPath, met.getMetadata(ProductMetKeys.PRODUCT_ORIG_REFS));
+        assertEquals("/tmp/test.txt/test.txt", met.getMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS));
+
+        assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_FILE_SIZES));
+        assertEquals("text/plain", met.getMetadata(ProductMetKeys.PRODUCT_MIME_TYPES));
+
+        try {
+            met = fmc.getReducedMetadata(fmc.getProductByName("test.txt"), Collections.EMPTY_LIST);
+        } catch (CatalogException e) {
+            fail(e.getMessage());
+        }
+
+        assertNotNull(met);
+        assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ID));
+        assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_ID));
+        assertTrue(met.containsKey(ProductMetKeys.PRODUCT_NAME));
+        assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_NAME));
+        assertTrue(met.containsKey(ProductMetKeys.PRODUCT_STRUCTURE));
+        assertEquals("Flat", met.getMetadata(ProductMetKeys.PRODUCT_STRUCTURE));
+        assertTrue(met.containsKey(ProductMetKeys.PRODUCT_TRANSFER_STATUS));
+        assertEquals(Product.STATUS_RECEIVED, met.getMetadata(ProductMetKeys.PRODUCT_TRANSFER_STATUS));
+
+        assertTrue(met.containsKey(ProductMetKeys.PRODUCT_ORIG_REFS));
+        assertTrue(met.containsKey(ProductMetKeys.PRODUCT_DATASTORE_REFS));
+        assertTrue(met.containsKey(ProductMetKeys.PRODUCT_FILE_SIZES));
+        assertTrue(met.containsKey(ProductMetKeys.PRODUCT_MIME_TYPES));
+
+        assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_ORIG_REFS).size());
+        assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS).size());
+        assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_FILE_SIZES).size());
+        assertEquals(1, met.getAllMetadata(ProductMetKeys.PRODUCT_MIME_TYPES).size());
+
+        origPath = null;
+        try {
+            origPath = new File(refUrl.getFile()).getCanonicalPath();
+        } catch (IOException e) {
+            fail(e.getMessage());
+        }
+        assertEquals(origPath, met.getMetadata(ProductMetKeys.PRODUCT_ORIG_REFS));
+        assertEquals("/tmp/test.txt/test.txt", met.getMetadata(ProductMetKeys.PRODUCT_DATASTORE_REFS));
+
+        assertNotNull(met.getMetadata(ProductMetKeys.PRODUCT_FILE_SIZES));
+        assertEquals("text/plain", met.getMetadata(ProductMetKeys.PRODUCT_MIME_TYPES));
+    }
+
+    private void ingestFile() {
+        StdIngester ingester = new StdIngester(TRANSFER_SERVICE_FACTORY_CLASS);
+
+        try {
+            URL ingestUrl = this.getClass().getResource("/ingest");
+            URL refUrl = this.getClass().getResource("/ingest/test.txt");
+            URL metUrl = this.getClass().getResource("/ingest/test.txt.met");
+            Metadata prodMet = new SerializableMetadata(new FileInputStream(new File(metUrl.getFile())));
+
+            // now add the right file location
+            prodMet.addMetadata(CoreMetKeys.FILE_LOCATION, new File(ingestUrl.getFile()).getCanonicalPath());
+            prodMet.addMetadata(CoreMetKeys.FILENAME, "test.txt");
+            prodMet.addMetadata(CoreMetKeys.PRODUCT_TYPE, "GenericFile");
+            ingester.ingest(new URL("http://localhost:" + FM_PORT), new File(refUrl.getFile()), prodMet);
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    @After
+    public void tearDownTest() throws Exception {
+        if (fileManager != null) {
+            fileManager.shutdown();
+        }
+
+        ConfigPublisher.main(new String[]{
+                "-connectString", zookeeper.getConnectString(),
+                "-config", CONF_PUBLISHER_XML,
+                "-a", "clear"
+        });
+
+        System.clearProperty("org.apache.oodt.cas.cli.action.spring.config");
+        System.clearProperty("org.apache.oodt.cas.cli.option.spring.config");
+        System.clearProperty(ENABLE_DISTRIBUTED_CONFIGURATION);
+    }
+}

http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/resources/distributed/config/cmd-line-actions.xml
----------------------------------------------------------------------
diff --git a/filemgr/src/test/resources/distributed/config/cmd-line-actions.xml b/filemgr/src/test/resources/distributed/config/cmd-line-actions.xml
new file mode 100644
index 0000000..08f5415
--- /dev/null
+++ b/filemgr/src/test/resources/distributed/config/cmd-line-actions.xml
@@ -0,0 +1,38 @@
+<?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.
+  -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+       http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+    <bean id="publish" class="org.apache.oodt.config.distributed.cli.CLIAction">
+        <constructor-arg value="PUBLISH"/>
+        <property name="description" value="Publishes configuration to zookeeper"/>
+    </bean>
+
+    <bean id="verify" class="org.apache.oodt.config.distributed.cli.CLIAction">
+        <constructor-arg value="VERIFY"/>
+        <property name="description" value="Verifies configuration published to zookeeper"/>
+    </bean>
+
+    <bean id="clear" class="org.apache.oodt.config.distributed.cli.CLIAction">
+        <constructor-arg value="CLEAR"/>
+        <property name="description" value="Clears all published configuration from zookeeper"/>
+    </bean>
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/resources/distributed/config/cmd-line-options.xml
----------------------------------------------------------------------
diff --git a/filemgr/src/test/resources/distributed/config/cmd-line-options.xml b/filemgr/src/test/resources/distributed/config/cmd-line-options.xml
new file mode 100644
index 0000000..698ad32
--- /dev/null
+++ b/filemgr/src/test/resources/distributed/config/cmd-line-options.xml
@@ -0,0 +1,85 @@
+<?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.
+  -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+       http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+    <bean id="connectStringOption" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+        <property name="shortOption" value="cs"/>
+        <property name="longOption" value="connectString"/>
+        <property name="description" value="Connect String to Zookeeper (ip1:port1,ip2:port2,..)"/>
+        <property name="hasArgs" value="true"/>
+        <property name="requirementRules">
+            <list>
+                <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+                      p:actionName="publish" p:relation="REQUIRED"/>
+                <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+                      p:actionName="clear" p:relation="REQUIRED"/>
+                <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+                      p:actionName="verify" p:relation="REQUIRED"/>
+            </list>
+        </property>
+        <property name="handler">
+            <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
+                <property name="applyToActions">
+                    <list>
+                        <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+                              p:actionName="publish" p:methodName="setConnectString"/>
+                        <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+                              p:actionName="verify" p:methodName="setConnectString"/>
+                        <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+                              p:actionName="clear" p:methodName="setConnectString"/>
+                    </list>
+                </property>
+            </bean>
+        </property>
+    </bean>
+
+    <bean id="publisherXML" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+        <property name="shortOption" value="c"/>
+        <property name="longOption" value="config"/>
+        <property name="description" value="Configuration publisher spring configuration XML"/>
+        <property name="hasArgs" value="true"/>
+        <property name="requirementRules">
+            <list>
+                <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+                      p:actionName="publish" p:relation="OPTIONAL"/>
+                <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+                      p:actionName="clear" p:relation="OPTIONAL"/>
+                <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+                      p:actionName="verify" p:relation="OPTIONAL"/>
+            </list>
+        </property>
+        <property name="handler">
+            <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
+                <property name="applyToActions">
+                    <list>
+                        <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+                              p:actionName="publish" p:methodName="setConfigFile"/>
+                        <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+                              p:actionName="verify" p:methodName="setConfigFile"/>
+                        <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+                              p:actionName="clear" p:methodName="setConfigFile"/>
+                    </list>
+                </property>
+            </bean>
+        </property>
+    </bean>
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/resources/distributed/config/config-publisher.xml
----------------------------------------------------------------------
diff --git a/filemgr/src/test/resources/distributed/config/config-publisher.xml b/filemgr/src/test/resources/distributed/config/config-publisher.xml
new file mode 100644
index 0000000..19e9f8c
--- /dev/null
+++ b/filemgr/src/test/resources/distributed/config/config-publisher.xml
@@ -0,0 +1,42 @@
+<!--
+  ~ 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.
+  -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+    <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
+        <constructor-arg value="FILE_MANAGER"/>
+        <property name="propertiesFiles">
+            <map key-type="java.lang.String" value-type="java.lang.String">
+                <entry key="src/test/resources/distributed/config/filemgr.properties" value="target/filemgr/etc/filemgr.properties"/>
+                <entry key="src/test/resources/test.logging.properties" value="target/filemgr/etc/logging.properties"/>
+            </map>
+        </property>
+        <property name="configFiles">
+            <map key-type="java.lang.String" value-type="java.lang.String">
+                <!-- Examples - Core-->
+                <entry key="src/test/resources/ingest/fmpolicy/elements.xml" value="target/filemgr/policy/oodt/elements.xml"/>
+                <entry key="src/test/resources/ingest/fmpolicy/product-types.xml" value="target/filemgr/policy/oodt/product-types.xml"/>
+                <entry key="src/test/resources/ingest/fmpolicy/product-type-element-map.xml" value="target/filemgr/policy/oodt/product-type-element-map.xml"/>
+
+                <!-- Mime types XML -->
+                <entry key="src/test/resources/mime-types.xml" value="target/filemgr/policy/mime-types.xml"/>
+            </map>
+        </property>
+    </bean>
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/resources/distributed/config/filemgr.properties
----------------------------------------------------------------------
diff --git a/filemgr/src/test/resources/distributed/config/filemgr.properties b/filemgr/src/test/resources/distributed/config/filemgr.properties
new file mode 100644
index 0000000..50d09a7
--- /dev/null
+++ b/filemgr/src/test/resources/distributed/config/filemgr.properties
@@ -0,0 +1,157 @@
+#
+# 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.
+#
+
+# Test Configuration properties for the File Manager
+
+# repository factory
+filemgr.repository.factory=org.apache.oodt.cas.filemgr.repository.XMLRepositoryManagerFactory
+
+# catalog factory
+filemgr.catalog.factory=org.apache.oodt.cas.filemgr.catalog.LuceneCatalogFactory
+
+# data transfer factory
+filemgr.datatransfer.factory=org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory
+
+# validation layer factory
+filemgr.validationLayer.factory=org.apache.oodt.cas.filemgr.validation.XMLValidationLayerFactory
+
+# xml rpc client configuration
+org.apache.oodt.cas.filemgr.system.xmlrpc.connectionTimeout.minutes=20
+org.apache.oodt.cas.filemgr.system.xmlrpc.requestTimeout.minutes=60
+#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retries=0
+#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retry.interval.seconds=3
+
+# data source catalog configuration
+org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test
+org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.user=sa
+org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.pass=
+org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
+org.apache.oodt.cas.filemgr.catalog.datasource.quoteFields=false
+org.apache.oodt.cas.filemgr.catalog.datasource.pageSize=20
+org.apache.oodt.cas.filemgr.catalog.datasource.cacheUpdateMinutes=5
+org.apache.oodt.cas.filemgr.catalog.datasource.orderedValues=false
+# set the following property to 'true' to allow dynamic metadata fields,
+# effectively bypassing the validation layer.
+# by default the property is false
+#org.apache.oodt.cas.filemgr.catalog.datasource.lenientFields=true
+# set the following property to true to enable the column "product_id"
+# in table "products" to be of type string
+#org.apache.oodt.cas.filemgr.catalog.datasource.productId.string=false
+
+
+# mapped data source catalog configuration
+org.apache.oodt.cas.filemgr.catalog.mappeddatasource.mapFile=/path/to/ops.catalog.typemap.properties
+
+# science data catalog configuration
+org.apache.oodt.cas.filemgr.catalog.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test
+org.apache.oodt.cas.filemgr.catalog.science.jdbc.user=sa
+org.apache.oodt.cas.filemgr.catalog.science.jdbc.pass=
+org.apache.oodt.cas.filemgr.catalog.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
+
+# lucene catalog configuration
+org.apache.oodt.cas.filemgr.catalog.lucene.idxPath=file:target/tmp
+org.apache.oodt.cas.filemgr.catalog.lucene.pageSize=20
+org.apache.oodt.cas.filemgr.catalog.lucene.commitLockTimeout.seconds=60
+org.apache.oodt.cas.filemgr.catalog.lucene.writeLockTimeout.seconds=60
+org.apache.oodt.cas.filemgr.catalog.lucene.mergeFactor=20
+
+# solr catalog configuration
+org.apache.oodt.cas.filemgr.catalog.solr.url=http://localhost:8983/solr
+#org.apache.oodt.cas.filemgr.catalog.solr.url=http://localhost:8080/solr
+org.apache.oodt.cas.filemgr.catalog.solr.productSerializer=org.apache.oodt.cas.filemgr.catalog.solr.DefaultProductSerializer
+org.apache.oodt.cas.filemgr.catalog.solr.productIdGenerator=org.apache.oodt.cas.filemgr.catalog.solr.UUIDProductIdGenerator
+#org.apache.oodt.cas.filemgr.catalog.solr.productIdGenerator=org.apache.oodt.cas.filemgr.catalog.solr.NameProductIdGenerator
+
+
+# data source repository manager configuration
+org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test
+org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.user=sa
+org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.pass=
+org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
+
+# science data repository manager configuration
+org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test
+org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.user=sa
+org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.pass=
+org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
+
+# XML repository manager configuration
+org.apache.oodt.cas.filemgr.repositorymgr.dirs=file:[OODT_FILEMGR_HOME]/target/filemgr/policy/oodt
+
+# XML validation layer configuration
+org.apache.oodt.cas.filemgr.validation.dirs=file:[OODT_FILEMGR_HOME]/target/filemgr/policy/oodt
+
+# set the following property to 'true' to allow dynamic metadata fields,
+# effectively bypassing the validation layer.
+# by default the property is false
+#org.apache.oodt.cas.filemgr.catalog.lucene.lenientFields=true
+
+# data source validation layer configuration
+org.apache.oodt.cas.filemgr.validation.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test
+org.apache.oodt.cas.filemgr.validation.datasource.jdbc.user=sa
+org.apache.oodt.cas.filemgr.validation.datasource.jdbc.pass=
+org.apache.oodt.cas.filemgr.validation.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
+org.apache.oodt.cas.filemgr.validation.datasource.quoteFields=false
+
+# science data validation layer configuration
+org.apache.oodt.cas.filemgr.validation.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test
+org.apache.oodt.cas.filemgr.validation.science.jdbc.user=sa
+org.apache.oodt.cas.filemgr.validation.science.jdbc.pass=
+org.apache.oodt.cas.filemgr.validation.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
+
+# remote data transfer configuration
+org.apache.oodt.cas.filemgr.datatransfer.remote.chunkSize=1024
+
+# Amazon S3 data transfer configuration.
+# Region can be any of the values found here:
+#   http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/regions/Regions.html
+org.apache.oodt.cas.filemgr.datatransfer.s3.bucket.name=some_bucket_name
+org.apache.oodt.cas.filemgr.datatransfer.s3.region=EU_WEST_1
+org.apache.oodt.cas.filemgr.datatransfer.s3.access.key=s3_access_key
+org.apache.oodt.cas.filemgr.datatransfer.s3.secret.key=s3_secret_key
+
+# location of Mime-Type repository
+org.apache.oodt.cas.filemgr.mime.type.repository=[OODT_FILEMGR_HOME]/target/filemgr/policy/mime-types.xml
+
+# tells the file manager system layer to include product instance metadata
+# NOTE: here are the expected field mappings
+#
+#      product.getProductId() -> ProductId
+#      product.getProductName() -> ProductName
+#      product.getProductStructure() -> ProductStructure
+#      product.getTransferStatus() -> ProductTransferStatus
+#      product.getRootRef() -> ProductRootReference
+
+# for the references returned by product.getProductReferences() the following 
+# metadata fields will be added (order will be maintained, such that data store 
+# ref at index 0 will map to orig ref at index 0, etc.)
+#
+#      ProductDataStoreReferences (list of all data store references: 
+#       note already translated into path, not URI)
+#      ProductOrigReferences (list of all orig references: 
+#       note already translated into path, not URI)
+#      ProductMimeType (list of all references' mime-types)
+#      ProductFileSize (list of all references' file sizes)
+
+org.apache.oodt.cas.filemgr.metadata.expandProduct=true
+
+# ConfigurableMetadataBasedVersioning configuration
+#org.apache.oodt.cas.filemgr.versioning.configuration.all_product_types=[Year]/[Month]/[Filename]
+#org.apache.oodt.cas.filemgr.versioning.configuration.<product_type>=[Year]/[Month]/[Filename]
+
+# Enable to use only server-side versioning.
+#org.apache.oodt.cas.filemgr.serverside.versioning=true
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/e32f2bb0/filemgr/src/test/resources/filemgr.properties
----------------------------------------------------------------------
diff --git a/filemgr/src/test/resources/filemgr.properties b/filemgr/src/test/resources/filemgr.properties
index d79896a..4c9b885 100644
--- a/filemgr/src/test/resources/filemgr.properties
+++ b/filemgr/src/test/resources/filemgr.properties
@@ -152,159 +152,4 @@ org.apache.oodt.cas.filemgr.metadata.expandProduct=false
 #org.apache.oodt.cas.filemgr.versioning.configuration.<product_type>=[Year]/[Month]/[Filename]
 
 # Enable to use only server-side versioning.
-#org.apache.oodt.cas.filemgr.serverside.versioning=true
-#  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.
-
-# Test Configuration properties for the File Manager
-
-# repository factory
-filemgr.repository.factory=org.apache.oodt.cas.filemgr.repository.XMLRepositoryManagerFactory
-
-# catalog factory
-filemgr.catalog.factory=org.apache.oodt.cas.filemgr.catalog.LuceneCatalogFactory
-
-# data transfer factory
-filemgr.datatransfer.factory=org.apache.oodt.cas.filemgr.datatransfer.LocalDataTransferFactory
-
-# validation layer factory
-filemgr.validationLayer.factory=org.apache.oodt.cas.filemgr.validation.XMLValidationLayerFactory
-
-# xml rpc client configuration
-org.apache.oodt.cas.filemgr.system.xmlrpc.connectionTimeout.minutes=20
-org.apache.oodt.cas.filemgr.system.xmlrpc.requestTimeout.minutes=60
-#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retries=0
-#org.apache.oodt.cas.filemgr.system.xmlrpc.connection.retry.interval.seconds=3
-
-# data source catalog configuration
-org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test
-org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.user=sa
-org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.pass=
-org.apache.oodt.cas.filemgr.catalog.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
-org.apache.oodt.cas.filemgr.catalog.datasource.quoteFields=false
-org.apache.oodt.cas.filemgr.catalog.datasource.pageSize=20
-org.apache.oodt.cas.filemgr.catalog.datasource.cacheUpdateMinutes=5
-org.apache.oodt.cas.filemgr.catalog.datasource.orderedValues=false
-# set the following property to 'true' to allow dynamic metadata fields,
-# effectively bypassing the validation layer.
-# by default the property is false
-#org.apache.oodt.cas.filemgr.catalog.datasource.lenientFields=true
-# set the following property to true to enable the column "product_id"
-# in table "products" to be of type string
-#org.apache.oodt.cas.filemgr.catalog.datasource.productId.string=false
-
-
-# mapped data source catalog configuration
-org.apache.oodt.cas.filemgr.catalog.mappeddatasource.mapFile=/path/to/ops.catalog.typemap.properties
-
-# science data catalog configuration
-org.apache.oodt.cas.filemgr.catalog.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test
-org.apache.oodt.cas.filemgr.catalog.science.jdbc.user=sa
-org.apache.oodt.cas.filemgr.catalog.science.jdbc.pass=
-org.apache.oodt.cas.filemgr.catalog.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
-
-# lucene catalog configuration
-org.apache.oodt.cas.filemgr.catalog.lucene.idxPath=file:/testdata/
-org.apache.oodt.cas.filemgr.catalog.lucene.pageSize=20
-org.apache.oodt.cas.filemgr.catalog.lucene.commitLockTimeout.seconds=60
-org.apache.oodt.cas.filemgr.catalog.lucene.writeLockTimeout.seconds=60
-org.apache.oodt.cas.filemgr.catalog.lucene.mergeFactor=20
-
-# solr catalog configuration
-org.apache.oodt.cas.filemgr.catalog.solr.url=http://localhost:8983/solr
-#org.apache.oodt.cas.filemgr.catalog.solr.url=http://localhost:8080/solr
-org.apache.oodt.cas.filemgr.catalog.solr.productSerializer=org.apache.oodt.cas.filemgr.catalog.solr.DefaultProductSerializer
-org.apache.oodt.cas.filemgr.catalog.solr.productIdGenerator=org.apache.oodt.cas.filemgr.catalog.solr.UUIDProductIdGenerator
-#org.apache.oodt.cas.filemgr.catalog.solr.productIdGenerator=org.apache.oodt.cas.filemgr.catalog.solr.NameProductIdGenerator
-
-
-# data source repository manager configuration
-org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test
-org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.user=sa
-org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.pass=
-org.apache.oodt.cas.filemgr.repositorymgr.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
-
-# science data repository manager configuration
-org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test
-org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.user=sa
-org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.pass=
-org.apache.oodt.cas.filemgr.repositorymgr.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
-
-# XML repository manager configuration
-org.apache.oodt.cas.filemgr.repositorymgr.dirs=file:///dir1,file:///dir2
-
-# XML validation layer configuration
-org.apache.oodt.cas.filemgr.validation.dirs=file:///dir1,file:///dir2
-
-# set the following property to 'true' to allow dynamic metadata fields,
-# effectively bypassing the validation layer.
-# by default the property is false
-#org.apache.oodt.cas.filemgr.catalog.lucene.lenientFields=true
-
-# data source validation layer configuration
-org.apache.oodt.cas.filemgr.validation.datasource.jdbc.url=jdbc:hsqldb:hsql://localhost/test
-org.apache.oodt.cas.filemgr.validation.datasource.jdbc.user=sa
-org.apache.oodt.cas.filemgr.validation.datasource.jdbc.pass=
-org.apache.oodt.cas.filemgr.validation.datasource.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
-org.apache.oodt.cas.filemgr.validation.datasource.quoteFields=false
-
-# science data validation layer configuration
-org.apache.oodt.cas.filemgr.validation.science.jdbc.url=jdbc:hsqldb:hsql://localhost/test
-org.apache.oodt.cas.filemgr.validation.science.jdbc.user=sa
-org.apache.oodt.cas.filemgr.validation.science.jdbc.pass=
-org.apache.oodt.cas.filemgr.validation.science.jdbc.driver=org.hsqldb.jdbc.JDBCDriver
-
-# remote data transfer configuration
-org.apache.oodt.cas.filemgr.datatransfer.remote.chunkSize=1024
-
-# Amazon S3 data transfer configuration.
-# Region can be any of the values found here:
-#   http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/regions/Regions.html
-org.apache.oodt.cas.filemgr.datatransfer.s3.bucket.name=some_bucket_name
-org.apache.oodt.cas.filemgr.datatransfer.s3.region=EU_WEST_1
-org.apache.oodt.cas.filemgr.datatransfer.s3.access.key=s3_access_key
-org.apache.oodt.cas.filemgr.datatransfer.s3.secret.key=s3_secret_key
-
-# location of Mime-Type repository
-org.apache.oodt.cas.filemgr.mime.type.repository=file:/src/mime-types.xml
-
-# tells the file manager system layer to include product instance metadata
-# NOTE: here are the expected field mappings
-#
-#      product.getProductId() -> ProductId
-#      product.getProductName() -> ProductName
-#      product.getProductStructure() -> ProductStructure
-#      product.getTransferStatus() -> ProductTransferStatus
-#      product.getRootRef() -> ProductRootReference
-
-# for the references returned by product.getProductReferences() the following 
-# metadata fields will be added (order will be maintained, such that data store 
-# ref at index 0 will map to orig ref at index 0, etc.)
-#
-#      ProductDataStoreReferences (list of all data store references: 
-#       note already translated into path, not URI)
-#      ProductOrigReferences (list of all orig references: 
-#       note already translated into path, not URI)
-#      ProductMimeType (list of all references' mime-types)
-#      ProductFileSize (list of all references' file sizes)
-
-org.apache.oodt.cas.filemgr.metadata.expandProduct=false
-
-# ConfigurableMetadataBasedVersioning configuration
-#org.apache.oodt.cas.filemgr.versioning.configuration.all_product_types=[Year]/[Month]/[Filename]
-#org.apache.oodt.cas.filemgr.versioning.configuration.<product_type>=[Year]/[Month]/[Filename]
-
-# Enable to use only server-side versioning.
 #org.apache.oodt.cas.filemgr.serverside.versioning=true
\ No newline at end of file


[2/8] oodt git commit: Added maven-resource-plugin for example resource copying and CLI improvements

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/oodt/blob/d2f2d49d/config/src/main/resources/examples/filemgr/mime-types.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/examples/filemgr/mime-types.xml b/config/src/main/resources/examples/filemgr/mime-types.xml
deleted file mode 100755
index 6b678be..0000000
--- a/config/src/main/resources/examples/filemgr/mime-types.xml
+++ /dev/null
@@ -1,4119 +0,0 @@
-<?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.
--->
-<!--
-  Description: This xml file defines the valid mime types used by Tika.
-  The mime type data within this file is based on information from various
-  sources like Apache Nutch, Apache HTTP Server, the file(1) command, etc.
--->
-<mime-info>
-
-  <mime-type type="application/activemessage"/>
-  <mime-type type="application/andrew-inset">
-    <glob pattern="*.ez"/>
-  </mime-type>
-  <mime-type type="application/applefile"/>
-  <mime-type type="application/applixware">
-    <glob pattern="*.aw"/>
-  </mime-type>
-
-  <mime-type type="application/atom+xml">
-    <root-XML localName="feed" namespaceURI="http://purl.org/atom/ns#"/>
-    <glob pattern="*.atom"/>
-  </mime-type>
-
-  <mime-type type="application/atomcat+xml">
-    <glob pattern="*.atomcat"/>
-  </mime-type>
-  <mime-type type="application/atomicmail"/>
-  <mime-type type="application/atomsvc+xml">
-    <glob pattern="*.atomsvc"/>
-  </mime-type>
-  <mime-type type="application/auth-policy+xml"/>
-  <mime-type type="application/batch-smtp"/>
-  <mime-type type="application/beep+xml"/>
-  <mime-type type="application/cals-1840"/>
-  <mime-type type="application/ccxml+xml">
-    <glob pattern="*.ccxml"/>
-  </mime-type>
-  <mime-type type="application/cea-2018+xml"/>
-  <mime-type type="application/cellml+xml"/>
-  <mime-type type="application/cnrp+xml"/>
-  <mime-type type="application/commonground"/>
-  <mime-type type="application/conference-info+xml"/>
-  <mime-type type="application/cpl+xml"/>
-  <mime-type type="application/csta+xml"/>
-  <mime-type type="application/cstadata+xml"/>
-  <mime-type type="application/cu-seeme">
-    <glob pattern="*.cu"/>
-  </mime-type>
-  <mime-type type="application/cybercash"/>
-  <mime-type type="application/davmount+xml">
-    <glob pattern="*.davmount"/>
-  </mime-type>
-  <mime-type type="application/dca-rft"/>
-  <mime-type type="application/dec-dx"/>
-  <mime-type type="application/dialog-info+xml"/>
-  <mime-type type="application/dicom"/>
-  <mime-type type="application/dns"/>
-  <mime-type type="application/dvcs"/>
-  <mime-type type="application/ecmascript">
-    <glob pattern="*.ecma"/>
-  </mime-type>
-  <mime-type type="application/edi-consent"/>
-  <mime-type type="application/edi-x12"/>
-  <mime-type type="application/edifact"/>
-  <mime-type type="application/emma+xml">
-    <glob pattern="*.emma"/>
-  </mime-type>
-  <mime-type type="application/epp+xml"/>
-
-  <mime-type type="application/epub+zip">
-    <acronym>EPUB</acronym>
-    <_comment>Electronic Publication</_comment>
-    <magic priority="50">
-      <match value="PK\003\004" type="string" offset="0">
-        <match value="mimetypeapplication/epub+zip" type="string" offset="30"/>
-      </match>
-    </magic>
-    <glob pattern="*.epub"/>
-  </mime-type>
-
-  <mime-type type="application/eshop"/>
-  <mime-type type="application/example"/>
-  <mime-type type="application/fastinfoset"/>
-  <mime-type type="application/fastsoap"/>
-  <mime-type type="application/fits"/>
-  <mime-type type="application/font-tdpfr">
-    <glob pattern="*.pfr"/>
-  </mime-type>
-  <mime-type type="application/h224"/>
-  <mime-type type="application/http"/>
-  <mime-type type="application/hyperstudio">
-    <glob pattern="*.stk"/>
-  </mime-type>
-  <mime-type type="application/ibe-key-request+xml"/>
-  <mime-type type="application/ibe-pkg-reply+xml"/>
-  <mime-type type="application/ibe-pp-data"/>
-  <mime-type type="application/iges"/>
-  <mime-type type="application/im-iscomposing+xml"/>
-  <mime-type type="application/index"/>
-  <mime-type type="application/index.cmd"/>
-  <mime-type type="application/index.obj"/>
-  <mime-type type="application/index.response"/>
-  <mime-type type="application/index.vnd"/>
-  <mime-type type="application/iotp"/>
-  <mime-type type="application/ipp"/>
-  <mime-type type="application/isup"/>
-
-  <mime-type type="application/java-archive">
-    <sub-class-of type="application/zip"/>
-    <glob pattern="*.jar"/>
-  </mime-type>
-
-  <mime-type type="application/java-serialized-object">
-    <glob pattern="*.ser"/>
-  </mime-type>
-
-  <mime-type type="application/javascript">
-    <sub-class-of type="text/plain"/>
-    <glob pattern="*.js"/>
-  </mime-type>
-
-  <mime-type type="application/json">
-    <sub-class-of type="application/javascript"/>
-    <glob pattern="*.json"/>
-  </mime-type>
-
-  <mime-type type="application/java-vm">
-    <magic priority="40">
-      <match value="0xcafebabe" type="string" offset="0" />
-    </magic>
-    <glob pattern="*.class"/>
-  </mime-type>
-
-  <mime-type type="application/kpml-request+xml"/>
-  <mime-type type="application/kpml-response+xml"/>
-  <mime-type type="application/lost+xml">
-    <glob pattern="*.lostxml"/>
-  </mime-type>
-
-  <mime-type type="application/mac-binhex40">
-    <alias type="application/mac-binhex"/>
-    <alias type="application/binhex"/>
-    <magic priority="50">
-      <match value="must\ be\ converted\ with\ BinHex" type="string" offset="11"/>
-    </magic>
-    <glob pattern="*.hqx"/>
-  </mime-type>
-
-  <mime-type type="application/mac-compactpro">
-    <glob pattern="*.cpt"/>
-  </mime-type>
-
-  <mime-type type="application/macwriteii"/>
-  <mime-type type="application/marc">
-    <glob pattern="*.mrc"/>
-  </mime-type>
-  <mime-type type="application/mathematica">
-    <glob pattern="*.ma"/>
-    <glob pattern="*.nb"/>
-    <glob pattern="*.mb"/>
-  </mime-type>
-  <mime-type type="application/mathml+xml">
-    <glob pattern="*.mathml"/>
-  </mime-type>
-  <mime-type type="application/mbms-associated-procedure-description+xml"/>
-  <mime-type type="application/mbms-deregister+xml"/>
-  <mime-type type="application/mbms-envelope+xml"/>
-  <mime-type type="application/mbms-msk+xml"/>
-  <mime-type type="application/mbms-msk-response+xml"/>
-  <mime-type type="application/mbms-protection-description+xml"/>
-  <mime-type type="application/mbms-reception-report+xml"/>
-  <mime-type type="application/mbms-register+xml"/>
-  <mime-type type="application/mbms-register-response+xml"/>
-  <mime-type type="application/mbms-user-service-description+xml"/>
-  <mime-type type="application/mbox">
-    <sub-class-of type="text/plain"/>
-    <glob pattern="*.mbox"/>
-  </mime-type>
-  <mime-type type="application/media_control+xml"/>
-  <mime-type type="application/mediaservercontrol+xml">
-    <glob pattern="*.mscml"/>
-  </mime-type>
-  <mime-type type="application/mikey"/>
-  <mime-type type="application/moss-keys"/>
-  <mime-type type="application/moss-signature"/>
-  <mime-type type="application/mosskey-data"/>
-  <mime-type type="application/mosskey-request"/>
-  <mime-type type="application/mp4">
-    <glob pattern="*.mp4s"/>
-  </mime-type>
-  <mime-type type="application/mpeg4-generic"/>
-  <mime-type type="application/mpeg4-iod"/>
-  <mime-type type="application/mpeg4-iod-xmt"/>
-
-  <!-- http://www.iana.org/assignments/media-types/application/msword -->
-  <mime-type type="application/msword">
-    <!-- Use org.apache.tika.detect.ContainerAwareDetector for more reliable detection of OLE2 documents -->
-    <alias type="application/vnd.ms-word"/>
-    <_comment>Microsoft Word Document</_comment>
-    <magic priority="50">
-      <match value="Microsoft\ Word\ 6.0\ Document" type="string" offset="2080"/>
-      <match value="Documento\ Microsoft\ Word\ 6" type="string" offset="2080"/>
-      <match value="MSWordDoc" type="string" offset="2112"/>
-      <match value="0x31be0000" type="big32" offset="0"/>
-      <match value="PO^Q`" type="string" offset="0"/>
-      <match value="\376\067\0\043" type="string" offset="0"/>
-      <match value="\333\245-\0\0\0" type="string" offset="0"/>
-      <match value="\354\245\301" type="string" offset="512"/>
-      <match value="\320\317\021\340\241\261\032\341" type="string" offset="0"/>
-      <match value="\224\246\056" type="string" offset="0"/>
-      <match value="0xd0cf11e0a1b11ae1" type="string" offset="0:8">
-         <match value="W\x00o\x00r\x00d\x00D\x00o\x00c\x00u\x00m\x00e\x00n\x00t" type="string" offset="1152:4096" />
-      </match>
-    </magic>
-    <glob pattern="*.doc"/>
-    <glob pattern="*.dot"/>
-    <sub-class-of type="application/x-tika-msoffice"/>
-  </mime-type>
-
-  <mime-type type="application/mxf">
-    <glob pattern="*.mxf"/>
-  </mime-type>
-  <mime-type type="application/nasdata"/>
-  <mime-type type="application/news-checkgroups"/>
-  <mime-type type="application/news-groupinfo"/>
-  <mime-type type="application/news-transmission"/>
-  <mime-type type="application/nss"/>
-  <mime-type type="application/ocsp-request"/>
-  <mime-type type="application/ocsp-response"/>
-
-  <mime-type type="application/octet-stream">
-    <magic priority="50">
-      <match value="#\ This\ is\ a\ shell\ archive" type="string" offset="10"/>
-      <match value="\037\036" type="string" offset="0"/>
-      <match value="017437" type="host16" offset="0"/>
-      <match value="0x1fff" type="host16" offset="0"/>
-      <match value="\377\037" type="string" offset="0"/>
-      <match value="0145405" type="host16" offset="0"/>
-    </magic>
-    <glob pattern="*.bin"/>
-    <glob pattern="*.dms"/>
-    <glob pattern="*.lha"/>
-    <glob pattern="*.lrf"/>
-    <glob pattern="*.lzh"/>
-    <glob pattern="*.so"/>
-    <glob pattern="*.iso"/>
-    <glob pattern="*.dmg"/>
-    <glob pattern="*.dist"/>
-    <glob pattern="*.distz"/>
-    <glob pattern="*.pkg"/>
-    <glob pattern="*.bpk"/>
-    <glob pattern="*.dump"/>
-    <glob pattern="*.elc"/>
-    <glob pattern="*.deploy"/>
-  </mime-type>
-
-  <mime-type type="application/oda">
-    <glob pattern="*.oda"/>
-  </mime-type>
-  <mime-type type="application/oebps-package+xml">
-    <glob pattern="*.opf"/>
-  </mime-type>
-
-  <mime-type type="application/ogg">
-    <alias type="application/x-ogg"/>
-    <magic priority="50">
-      <match value="OggS" type="string" offset="0"/>
-    </magic>
-    <glob pattern="*.ogx"/>
-  </mime-type>
-
-  <mime-type type="application/onenote">
-    <glob pattern="*.onetoc"/>
-    <glob pattern="*.onetoc2"/>
-    <glob pattern="*.onetmp"/>
-    <glob pattern="*.onepkg"/>
-  </mime-type>
-  <mime-type type="application/parityfec"/>
-  <mime-type type="application/patch-ops-error+xml">
-    <glob pattern="*.xer"/>
-  </mime-type>
-
-  <mime-type type="application/pdf">
-    <alias type="application/x-pdf"/>
-    <acronym>PDF</acronym>
-    <_comment>Portable Document Format</_comment>
-    <magic priority="50">
-      <match value="%PDF-" type="string" offset="0"/>
-    </magic>
-    <glob pattern="*.pdf"/>
-  </mime-type>
-
-  <mime-type type="application/pgp-encrypted">
-    <glob pattern="*.pgp"/>
-  </mime-type>
-  <mime-type type="application/pgp-keys"/>
-  <mime-type type="application/pgp-signature">
-    <glob pattern="*.asc"/>
-    <glob pattern="*.sig"/>
-  </mime-type>
-  <mime-type type="application/pics-rules">
-    <glob pattern="*.prf"/>
-  </mime-type>
-  <mime-type type="application/pidf+xml"/>
-  <mime-type type="application/pidf-diff+xml"/>
-  <mime-type type="application/pkcs10">
-    <glob pattern="*.p10"/>
-  </mime-type>
-  <mime-type type="application/pkcs7-mime">
-    <glob pattern="*.p7m"/>
-    <glob pattern="*.p7c"/>
-  </mime-type>
-  <mime-type type="application/pkcs7-signature">
-    <glob pattern="*.p7s"/>
-  </mime-type>
-  <mime-type type="application/pkix-cert">
-    <glob pattern="*.cer"/>
-  </mime-type>
-  <mime-type type="application/pkix-crl">
-    <glob pattern="*.crl"/>
-  </mime-type>
-  <mime-type type="application/pkix-pkipath">
-    <glob pattern="*.pkipath"/>
-  </mime-type>
-  <mime-type type="application/pkixcmp">
-    <glob pattern="*.pki"/>
-  </mime-type>
-  <mime-type type="application/pls+xml">
-    <glob pattern="*.pls"/>
-  </mime-type>
-  <mime-type type="application/poc-settings+xml"/>
-
-  <mime-type type="application/postscript">
-    <_comment>PostScript</_comment>
-    <magic priority="50">
-      <match value="%!" type="string" offset="0" />
-      <match value="\004%!" type="string" offset="0" />
-      <!-- Windows format EPS -->
-      <match value="0xc5d0d3c6" type="string" offset="0"/>
-    </magic>
-    <glob pattern="*.ai"/>
-    <glob pattern="*.ps"/>
-    <glob pattern="*.eps"/>
-    <glob pattern="*.epsf"/>
-    <glob pattern="*.epsi"/>
-  </mime-type>
-
-  <mime-type type="application/prs.alvestrand.titrax-sheet"/>
-  <mime-type type="application/prs.cww">
-    <glob pattern="*.cww"/>
-  </mime-type>
-  <mime-type type="application/prs.nprend"/>
-  <mime-type type="application/prs.plucker"/>
-  <mime-type type="application/qsig"/>
-
-  <mime-type type="application/rdf+xml">
-    <root-XML localName="RDF"/>
-    <root-XML localName="RDF" namespaceURI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
-    <sub-class-of type="application/xml"/>
-    <acronym>RDF/XML</acronym>
-    <_comment>XML syntax for RDF graphs</_comment>
-    <glob pattern="*.rdf"/>
-    <glob pattern="*.owl"/>
-    <glob pattern="^rdf$" isregex="true"/>
-    <glob pattern="^owl$" isregex="true"/>
-  </mime-type>
-
-  <mime-type type="application/reginfo+xml">
-    <glob pattern="*.rif"/>
-  </mime-type>
-  <mime-type type="application/relax-ng-compact-syntax">
-    <sub-class-of type="text/plain"/>
-    <glob pattern="*.rnc"/>
-  </mime-type>
-  <mime-type type="application/remote-printing"/>
-  <mime-type type="application/resource-lists+xml">
-    <glob pattern="*.rl"/>
-  </mime-type>
-  <mime-type type="application/resource-lists-diff+xml">
-    <glob pattern="*.rld"/>
-  </mime-type>
-  <mime-type type="application/riscos"/>
-  <mime-type type="application/rlmi+xml"/>
-  <mime-type type="application/rls-services+xml">
-    <glob pattern="*.rs"/>
-  </mime-type>
-  <mime-type type="application/rsd+xml">
-    <glob pattern="*.rsd"/>
-  </mime-type>
-
-  <mime-type type="application/rss+xml">
-    <alias type="text/rss"/>
-    <root-XML localName="rss"/>
-    <root-XML namespaceURI="http://purl.org/rss/1.0/"/>
-    <glob pattern="*.rss"/>
-  </mime-type>
-
-  <mime-type type="application/rtf">
-    <alias type="text/rtf"/>
-    <magic priority="50">
-      <match value="{\\rtf" type="string" offset="0"/>
-    </magic>
-    <glob pattern="*.rtf"/>
-    <sub-class-of type="text/plain"/>
-  </mime-type>
-
-  <mime-type type="application/rtx"/>
-  <mime-type type="application/samlassertion+xml"/>
-  <mime-type type="application/samlmetadata+xml"/>
-  <mime-type type="application/sbml+xml">
-    <glob pattern="*.sbml"/>
-  </mime-type>
-  <mime-type type="application/scvp-cv-request">
-    <glob pattern="*.scq"/>
-  </mime-type>
-  <mime-type type="application/scvp-cv-response">
-    <glob pattern="*.scs"/>
-  </mime-type>
-  <mime-type type="application/scvp-vp-request">
-    <glob pattern="*.spq"/>
-  </mime-type>
-  <mime-type type="application/scvp-vp-response">
-    <glob pattern="*.spp"/>
-  </mime-type>
-  <mime-type type="application/sdp">
-    <glob pattern="*.sdp"/>
-  </mime-type>
-  <mime-type type="application/set-payment"/>
-  <mime-type type="application/set-payment-initiation">
-    <glob pattern="*.setpay"/>
-  </mime-type>
-  <mime-type type="application/set-registration"/>
-  <mime-type type="application/set-registration-initiation">
-    <glob pattern="*.setreg"/>
-  </mime-type>
-  <mime-type type="application/sgml"/>
-  <mime-type type="application/sgml-open-catalog"/>
-  <mime-type type="application/shf+xml">
-    <glob pattern="*.shf"/>
-  </mime-type>
-  <mime-type type="application/sieve"/>
-  <mime-type type="application/simple-filter+xml"/>
-  <mime-type type="application/simple-message-summary"/>
-  <mime-type type="application/simplesymbolcontainer"/>
-  <mime-type type="application/slate"/>
-  <mime-type type="application/smil"/>
-  <mime-type type="application/smil+xml">
-    <glob pattern="*.smi"/>
-    <glob pattern="*.smil"/>
-  </mime-type>
-  <mime-type type="application/soap+fastinfoset"/>
-  <mime-type type="application/soap+xml"/>
-  <mime-type type="application/sparql-query">
-    <glob pattern="*.rq"/>
-  </mime-type>
-  <mime-type type="application/sparql-results+xml">
-    <glob pattern="*.srx"/>
-  </mime-type>
-  <mime-type type="application/spirits-event+xml"/>
-  <mime-type type="application/srgs">
-    <glob pattern="*.gram"/>
-  </mime-type>
-  <mime-type type="application/srgs+xml">
-    <glob pattern="*.grxml"/>
-  </mime-type>
-  <mime-type type="application/ssml+xml">
-    <glob pattern="*.ssml"/>
-  </mime-type>
-  <mime-type type="application/timestamp-query"/>
-  <mime-type type="application/timestamp-reply"/>
-  <mime-type type="application/tve-trigger"/>
-  <mime-type type="application/ulpfec"/>
-  <mime-type type="application/vemmi"/>
-  <mime-type type="application/vividence.scriptfile"/>
-  <mime-type type="application/vnd.3gpp.bsf+xml"/>
-  <mime-type type="application/vnd.3gpp.pic-bw-large">
-    <glob pattern="*.plb"/>
-  </mime-type>
-  <mime-type type="application/vnd.3gpp.pic-bw-small">
-    <glob pattern="*.psb"/>
-  </mime-type>
-  <mime-type type="application/vnd.3gpp.pic-bw-var">
-    <glob pattern="*.pvb"/>
-  </mime-type>
-  <mime-type type="application/vnd.3gpp.sms"/>
-  <mime-type type="application/vnd.3gpp2.bcmcsinfo+xml"/>
-  <mime-type type="application/vnd.3gpp2.sms"/>
-  <mime-type type="application/vnd.3gpp2.tcap">
-    <glob pattern="*.tcap"/>
-  </mime-type>
-  <mime-type type="application/vnd.3m.post-it-notes">
-    <glob pattern="*.pwn"/>
-  </mime-type>
-  <mime-type type="application/vnd.accpac.simply.aso">
-    <glob pattern="*.aso"/>
-  </mime-type>
-  <mime-type type="application/vnd.accpac.simply.imp">
-    <glob pattern="*.imp"/>
-  </mime-type>
-  <mime-type type="application/vnd.acucobol">
-    <glob pattern="*.acu"/>
-  </mime-type>
-  <mime-type type="application/vnd.acucorp">
-    <glob pattern="*.atc"/>
-    <glob pattern="*.acutc"/>
-  </mime-type>
-  <mime-type type="application/vnd.adobe.air-application-installer-package+zip">
-    <glob pattern="*.air"/>
-  </mime-type>
-  <mime-type type="application/vnd.adobe.xdp+xml">
-    <glob pattern="*.xdp"/>
-  </mime-type>
-  <mime-type type="application/vnd.adobe.xfdf">
-    <glob pattern="*.xfdf"/>
-  </mime-type>
-  <mime-type type="application/vnd.aether.imp"/>
-  <mime-type type="application/vnd.airzip.filesecure.azf">
-    <glob pattern="*.azf"/>
-  </mime-type>
-  <mime-type type="application/vnd.airzip.filesecure.azs">
-    <glob pattern="*.azs"/>
-  </mime-type>
-  <mime-type type="application/vnd.amazon.ebook">
-    <glob pattern="*.azw"/>
-  </mime-type>
-  <mime-type type="application/vnd.americandynamics.acc">
-    <glob pattern="*.acc"/>
-  </mime-type>
-  <mime-type type="application/vnd.amiga.ami">
-    <glob pattern="*.ami"/>
-  </mime-type>
-  <mime-type type="application/vnd.android.package-archive">
-    <glob pattern="*.apk"/>
-  </mime-type>
-  <mime-type type="application/vnd.anser-web-certificate-issue-initiation">
-    <glob pattern="*.cii"/>
-  </mime-type>
-  <mime-type type="application/vnd.anser-web-funds-transfer-initiation">
-    <glob pattern="*.fti"/>
-  </mime-type>
-  <mime-type type="application/vnd.antix.game-component">
-    <glob pattern="*.atx"/>
-  </mime-type>
-  <mime-type type="application/vnd.apple.installer+xml">
-    <glob pattern="*.mpkg"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.apple.iwork">
-    <sub-class-of type="application/zip"/>
-    <glob pattern="*.key"/>
-    <glob pattern="*.pages"/>
-    <glob pattern="*.numbers"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.apple.keynote">
-    <root-XML localName="presentation" namespaceURI="http://developer.apple.com/namespaces/keynote2" />
-  </mime-type>
-  <mime-type type="application/vnd.apple.pages">
-    <root-XML localName="document" namespaceURI="http://developer.apple.com/namespaces/sl" />
-  </mime-type>
-  <mime-type type="application/vnd.apple.numbers">
-    <root-XML localName="document" namespaceURI="http://developer.apple.com/namespaces/ls" />
-  </mime-type>
-  <mime-type type="application/vnd.arastra.swi">
-    <glob pattern="*.swi"/>
-  </mime-type>
-  <mime-type type="application/vnd.audiograph">
-    <glob pattern="*.aep"/>
-  </mime-type>
-  <mime-type type="application/vnd.autopackage"/>
-  <mime-type type="application/vnd.avistar+xml"/>
-  <mime-type type="application/vnd.blueice.multipass">
-    <glob pattern="*.mpm"/>
-  </mime-type>
-  <mime-type type="application/vnd.bluetooth.ep.oob"/>
-  <mime-type type="application/vnd.bmi">
-    <glob pattern="*.bmi"/>
-  </mime-type>
-  <mime-type type="application/vnd.businessobjects">
-    <glob pattern="*.rep"/>
-  </mime-type>
-  <mime-type type="application/vnd.cab-jscript"/>
-  <mime-type type="application/vnd.canon-cpdl"/>
-  <mime-type type="application/vnd.canon-lips"/>
-  <mime-type type="application/vnd.cendio.thinlinc.clientconf"/>
-  <mime-type type="application/vnd.chemdraw+xml">
-    <glob pattern="*.cdxml"/>
-  </mime-type>
-  <mime-type type="application/vnd.chipnuts.karaoke-mmd">
-    <glob pattern="*.mmd"/>
-  </mime-type>
-  <mime-type type="application/vnd.cinderella">
-    <glob pattern="*.cdy"/>
-  </mime-type>
-  <mime-type type="application/vnd.cirpack.isdn-ext"/>
-  <mime-type type="application/vnd.claymore">
-    <glob pattern="*.cla"/>
-  </mime-type>
-  <mime-type type="application/vnd.clonk.c4group">
-    <glob pattern="*.c4g"/>
-    <glob pattern="*.c4d"/>
-    <glob pattern="*.c4f"/>
-    <glob pattern="*.c4p"/>
-    <glob pattern="*.c4u"/>
-  </mime-type>
-  <mime-type type="application/vnd.commerce-battelle"/>
-  <mime-type type="application/vnd.commonspace">
-    <glob pattern="*.csp"/>
-  </mime-type>
-  <mime-type type="application/vnd.contact.cmsg">
-    <glob pattern="*.cdbcmsg"/>
-  </mime-type>
-  <mime-type type="application/vnd.cosmocaller">
-    <glob pattern="*.cmc"/>
-  </mime-type>
-  <mime-type type="application/vnd.crick.clicker">
-    <glob pattern="*.clkx"/>
-  </mime-type>
-  <mime-type type="application/vnd.crick.clicker.keyboard">
-    <glob pattern="*.clkk"/>
-  </mime-type>
-  <mime-type type="application/vnd.crick.clicker.palette">
-    <glob pattern="*.clkp"/>
-  </mime-type>
-  <mime-type type="application/vnd.crick.clicker.template">
-    <glob pattern="*.clkt"/>
-  </mime-type>
-  <mime-type type="application/vnd.crick.clicker.wordbank">
-    <glob pattern="*.clkw"/>
-  </mime-type>
-  <mime-type type="application/vnd.criticaltools.wbs+xml">
-    <glob pattern="*.wbs"/>
-  </mime-type>
-  <mime-type type="application/vnd.ctc-posml">
-    <glob pattern="*.pml"/>
-  </mime-type>
-  <mime-type type="application/vnd.ctct.ws+xml"/>
-  <mime-type type="application/vnd.cups-pdf"/>
-  <mime-type type="application/vnd.cups-postscript"/>
-  <mime-type type="application/vnd.cups-ppd">
-    <glob pattern="*.ppd"/>
-  </mime-type>
-  <mime-type type="application/vnd.cups-raster"/>
-  <mime-type type="application/vnd.cups-raw"/>
-  <mime-type type="application/vnd.curl.car">
-    <glob pattern="*.car"/>
-  </mime-type>
-  <mime-type type="application/vnd.curl.pcurl">
-    <glob pattern="*.pcurl"/>
-  </mime-type>
-  <mime-type type="application/vnd.cybank"/>
-  <mime-type type="application/vnd.data-vision.rdz">
-    <glob pattern="*.rdz"/>
-  </mime-type>
-  <mime-type type="application/vnd.denovo.fcselayout-link">
-    <glob pattern="*.fe_launch"/>
-  </mime-type>
-  <mime-type type="application/vnd.dir-bi.plate-dl-nosuffix"/>
-  <mime-type type="application/vnd.dna">
-    <glob pattern="*.dna"/>
-  </mime-type>
-  <mime-type type="application/vnd.dolby.mlp">
-    <glob pattern="*.mlp"/>
-  </mime-type>
-  <mime-type type="application/vnd.dolby.mobile.1"/>
-  <mime-type type="application/vnd.dolby.mobile.2"/>
-  <mime-type type="application/vnd.dpgraph">
-    <glob pattern="*.dpg"/>
-  </mime-type>
-  <mime-type type="application/vnd.dreamfactory">
-    <glob pattern="*.dfac"/>
-  </mime-type>
-  <mime-type type="application/vnd.dvb.esgcontainer"/>
-  <mime-type type="application/vnd.dvb.ipdcdftnotifaccess"/>
-  <mime-type type="application/vnd.dvb.ipdcesgaccess"/>
-  <mime-type type="application/vnd.dvb.ipdcroaming"/>
-  <mime-type type="application/vnd.dvb.iptv.alfec-base"/>
-  <mime-type type="application/vnd.dvb.iptv.alfec-enhancement"/>
-  <mime-type type="application/vnd.dvb.notif-aggregate-root+xml"/>
-  <mime-type type="application/vnd.dvb.notif-container+xml"/>
-  <mime-type type="application/vnd.dvb.notif-generic+xml"/>
-  <mime-type type="application/vnd.dvb.notif-ia-msglist+xml"/>
-  <mime-type type="application/vnd.dvb.notif-ia-registration-request+xml"/>
-  <mime-type type="application/vnd.dvb.notif-ia-registration-response+xml"/>
-  <mime-type type="application/vnd.dvb.notif-init+xml"/>
-  <mime-type type="application/vnd.dxr"/>
-  <mime-type type="application/vnd.dynageo">
-    <glob pattern="*.geo"/>
-  </mime-type>
-  <mime-type type="application/vnd.ecdis-update"/>
-  <mime-type type="application/vnd.ecowin.chart">
-    <glob pattern="*.mag"/>
-  </mime-type>
-  <mime-type type="application/vnd.ecowin.filerequest"/>
-  <mime-type type="application/vnd.ecowin.fileupdate"/>
-  <mime-type type="application/vnd.ecowin.series"/>
-  <mime-type type="application/vnd.ecowin.seriesrequest"/>
-  <mime-type type="application/vnd.ecowin.seriesupdate"/>
-  <mime-type type="application/vnd.emclient.accessrequest+xml"/>
-  <mime-type type="application/vnd.enliven">
-    <glob pattern="*.nml"/>
-  </mime-type>
-  <mime-type type="application/vnd.epson.esf">
-    <glob pattern="*.esf"/>
-  </mime-type>
-  <mime-type type="application/vnd.epson.msf">
-    <glob pattern="*.msf"/>
-  </mime-type>
-  <mime-type type="application/vnd.epson.quickanime">
-    <glob pattern="*.qam"/>
-  </mime-type>
-  <mime-type type="application/vnd.epson.salt">
-    <glob pattern="*.slt"/>
-  </mime-type>
-  <mime-type type="application/vnd.epson.ssf">
-    <glob pattern="*.ssf"/>
-  </mime-type>
-  <mime-type type="application/vnd.ericsson.quickcall"/>
-  <mime-type type="application/vnd.eszigno3+xml">
-    <glob pattern="*.es3"/>
-    <glob pattern="*.et3"/>
-  </mime-type>
-  <mime-type type="application/vnd.etsi.aoc+xml"/>
-  <mime-type type="application/vnd.etsi.cug+xml"/>
-  <mime-type type="application/vnd.etsi.iptvcommand+xml"/>
-  <mime-type type="application/vnd.etsi.iptvdiscovery+xml"/>
-  <mime-type type="application/vnd.etsi.iptvprofile+xml"/>
-  <mime-type type="application/vnd.etsi.iptvsad-bc+xml"/>
-  <mime-type type="application/vnd.etsi.iptvsad-cod+xml"/>
-  <mime-type type="application/vnd.etsi.iptvsad-npvr+xml"/>
-  <mime-type type="application/vnd.etsi.iptvueprofile+xml"/>
-  <mime-type type="application/vnd.etsi.mcid+xml"/>
-  <mime-type type="application/vnd.etsi.sci+xml"/>
-  <mime-type type="application/vnd.etsi.simservs+xml"/>
-  <mime-type type="application/vnd.eudora.data"/>
-  <mime-type type="application/vnd.ezpix-album">
-    <glob pattern="*.ez2"/>
-  </mime-type>
-  <mime-type type="application/vnd.ezpix-package">
-    <glob pattern="*.ez3"/>
-  </mime-type>
-  <mime-type type="application/vnd.f-secure.mobile"/>
-  <mime-type type="application/vnd.fdf">
-    <glob pattern="*.fdf"/>
-  </mime-type>
-  <mime-type type="application/vnd.fdsn.mseed">
-    <glob pattern="*.mseed"/>
-  </mime-type>
-  <mime-type type="application/vnd.fdsn.seed">
-    <glob pattern="*.seed"/>
-    <glob pattern="*.dataless"/>
-  </mime-type>
-  <mime-type type="application/vnd.ffsns"/>
-  <mime-type type="application/vnd.fints"/>
-  <mime-type type="application/vnd.flographit">
-    <glob pattern="*.gph"/>
-  </mime-type>
-  <mime-type type="application/vnd.fluxtime.clip">
-    <glob pattern="*.ftc"/>
-  </mime-type>
-  <mime-type type="application/vnd.font-fontforge-sfd"/>
-  <mime-type type="application/vnd.framemaker">
-    <glob pattern="*.fm"/>
-    <glob pattern="*.frame"/>
-    <glob pattern="*.maker"/>
-    <glob pattern="*.book"/>
-  </mime-type>
-  <mime-type type="application/vnd.frogans.fnc">
-    <glob pattern="*.fnc"/>
-  </mime-type>
-  <mime-type type="application/vnd.frogans.ltf">
-    <glob pattern="*.ltf"/>
-  </mime-type>
-  <mime-type type="application/vnd.fsc.weblaunch">
-    <glob pattern="*.fsc"/>
-  </mime-type>
-  <mime-type type="application/vnd.fujitsu.oasys">
-    <glob pattern="*.oas"/>
-  </mime-type>
-  <mime-type type="application/vnd.fujitsu.oasys2">
-    <glob pattern="*.oa2"/>
-  </mime-type>
-  <mime-type type="application/vnd.fujitsu.oasys3">
-    <glob pattern="*.oa3"/>
-  </mime-type>
-  <mime-type type="application/vnd.fujitsu.oasysgp">
-    <glob pattern="*.fg5"/>
-  </mime-type>
-  <mime-type type="application/vnd.fujitsu.oasysprs">
-    <glob pattern="*.bh2"/>
-  </mime-type>
-  <mime-type type="application/vnd.fujixerox.art-ex"/>
-  <mime-type type="application/vnd.fujixerox.art4"/>
-  <mime-type type="application/vnd.fujixerox.hbpl"/>
-  <mime-type type="application/vnd.fujixerox.ddd">
-    <glob pattern="*.ddd"/>
-  </mime-type>
-  <mime-type type="application/vnd.fujixerox.docuworks">
-    <glob pattern="*.xdw"/>
-  </mime-type>
-  <mime-type type="application/vnd.fujixerox.docuworks.binder">
-    <glob pattern="*.xbd"/>
-  </mime-type>
-  <mime-type type="application/vnd.fut-misnet"/>
-  <mime-type type="application/vnd.fuzzysheet">
-    <glob pattern="*.fzs"/>
-  </mime-type>
-  <mime-type type="application/vnd.genomatix.tuxedo">
-    <glob pattern="*.txd"/>
-  </mime-type>
-  <mime-type type="application/vnd.geogebra.file">
-    <glob pattern="*.ggb"/>
-  </mime-type>
-  <mime-type type="application/vnd.geogebra.tool">
-    <glob pattern="*.ggt"/>
-  </mime-type>
-  <mime-type type="application/vnd.geometry-explorer">
-    <glob pattern="*.gex"/>
-    <glob pattern="*.gre"/>
-  </mime-type>
-  <mime-type type="application/vnd.gmx">
-    <glob pattern="*.gmx"/>
-  </mime-type>
-  <mime-type type="application/vnd.google-earth.kml+xml">
-    <glob pattern="*.kml"/>
-  </mime-type>
-  <mime-type type="application/vnd.google-earth.kmz">
-    <glob pattern="*.kmz"/>
-  </mime-type>
-  <mime-type type="application/vnd.grafeq">
-    <glob pattern="*.gqf"/>
-    <glob pattern="*.gqs"/>
-  </mime-type>
-  <mime-type type="application/vnd.gridmp"/>
-  <mime-type type="application/vnd.groove-account">
-    <glob pattern="*.gac"/>
-  </mime-type>
-  <mime-type type="application/vnd.groove-help">
-    <glob pattern="*.ghf"/>
-  </mime-type>
-  <mime-type type="application/vnd.groove-identity-message">
-    <glob pattern="*.gim"/>
-  </mime-type>
-  <mime-type type="application/vnd.groove-injector">
-    <glob pattern="*.grv"/>
-  </mime-type>
-  <mime-type type="application/vnd.groove-tool-message">
-    <glob pattern="*.gtm"/>
-  </mime-type>
-  <mime-type type="application/vnd.groove-tool-template">
-    <glob pattern="*.tpl"/>
-  </mime-type>
-  <mime-type type="application/vnd.groove-vcard">
-    <glob pattern="*.vcg"/>
-  </mime-type>
-  <mime-type type="application/vnd.handheld-entertainment+xml">
-    <glob pattern="*.zmm"/>
-  </mime-type>
-  <mime-type type="application/vnd.hbci">
-    <glob pattern="*.hbci"/>
-  </mime-type>
-  <mime-type type="application/vnd.hcl-bireports"/>
-  <mime-type type="application/vnd.hhe.lesson-player">
-    <glob pattern="*.les"/>
-  </mime-type>
-  <mime-type type="application/vnd.hp-hpgl">
-    <glob pattern="*.hpgl"/>
-  </mime-type>
-  <mime-type type="application/vnd.hp-hpid">
-    <glob pattern="*.hpid"/>
-  </mime-type>
-  <mime-type type="application/vnd.hp-hps">
-    <glob pattern="*.hps"/>
-  </mime-type>
-  <mime-type type="application/vnd.hp-jlyt">
-    <glob pattern="*.jlt"/>
-  </mime-type>
-  <mime-type type="application/vnd.hp-pcl">
-    <glob pattern="*.pcl"/>
-  </mime-type>
-  <mime-type type="application/vnd.hp-pclxl">
-    <glob pattern="*.pclxl"/>
-  </mime-type>
-  <mime-type type="application/vnd.httphone"/>
-  <mime-type type="application/vnd.hydrostatix.sof-data">
-    <glob pattern="*.sfd-hdstx"/>
-  </mime-type>
-  <mime-type type="application/vnd.hzn-3d-crossword">
-    <glob pattern="*.x3d"/>
-  </mime-type>
-  <mime-type type="application/vnd.ibm.afplinedata"/>
-  <mime-type type="application/vnd.ibm.electronic-media"/>
-  <mime-type type="application/vnd.ibm.minipay">
-    <glob pattern="*.mpy"/>
-  </mime-type>
-  <mime-type type="application/vnd.ibm.modcap">
-    <glob pattern="*.afp"/>
-    <glob pattern="*.listafp"/>
-    <glob pattern="*.list3820"/>
-  </mime-type>
-  <mime-type type="application/vnd.ibm.rights-management">
-    <glob pattern="*.irm"/>
-  </mime-type>
-  <mime-type type="application/vnd.ibm.secure-container">
-    <glob pattern="*.sc"/>
-  </mime-type>
-  <mime-type type="application/vnd.iccprofile">
-    <glob pattern="*.icc"/>
-    <glob pattern="*.icm"/>
-  </mime-type>
-  <mime-type type="application/vnd.igloader">
-    <glob pattern="*.igl"/>
-  </mime-type>
-  <mime-type type="application/vnd.immervision-ivp">
-    <glob pattern="*.ivp"/>
-  </mime-type>
-  <mime-type type="application/vnd.immervision-ivu">
-    <glob pattern="*.ivu"/>
-  </mime-type>
-  <mime-type type="application/vnd.informedcontrol.rms+xml"/>
-  <mime-type type="application/vnd.informix-visionary"/>
-  <mime-type type="application/vnd.intercon.formnet">
-    <glob pattern="*.xpw"/>
-    <glob pattern="*.xpx"/>
-  </mime-type>
-  <mime-type type="application/vnd.intertrust.digibox"/>
-  <mime-type type="application/vnd.intertrust.nncp"/>
-  <mime-type type="application/vnd.intu.qbo">
-    <glob pattern="*.qbo"/>
-  </mime-type>
-  <mime-type type="application/vnd.intu.qfx">
-    <glob pattern="*.qfx"/>
-  </mime-type>
-  <mime-type type="application/vnd.iptc.g2.conceptitem+xml"/>
-  <mime-type type="application/vnd.iptc.g2.knowledgeitem+xml"/>
-  <mime-type type="application/vnd.iptc.g2.newsitem+xml"/>
-  <mime-type type="application/vnd.iptc.g2.packageitem+xml"/>
-  <mime-type type="application/vnd.ipunplugged.rcprofile">
-    <glob pattern="*.rcprofile"/>
-  </mime-type>
-  <mime-type type="application/vnd.irepository.package+xml">
-    <glob pattern="*.irp"/>
-  </mime-type>
-  <mime-type type="application/vnd.is-xpr">
-    <glob pattern="*.xpr"/>
-  </mime-type>
-  <mime-type type="application/vnd.jam">
-    <glob pattern="*.jam"/>
-  </mime-type>
-  <mime-type type="application/vnd.japannet-directory-service"/>
-  <mime-type type="application/vnd.japannet-jpnstore-wakeup"/>
-  <mime-type type="application/vnd.japannet-payment-wakeup"/>
-  <mime-type type="application/vnd.japannet-registration"/>
-  <mime-type type="application/vnd.japannet-registration-wakeup"/>
-  <mime-type type="application/vnd.japannet-setstore-wakeup"/>
-  <mime-type type="application/vnd.japannet-verification"/>
-  <mime-type type="application/vnd.japannet-verification-wakeup"/>
-  <mime-type type="application/vnd.jcp.javame.midlet-rms">
-    <glob pattern="*.rms"/>
-  </mime-type>
-  <mime-type type="application/vnd.jisp">
-    <glob pattern="*.jisp"/>
-  </mime-type>
-  <mime-type type="application/vnd.joost.joda-archive">
-    <glob pattern="*.joda"/>
-  </mime-type>
-  <mime-type type="application/vnd.kahootz">
-    <glob pattern="*.ktz"/>
-    <glob pattern="*.ktr"/>
-  </mime-type>
-  <mime-type type="application/vnd.kde.karbon">
-    <glob pattern="*.karbon"/>
-  </mime-type>
-  <mime-type type="application/vnd.kde.kchart">
-    <glob pattern="*.chrt"/>
-  </mime-type>
-  <mime-type type="application/vnd.kde.kformula">
-    <glob pattern="*.kfo"/>
-  </mime-type>
-  <mime-type type="application/vnd.kde.kivio">
-    <glob pattern="*.flw"/>
-  </mime-type>
-  <mime-type type="application/vnd.kde.kontour">
-    <glob pattern="*.kon"/>
-  </mime-type>
-  <mime-type type="application/vnd.kde.kpresenter">
-    <glob pattern="*.kpr"/>
-    <glob pattern="*.kpt"/>
-  </mime-type>
-  <mime-type type="application/vnd.kde.kspread">
-    <glob pattern="*.ksp"/>
-  </mime-type>
-  <mime-type type="application/vnd.kde.kword">
-    <glob pattern="*.kwd"/>
-    <glob pattern="*.kwt"/>
-  </mime-type>
-  <mime-type type="application/vnd.kenameaapp">
-    <glob pattern="*.htke"/>
-  </mime-type>
-  <mime-type type="application/vnd.kidspiration">
-    <glob pattern="*.kia"/>
-  </mime-type>
-  <mime-type type="application/vnd.kinar">
-    <glob pattern="*.kne"/>
-    <glob pattern="*.knp"/>
-  </mime-type>
-  <mime-type type="application/vnd.koan">
-    <alias type="application/x-koan"/>
-    <_comment>SSEYO Koan File</_comment>
-    <glob pattern="*.skp"/>
-    <glob pattern="*.skd"/>
-    <glob pattern="*.skt"/>
-    <glob pattern="*.skm"/>
-  </mime-type>
-  <mime-type type="application/vnd.kodak-descriptor">
-    <glob pattern="*.sse"/>
-  </mime-type>
-  <mime-type type="application/vnd.liberty-request+xml"/>
-  <mime-type type="application/vnd.llamagraphics.life-balance.desktop">
-    <glob pattern="*.lbd"/>
-  </mime-type>
-  <mime-type type="application/vnd.llamagraphics.life-balance.exchange+xml">
-    <glob pattern="*.lbe"/>
-  </mime-type>
-  <mime-type type="application/vnd.lotus-1-2-3">
-    <glob pattern="*.123"/>
-  </mime-type>
-  <mime-type type="application/vnd.lotus-approach">
-    <glob pattern="*.apr"/>
-  </mime-type>
-  <mime-type type="application/vnd.lotus-freelance">
-    <glob pattern="*.pre"/>
-  </mime-type>
-  <mime-type type="application/vnd.lotus-notes">
-    <glob pattern="*.nsf"/>
-  </mime-type>
-  <mime-type type="application/vnd.lotus-organizer">
-    <glob pattern="*.org"/>
-  </mime-type>
-  <mime-type type="application/vnd.lotus-screencam">
-    <glob pattern="*.scm"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.lotus-wordpro">
-    <magic priority="50">
-      <match value="WordPro\0" type="string" offset="0" />
-      <match value="WordPro\r\373" type="string" offset="0" />
-    </magic>
-    <glob pattern="*.lwp"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.macports.portpkg">
-    <glob pattern="*.portpkg"/>
-  </mime-type>
-  <mime-type type="application/vnd.marlin.drm.actiontoken+xml"/>
-  <mime-type type="application/vnd.marlin.drm.conftoken+xml"/>
-  <mime-type type="application/vnd.marlin.drm.license+xml"/>
-  <mime-type type="application/vnd.marlin.drm.mdcf"/>
-  <mime-type type="application/vnd.mcd">
-    <glob pattern="*.mcd"/>
-  </mime-type>
-  <mime-type type="application/vnd.medcalcdata">
-    <glob pattern="*.mc1"/>
-  </mime-type>
-  <mime-type type="application/vnd.mediastation.cdkey">
-    <glob pattern="*.cdkey"/>
-  </mime-type>
-  <mime-type type="application/vnd.meridian-slingshot"/>
-  <mime-type type="application/vnd.mfer">
-    <glob pattern="*.mwf"/>
-  </mime-type>
-  <mime-type type="application/vnd.mfmp">
-    <glob pattern="*.mfm"/>
-  </mime-type>
-  <mime-type type="application/vnd.micrografx.flo">
-    <glob pattern="*.flo"/>
-  </mime-type>
-  <mime-type type="application/vnd.micrografx.igx">
-    <glob pattern="*.igx"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.mif">
-    <_comment>FrameMaker MIF document</_comment>
-    <alias type="application/x-mif"/>
-    <alias type="application/x-frame"/>
-    <magic priority="50">
-      <match value="\&lt;MakerFile" type="string" offset="0" />
-      <match value="\&lt;MIFFile" type="string" offset="0" />
-      <match value="\&lt;MakerDictionary" type="string" offset="0" />
-      <match value="\&lt;MakerScreenFont" type="string" offset="0" />
-      <match value="\&lt;MML" type="string" offset="0" />
-      <match value="\&lt;Book" type="string" offset="0" />
-      <match value="\&lt;Maker" type="string" offset="0" />
-    </magic>
-    <glob pattern="*.mif"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.minisoft-hp3000-save"/>
-  <mime-type type="application/vnd.mitsubishi.misty-guard.trustweb"/>
-  <mime-type type="application/vnd.mobius.daf">
-    <glob pattern="*.daf"/>
-  </mime-type>
-  <mime-type type="application/vnd.mobius.dis">
-    <glob pattern="*.dis"/>
-  </mime-type>
-  <mime-type type="application/vnd.mobius.mbk">
-    <glob pattern="*.mbk"/>
-  </mime-type>
-  <mime-type type="application/vnd.mobius.mqy">
-    <glob pattern="*.mqy"/>
-  </mime-type>
-  <mime-type type="application/vnd.mobius.msl">
-    <glob pattern="*.msl"/>
-  </mime-type>
-  <mime-type type="application/vnd.mobius.plc">
-    <glob pattern="*.plc"/>
-  </mime-type>
-  <mime-type type="application/vnd.mobius.txf">
-    <glob pattern="*.txf"/>
-  </mime-type>
-  <mime-type type="application/vnd.mophun.application">
-    <glob pattern="*.mpn"/>
-  </mime-type>
-  <mime-type type="application/vnd.mophun.certificate">
-    <glob pattern="*.mpc"/>
-  </mime-type>
-  <mime-type type="application/vnd.motorola.flexsuite"/>
-  <mime-type type="application/vnd.motorola.flexsuite.adsi"/>
-  <mime-type type="application/vnd.motorola.flexsuite.fis"/>
-  <mime-type type="application/vnd.motorola.flexsuite.gotap"/>
-  <mime-type type="application/vnd.motorola.flexsuite.kmr"/>
-  <mime-type type="application/vnd.motorola.flexsuite.ttc"/>
-  <mime-type type="application/vnd.motorola.flexsuite.wem"/>
-  <mime-type type="application/vnd.motorola.iprm"/>
-  <mime-type type="application/vnd.mozilla.xul+xml">
-    <glob pattern="*.xul"/>
-  </mime-type>
-  <mime-type type="application/vnd.ms-artgalry">
-    <glob pattern="*.cil"/>
-  </mime-type>
-  <mime-type type="application/vnd.ms-asf"/>
-  <mime-type type="application/vnd.ms-cab-compressed">
-    <glob pattern="*.cab"/>
-  </mime-type>
-
-  <!-- http://www.iana.org/assignments/media-types/application/vnd.ms-excel -->
-  <mime-type type="application/vnd.ms-excel">
-    <!-- Use org.apache.tika.detect.ContainerAwareDetector for more reliable detection of OLE2 documents -->
-    <alias type="application/msexcel" />
-    <_comment>Microsoft Excel Spreadsheet</_comment>
-    <magic priority="50">
-      <match value="Microsoft\ Excel\ 5.0\ Worksheet" type="string" offset="2080"/>
-      <match value="Foglio\ di\ lavoro\ Microsoft\ Exce" type="string" offset="2080"/>
-      <match value="Biff5" type="string" offset="2114"/>
-      <match value="Biff5" type="string" offset="2121"/>
-      <match value="\x09\x04\x06\x00\x00\x00\x10\x00" type="string" offset="0"/>
-      <match value="0xd0cf11e0a1b11ae1" type="string" offset="0:8">
-         <match value="W\x00o\x00r\x00k\x00b\x00o\x00o\x00k" type="string" offset="1152:4096" />
-      </match>
-    </magic>
-    <glob pattern="*.xls"/>
-    <glob pattern="*.xlm"/>
-    <glob pattern="*.xla"/>
-    <glob pattern="*.xlc"/>
-    <glob pattern="*.xlt"/>
-    <glob pattern="*.xlw"/>
-    <glob pattern="*.xll"/>
-    <glob pattern="*.xld"/>
-    <sub-class-of type="application/x-tika-msoffice"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-excel.addin.macroenabled.12">
-    <_comment>Office Open XML Workbook Add-in (macro-enabled)</_comment>
-    <glob pattern="*.xlam"/>
-    <sub-class-of type="application/x-tika-ooxml"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-excel.sheet.macroenabled.12">
-    <_comment>Office Open XML Workbook (macro-enabled)</_comment>
-    <glob pattern="*.xlsm"/>
-    <sub-class-of type="application/x-tika-ooxml"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-excel.sheet.binary.macroenabled.12">
-    <_comment>Microsoft Excel 2007 Binary Spreadsheet</_comment>
-    <glob pattern="*.xlsb"/>
-    <sub-class-of type="application/vnd.ms-excel"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-excel.template.macroenabled.12">
-    <glob pattern="*.xltm"/>
-    <sub-class-of type="application/x-tika-ooxml"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-fontobject">
-    <glob pattern="*.eot"/>
-  </mime-type>
-  <mime-type type="application/vnd.ms-htmlhelp">
-    <glob pattern="*.chm"/>
-  </mime-type>
-  <mime-type type="application/vnd.ms-ims">
-    <glob pattern="*.ims"/>
-  </mime-type>
-  <mime-type type="application/vnd.ms-lrm">
-    <glob pattern="*.lrm"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-outlook">
-    <_comment>Microsoft Outlook Message</_comment>
-    <glob pattern="*.msg" />
-    <sub-class-of type="application/x-tika-msoffice"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-pki.seccat">
-    <glob pattern="*.cat"/>
-  </mime-type>
-  <mime-type type="application/vnd.ms-pki.stl">
-    <glob pattern="*.stl"/>
-  </mime-type>
-  <mime-type type="application/vnd.ms-playready.initiator+xml"/>
-
-  <!-- http://www.iana.org/assignments/media-types/application/vnd.ms-powerpoint -->
-  <mime-type type="application/vnd.ms-powerpoint">
-    <!-- Use org.apache.tika.detect.ContainerAwareDetector for more reliable detection of OLE2 documents -->
-    <alias type="application/mspowerpoint"/>
-    <_comment>Microsoft Powerpoint Presentation</_comment>
-    <magic priority="50">
-      <match value="0xd0cf11e0a1b11ae1" type="string" offset="0:8">
-         <match value="P\x00o\x00w\x00e\x00r\x00P\x00o\x00i\x00n\x00t\x00 D\x00o\x00c\x00u\x00m\x00e\x00n\x00t" type="string" offset="1152:4096" />
-      </match>
-    </magic>
-    <glob pattern="*.ppz"/>
-    <glob pattern="*.ppt"/>
-    <glob pattern="*.pps"/>
-    <glob pattern="*.pot"/>
-    <glob pattern="*.ppa"/>
-    <sub-class-of type="application/x-tika-msoffice"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-powerpoint.addin.macroenabled.12">
-    <_comment>Office Open XML Presentation Add-in (macro-enabled)</_comment>
-    <glob pattern="*.ppam"/>
-    <sub-class-of type="application/x-tika-msoffice"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-powerpoint.presentation.macroenabled.12">
-    <_comment>Office Open XML Presentation (macro-enabled)</_comment>
-    <glob pattern="*.pptm"/>
-    <sub-class-of type="application/x-tika-msoffice"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-powerpoint.slide.macroenabled.12">
-    <glob pattern="*.sldm"/>
-    <sub-class-of type="application/x-tika-msoffice"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-powerpoint.slideshow.macroenabled.12">
-    <_comment>Office Open XML Presentation Slideshow (macro-enabled)</_comment>
-    <glob pattern="*.ppsm"/>
-    <sub-class-of type="application/x-tika-msoffice"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-powerpoint.template.macroenabled.12">
-    <glob pattern="*.potm"/>
-    <sub-class-of type="application/x-tika-msoffice"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-project">
-    <glob pattern="*.mpp"/>
-    <glob pattern="*.mpt"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-tnef">
-    <alias type="application/ms-tnef" />
-    <magic priority="50">
-      <match value="0x223e9f78" type="little16" offset="0" />
-    </magic>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-wmdrm.lic-chlg-req"/>
-  <mime-type type="application/vnd.ms-wmdrm.lic-resp"/>
-  <mime-type type="application/vnd.ms-wmdrm.meter-chlg-req"/>
-  <mime-type type="application/vnd.ms-wmdrm.meter-resp"/>
-
-  <mime-type type="application/vnd.ms-word.document.macroenabled.12">
-    <_comment>Office Open XML Document (macro-enabled)</_comment>
-    <glob pattern="*.docm"/>
-    <sub-class-of type="application/x-tika-ooxml"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-word.template.macroenabled.12">
-    <_comment>Office Open XML Document Template (macro-enabled)</_comment>
-    <glob pattern="*.dotm"/>
-    <sub-class-of type="application/x-tika-ooxml"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-works">
-    <glob pattern="*.wps"/>
-    <glob pattern="*.wks"/>
-    <glob pattern="*.wcm"/>
-    <glob pattern="*.wdb"/>
-  </mime-type>
-  <mime-type type="application/vnd.ms-wpl">
-    <glob pattern="*.wpl"/>
-  </mime-type>
-  <mime-type type="application/vnd.ms-xpsdocument">
-    <glob pattern="*.xps"/>
-  </mime-type>
-  <mime-type type="application/vnd.mseq">
-    <glob pattern="*.mseq"/>
-  </mime-type>
-  <mime-type type="application/vnd.msign"/>
-  <mime-type type="application/vnd.multiad.creator"/>
-  <mime-type type="application/vnd.multiad.creator.cif"/>
-  <mime-type type="application/vnd.music-niff"/>
-  <mime-type type="application/vnd.musician">
-    <glob pattern="*.mus"/>
-  </mime-type>
-  <mime-type type="application/vnd.muvee.style">
-    <glob pattern="*.msty"/>
-  </mime-type>
-  <mime-type type="application/vnd.ncd.control"/>
-  <mime-type type="application/vnd.ncd.reference"/>
-  <mime-type type="application/vnd.nervana"/>
-  <mime-type type="application/vnd.netfpx"/>
-  <mime-type type="application/vnd.neurolanguage.nlu">
-    <glob pattern="*.nlu"/>
-  </mime-type>
-  <mime-type type="application/vnd.noblenet-directory">
-    <glob pattern="*.nnd"/>
-  </mime-type>
-  <mime-type type="application/vnd.noblenet-sealer">
-    <glob pattern="*.nns"/>
-  </mime-type>
-  <mime-type type="application/vnd.noblenet-web">
-    <glob pattern="*.nnw"/>
-  </mime-type>
-  <mime-type type="application/vnd.nokia.catalogs"/>
-  <mime-type type="application/vnd.nokia.conml+wbxml"/>
-  <mime-type type="application/vnd.nokia.conml+xml"/>
-  <mime-type type="application/vnd.nokia.isds-radio-presets"/>
-  <mime-type type="application/vnd.nokia.iptv.config+xml"/>
-  <mime-type type="application/vnd.nokia.landmark+wbxml"/>
-  <mime-type type="application/vnd.nokia.landmark+xml"/>
-  <mime-type type="application/vnd.nokia.landmarkcollection+xml"/>
-  <mime-type type="application/vnd.nokia.n-gage.ac+xml"/>
-  <mime-type type="application/vnd.nokia.n-gage.data">
-    <glob pattern="*.ngdat"/>
-  </mime-type>
-  <mime-type type="application/vnd.nokia.n-gage.symbian.install">
-    <glob pattern="*.n-gage"/>
-  </mime-type>
-  <mime-type type="application/vnd.nokia.ncd"/>
-  <mime-type type="application/vnd.nokia.pcd+wbxml"/>
-  <mime-type type="application/vnd.nokia.pcd+xml"/>
-  <mime-type type="application/vnd.nokia.radio-preset">
-    <glob pattern="*.rpst"/>
-  </mime-type>
-  <mime-type type="application/vnd.nokia.radio-presets">
-    <glob pattern="*.rpss"/>
-  </mime-type>
-  <mime-type type="application/vnd.novadigm.edm">
-    <glob pattern="*.edm"/>
-  </mime-type>
-  <mime-type type="application/vnd.novadigm.edx">
-    <glob pattern="*.edx"/>
-  </mime-type>
-  <mime-type type="application/vnd.novadigm.ext">
-    <glob pattern="*.ext"/>
-  </mime-type>
-
-  <!-- =================================================================== -->
-  <!-- Open Document Format for Office Applications (OpenDocument) v1.0 -->
-  <!-- http://www.oasis-open.org/specs/index.php#opendocumentv1.0 -->
-  <!-- =================================================================== -->
-
-  <mime-type type="application/vnd.oasis.opendocument.chart">
-    <alias type="application/x-vnd.oasis.opendocument.chart"/>
-    <_comment>OpenDocument v1.0: Chart document</_comment>
-    <magic>
-      <match type="string" offset="0" value="PK">
-        <match type="string" offset="30"
-               value="mimetypeapplication/vnd.oasis.opendocument.chart"/>
-      </match>
-    </magic>
-    <glob pattern="*.odc"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.oasis.opendocument.chart-template">
-    <alias type="application/x-vnd.oasis.opendocument.chart-template"/>
-    <_comment>OpenDocument v1.0: Chart document used as template</_comment>
-    <magic>
-      <match type="string" offset="0" value="PK">
-        <match type="string" offset="30"
-               value="mimetypeapplication/vnd.oasis.opendocument.chart-template"/>
-      </match>
-    </magic>
-    <glob pattern="*.otc"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.oasis.opendocument.database">
-    <glob pattern="*.odb"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.oasis.opendocument.formula">
-    <alias type="application/x-vnd.oasis.opendocument.formula"/>
-    <_comment>OpenDocument v1.0: Formula document</_comment>
-    <magic>
-      <match type="string" offset="0" value="PK">
-        <match type="string" offset="30"
-               value="mimetypeapplication/vnd.oasis.opendocument.formula" />
-      </match>
-    </magic>
-    <glob pattern="*.odf"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.oasis.opendocument.formula-template">
-    <alias type="application/x-vnd.oasis.opendocument.formula-template"/>
-    <_comment>OpenDocument v1.0: Formula document used as template</_comment>
-    <magic>
-      <match type="string" offset="0" value="PK">
-        <match type="string" offset="30"
-               value="mimetypeapplication/vnd.oasis.opendocument.formula-template"/>
-      </match>
-    </magic>
-    <glob pattern="*.odft"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.oasis.opendocument.graphics">
-    <alias type="application/x-vnd.oasis.opendocument.graphics"/>
-    <_comment>OpenDocument v1.0: Graphics document (Drawing)</_comment>
-    <magic>
-      <match type="string" offset="0" value="PK">
-        <match type="string" offset="30"
-               value="mimetypeapplication/vnd.oasis.opendocument.graphics"/>
-      </match>
-    </magic>
-    <glob pattern="*.odg"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.oasis.opendocument.graphics-template">
-    <alias type="application/x-vnd.oasis.opendocument.graphics-template"/>
-    <_comment>OpenDocument v1.0: Graphics document used as template</_comment>
-    <magic>
-      <match type="string" offset="0" value="PK">
-        <match type="string" offset="30"
-               value="mimetypeapplication/vnd.oasis.opendocument.graphics-template"/>
-      </match>
-    </magic>
-    <glob pattern="*.otg"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.oasis.opendocument.image">
-    <alias type="application/x-vnd.oasis.opendocument.image"/>
-    <_comment>OpenDocument v1.0: Image document</_comment>
-    <magic>
-      <match type="string" offset="0" value="PK">
-        <match type="string" offset="30"
-               value="mimetypeapplication/vnd.oasis.opendocument.image"/>
-      </match>
-    </magic>
-    <glob pattern="*.odi"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.oasis.opendocument.image-template">
-    <alias type="application/x-vnd.oasis.opendocument.image-template"/>
-    <_comment>OpenDocument v1.0: Image document used as template</_comment>
-    <magic>
-      <match type="string" offset="0" value="PK">
-        <match type="string" offset="30"
-               value="mimetypeapplication/vnd.oasis.opendocument.image-template"/>
-      </match>
-    </magic>
-    <glob pattern="*.oti"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.oasis.opendocument.presentation">
-    <alias type="application/x-vnd.oasis.opendocument.presentation"/>
-    <_comment>OpenDocument v1.0: Presentation document</_comment>
-    <magic>
-      <match type="string" offset="0" value="PK">
-        <match type="string" offset="30"
-               value="mimetypeapplication/vnd.oasis.opendocument.presentation"/>
-      </match>
-    </magic>
-    <glob pattern="*.odp"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.oasis.opendocument.presentation-template">
-    <alias type="application/x-vnd.oasis.opendocument.presentation-template"/>
-    <_comment>OpenDocument v1.0: Presentation document used as template</_comment>
-    <magic>
-      <match type="string" offset="0" value="PK">
-        <match type="string" offset="30"
-              value="mimetypeapplication/vnd.oasis.opendocument.presentation-template"/>
-      </match>
-    </magic>
-    <glob pattern="*.otp"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.oasis.opendocument.spreadsheet">
-    <alias type="application/x-vnd.oasis.opendocument.spreadsheet"/>
-    <_comment>OpenDocument v1.0: Spreadsheet document</_comment>
-    <magic>
-      <match type="string" offset="0" value="PK">
-        <match type="string" offset="30"
-               value="mimetypeapplication/vnd.oasis.opendocument.spreadsheet"/>
-      </match>
-    </magic>
-    <glob pattern="*.ods"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.oasis.opendocument.spreadsheet-template">
-    <alias type="application/x-vnd.oasis.opendocument.spreadsheet-template"/>
-    <_comment>OpenDocument v1.0: Spreadsheet document used as template</_comment>
-    <magic>
-      <match type="string" offset="0" value="PK">
-        <match type="string" offset="30"
-               value="mimetypeapplication/vnd.oasis.opendocument.spreadsheet-template"/>
-      </match>
-    </magic>
-    <glob pattern="*.ots"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.oasis.opendocument.text">
-    <alias type="application/x-vnd.oasis.opendocument.text"/>
-    <_comment>OpenDocument v1.0: Text document</_comment>
-    <magic>
-      <match type="string" offset="0" value="PK">
-        <match type="string" offset="30"
-               value="mimetypeapplication/vnd.oasis.opendocument.text"/>
-      </match>
-    </magic>
-    <glob pattern="*.odt"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.oasis.opendocument.text-master">
-    <alias type="application/x-vnd.oasis.opendocument.text-master"/>
-    <_comment>OpenDocument v1.0: Global Text document</_comment>
-    <magic>
-      <match type="string" offset="0" value="PK">
-        <match type="string" offset="30"
-               value="mimetypeapplication/vnd.oasis.opendocument.text-master"/>
-      </match>
-    </magic>
-    <glob pattern="*.otm"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.oasis.opendocument.text-template">
-    <alias type="application/x-vnd.oasis.opendocument.text-template"/>
-    <_comment>OpenDocument v1.0: Text document used as template</_comment>
-    <magic>
-      <match type="string" offset="0" value="PK">
-        <match type="string" offset="30"
-              value="mimetypeapplication/vnd.oasis.opendocument.text-template"/>
-      </match>
-    </magic>
-    <glob pattern="*.ott"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.oasis.opendocument.text-web">
-    <alias type="application/x-vnd.oasis.opendocument.text-web"/>
-    <_comment>OpenDocument v1.0: Text document used as template for HTML documents</_comment>
-    <magic>
-      <match type="string" offset="0" value="PK">
-        <match type="string" offset="30"
-              value="mimetypeapplication/vnd.oasis.opendocument.text-web"/>
-      </match>
-    </magic>
-    <glob pattern="*.oth"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.obn"/>
-  <mime-type type="application/vnd.olpc-sugar">
-    <glob pattern="*.xo"/>
-  </mime-type>
-  <mime-type type="application/vnd.oma-scws-config"/>
-  <mime-type type="application/vnd.oma-scws-http-request"/>
-  <mime-type type="application/vnd.oma-scws-http-response"/>
-  <mime-type type="application/vnd.oma.bcast.associated-procedure-parameter+xml"/>
-  <mime-type type="application/vnd.oma.bcast.drm-trigger+xml"/>
-  <mime-type type="application/vnd.oma.bcast.imd+xml"/>
-  <mime-type type="application/vnd.oma.bcast.ltkm"/>
-  <mime-type type="application/vnd.oma.bcast.notification+xml"/>
-  <mime-type type="application/vnd.oma.bcast.provisioningtrigger"/>
-  <mime-type type="application/vnd.oma.bcast.sgboot"/>
-  <mime-type type="application/vnd.oma.bcast.sgdd+xml"/>
-  <mime-type type="application/vnd.oma.bcast.sgdu"/>
-  <mime-type type="application/vnd.oma.bcast.simple-symbol-container"/>
-  <mime-type type="application/vnd.oma.bcast.smartcard-trigger+xml"/>
-  <mime-type type="application/vnd.oma.bcast.sprov+xml"/>
-  <mime-type type="application/vnd.oma.bcast.stkm"/>
-  <mime-type type="application/vnd.oma.dcd"/>
-  <mime-type type="application/vnd.oma.dcdc"/>
-  <mime-type type="application/vnd.oma.dd2+xml">
-    <glob pattern="*.dd2"/>
-  </mime-type>
-  <mime-type type="application/vnd.oma.drm.risd+xml"/>
-  <mime-type type="application/vnd.oma.group-usage-list+xml"/>
-  <mime-type type="application/vnd.oma.poc.detailed-progress-report+xml"/>
-  <mime-type type="application/vnd.oma.poc.final-report+xml"/>
-  <mime-type type="application/vnd.oma.poc.groups+xml"/>
-  <mime-type type="application/vnd.oma.poc.invocation-descriptor+xml"/>
-  <mime-type type="application/vnd.oma.poc.optimized-progress-report+xml"/>
-  <mime-type type="application/vnd.oma.xcap-directory+xml"/>
-  <mime-type type="application/vnd.omads-email+xml"/>
-  <mime-type type="application/vnd.omads-file+xml"/>
-  <mime-type type="application/vnd.omads-folder+xml"/>
-  <mime-type type="application/vnd.omaloc-supl-init"/>
-
-  <mime-type type="application/vnd.openofficeorg.extension">
-    <glob pattern="*.oxt"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.openxmlformats-officedocument.presentationml.presentation">
-    <_comment>Office Open XML Presentation</_comment>
-    <glob pattern="*.pptx"/>
-    <glob pattern="*.thmx"/>
-    <sub-class-of type="application/x-tika-ooxml"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.openxmlformats-officedocument.presentationml.slide">
-    <glob pattern="*.sldx"/>
-    <sub-class-of type="application/x-tika-ooxml"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.openxmlformats-officedocument.presentationml.slideshow">
-    <glob pattern="*.ppsx"/>
-    <sub-class-of type="application/x-tika-ooxml"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.openxmlformats-officedocument.presentationml.template">
-    <_comment>Office Open XML Presentation Template</_comment>
-    <glob pattern="*.potx"/>
-    <sub-class-of type="application/x-tika-ooxml"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.openxmlformats-officedocument.presentationml.slideshow">
-    <_comment>Office Open XML Presentation Slideshow</_comment>
-    <glob pattern="*.ppsx"/>
-    <sub-class-of type="application/x-tika-ooxml"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
-    <_comment>Office Open XML Workbook</_comment>
-    <glob pattern="*.xlsx"/>
-    <sub-class-of type="application/x-tika-ooxml"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.openxmlformats-officedocument.spreadsheetml.template">
-    <_comment>Office Open XML Workbook Template</_comment>
-    <glob pattern="*.xltx"/>
-    <sub-class-of type="application/x-tika-ooxml"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.ms-excel.template.macroenabled.12">
-    <_comment>Office Open XML Workbook Template (macro-enabled)</_comment>
-    <glob pattern="*.xltm"/>
-    <sub-class-of type="application/x-tika-ooxml"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.openxmlformats-officedocument.wordprocessingml.document">
-    <_comment>Office Open XML Document</_comment>
-    <glob pattern="*.docx"/>
-    <sub-class-of type="application/x-tika-ooxml"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.openxmlformats-officedocument.wordprocessingml.template">
-    <_comment>Office Open XML Document Template</_comment>
-    <glob pattern="*.dotx"/>
-    <sub-class-of type="application/x-tika-ooxml"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.osa.netdeploy"/>
-  <mime-type type="application/vnd.osgi.bundle"/>
-  <mime-type type="application/vnd.osgi.dp">
-    <glob pattern="*.dp"/>
-  </mime-type>
-  <mime-type type="application/vnd.otps.ct-kip+xml"/>
-  <mime-type type="application/vnd.palm">
-    <glob pattern="*.pdb"/>
-    <glob pattern="*.pqa"/>
-    <glob pattern="*.oprc"/>
-  </mime-type>
-  <mime-type type="application/vnd.paos.xml"/>
-  <mime-type type="application/vnd.pg.format">
-    <glob pattern="*.str"/>
-  </mime-type>
-  <mime-type type="application/vnd.pg.osasli">
-    <glob pattern="*.ei6"/>
-  </mime-type>
-  <mime-type type="application/vnd.piaccess.application-licence"/>
-  <mime-type type="application/vnd.picsel">
-    <glob pattern="*.efif"/>
-  </mime-type>
-  <mime-type type="application/vnd.poc.group-advertisement+xml"/>
-  <mime-type type="application/vnd.pocketlearn">
-    <glob pattern="*.plf"/>
-  </mime-type>
-  <mime-type type="application/vnd.powerbuilder6">
-    <glob pattern="*.pbd"/>
-  </mime-type>
-  <mime-type type="application/vnd.powerbuilder6-s"/>
-  <mime-type type="application/vnd.powerbuilder7"/>
-  <mime-type type="application/vnd.powerbuilder7-s"/>
-  <mime-type type="application/vnd.powerbuilder75"/>
-  <mime-type type="application/vnd.powerbuilder75-s"/>
-  <mime-type type="application/vnd.preminet"/>
-  <mime-type type="application/vnd.previewsystems.box">
-    <glob pattern="*.box"/>
-  </mime-type>
-  <mime-type type="application/vnd.proteus.magazine">
-    <glob pattern="*.mgz"/>
-  </mime-type>
-  <mime-type type="application/vnd.publishare-delta-tree">
-    <glob pattern="*.qps"/>
-  </mime-type>
-  <mime-type type="application/vnd.pvi.ptid1">
-    <glob pattern="*.ptid"/>
-  </mime-type>
-  <mime-type type="application/vnd.pwg-multiplexed"/>
-  <mime-type type="application/vnd.pwg-xhtml-print+xml"/>
-  <mime-type type="application/vnd.qualcomm.brew-app-res"/>
-  <mime-type type="application/vnd.quark.quarkxpress">
-    <glob pattern="*.qxd"/>
-    <glob pattern="*.qxt"/>
-    <glob pattern="*.qwd"/>
-    <glob pattern="*.qwt"/>
-    <glob pattern="*.qxl"/>
-    <glob pattern="*.qxb"/>
-  </mime-type>
-  <mime-type type="application/vnd.rapid"/>
-  <mime-type type="application/vnd.recordare.musicxml">
-    <glob pattern="*.mxl"/>
-  </mime-type>
-  <mime-type type="application/vnd.recordare.musicxml+xml">
-    <glob pattern="*.musicxml"/>
-  </mime-type>
-  <mime-type type="application/vnd.renlearn.rlprint"/>
-  <mime-type type="application/vnd.rim.cod">
-    <glob pattern="*.cod"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.rn-realmedia">
-    <magic priority="50">
-      <match value=".RMF" type="string" offset="0" />
-    </magic>
-    <glob pattern="*.rm"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.route66.link66+xml">
-    <glob pattern="*.link66"/>
-  </mime-type>
-  <mime-type type="application/vnd.ruckus.download"/>
-  <mime-type type="application/vnd.s3sms"/>
-  <mime-type type="application/vnd.sbm.cid"/>
-  <mime-type type="application/vnd.sbm.mid2"/>
-  <mime-type type="application/vnd.scribus"/>
-  <mime-type type="application/vnd.sealed.3df"/>
-  <mime-type type="application/vnd.sealed.csf"/>
-  <mime-type type="application/vnd.sealed.doc"/>
-  <mime-type type="application/vnd.sealed.eml"/>
-  <mime-type type="application/vnd.sealed.mht"/>
-  <mime-type type="application/vnd.sealed.net"/>
-  <mime-type type="application/vnd.sealed.ppt"/>
-  <mime-type type="application/vnd.sealed.tiff"/>
-  <mime-type type="application/vnd.sealed.xls"/>
-  <mime-type type="application/vnd.sealedmedia.softseal.html"/>
-  <mime-type type="application/vnd.sealedmedia.softseal.pdf"/>
-  <mime-type type="application/vnd.seemail">
-    <glob pattern="*.see"/>
-  </mime-type>
-  <mime-type type="application/vnd.sema">
-    <glob pattern="*.sema"/>
-  </mime-type>
-  <mime-type type="application/vnd.semd">
-    <glob pattern="*.semd"/>
-  </mime-type>
-  <mime-type type="application/vnd.semf">
-    <glob pattern="*.semf"/>
-  </mime-type>
-  <mime-type type="application/vnd.shana.informed.formdata">
-    <glob pattern="*.ifm"/>
-  </mime-type>
-  <mime-type type="application/vnd.shana.informed.formtemplate">
-    <glob pattern="*.itp"/>
-  </mime-type>
-  <mime-type type="application/vnd.shana.informed.interchange">
-    <glob pattern="*.iif"/>
-  </mime-type>
-  <mime-type type="application/vnd.shana.informed.package">
-    <glob pattern="*.ipk"/>
-  </mime-type>
-  <mime-type type="application/vnd.simtech-mindmapper">
-    <glob pattern="*.twd"/>
-    <glob pattern="*.twds"/>
-  </mime-type>
-  <mime-type type="application/vnd.smaf">
-    <glob pattern="*.mmf"/>
-  </mime-type>
-  <mime-type type="application/vnd.smart.teacher">
-    <glob pattern="*.teacher"/>
-  </mime-type>
-  <mime-type type="application/vnd.software602.filler.form+xml"/>
-  <mime-type type="application/vnd.software602.filler.form-xml-zip"/>
-  <mime-type type="application/vnd.solent.sdkm+xml">
-    <glob pattern="*.sdkm"/>
-    <glob pattern="*.sdkd"/>
-  </mime-type>
-  <mime-type type="application/vnd.spotfire.dxp">
-    <glob pattern="*.dxp"/>
-  </mime-type>
-  <mime-type type="application/vnd.spotfire.sfs">
-    <glob pattern="*.sfs"/>
-  </mime-type>
-  <mime-type type="application/vnd.sss-cod"/>
-  <mime-type type="application/vnd.sss-dtf"/>
-  <mime-type type="application/vnd.sss-ntf"/>
-  <mime-type type="application/vnd.stardivision.calc">
-    <glob pattern="*.sdc"/>
-  </mime-type>
-  <mime-type type="application/vnd.stardivision.draw">
-    <glob pattern="*.sda"/>
-  </mime-type>
-  <mime-type type="application/vnd.stardivision.impress">
-    <glob pattern="*.sdd"/>
-  </mime-type>
-  <mime-type type="application/vnd.stardivision.math">
-    <glob pattern="*.smf"/>
-  </mime-type>
-  <mime-type type="application/vnd.stardivision.writer">
-    <glob pattern="*.sdw"/>
-  </mime-type>
-  <mime-type type="application/vnd.stardivision.writer">
-    <glob pattern="*.vor"/>
-  </mime-type>
-  <mime-type type="application/vnd.stardivision.writer-global">
-    <glob pattern="*.sgl"/>
-  </mime-type>
-  <mime-type type="application/vnd.street-stream"/>
-  <mime-type type="application/vnd.sun.xml.calc">
-    <glob pattern="*.sxc"/>
-  </mime-type>
-  <mime-type type="application/vnd.sun.xml.calc.template">
-    <glob pattern="*.stc"/>
-  </mime-type>
-  <mime-type type="application/vnd.sun.xml.draw">
-    <glob pattern="*.sxd"/>
-  </mime-type>
-  <mime-type type="application/vnd.sun.xml.draw.template">
-    <glob pattern="*.std"/>
-  </mime-type>
-  <mime-type type="application/vnd.sun.xml.impress">
-    <glob pattern="*.sxi"/>
-  </mime-type>
-  <mime-type type="application/vnd.sun.xml.impress.template">
-    <glob pattern="*.sti"/>
-  </mime-type>
-  <mime-type type="application/vnd.sun.xml.math">
-    <glob pattern="*.sxm"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.sun.xml.writer">
-    <alias type="application/x-vnd.sun.xml.writer"/>
-    <_comment>OpenOffice v1.0: Writer Document</_comment>
-    <magic>
-      <match type="string" offset="0" value="PK">
-        <match type="string" offset="30"
-          value="mimetypeapplication/vnd.sun.xml.writer"/>
-      </match>
-    </magic>
-    <glob pattern="*.sxw"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.sun.xml.writer.global">
-    <glob pattern="*.sxg"/>
-  </mime-type>
-  <mime-type type="application/vnd.sun.xml.writer.template">
-    <glob pattern="*.stw"/>
-  </mime-type>
-  <mime-type type="application/vnd.sun.wadl+xml"/>
-  <mime-type type="application/vnd.sus-calendar">
-    <glob pattern="*.sus"/>
-    <glob pattern="*.susp"/>
-  </mime-type>
-  <mime-type type="application/vnd.svd">
-    <glob pattern="*.svd"/>
-  </mime-type>
-  <mime-type type="application/vnd.swiftview-ics"/>
-
-  <mime-type type="application/vnd.symbian.install">
-    <magic priority="50">
-      <match value="0x10000419" type="little32" offset="8" />
-    </magic>
-    <glob pattern="*.sis"/>
-    <glob pattern="*.sisx"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.syncml+xml">
-    <glob pattern="*.xsm"/>
-  </mime-type>
-  <mime-type type="application/vnd.syncml.dm+wbxml">
-    <glob pattern="*.bdm"/>
-  </mime-type>
-  <mime-type type="application/vnd.syncml.dm+xml">
-    <glob pattern="*.xdm"/>
-  </mime-type>
-  <mime-type type="application/vnd.syncml.dm.notification"/>
-  <mime-type type="application/vnd.syncml.ds.notification"/>
-  <mime-type type="application/vnd.tao.intent-module-archive">
-    <glob pattern="*.tao"/>
-  </mime-type>
-  <mime-type type="application/vnd.tmobile-livetv">
-    <glob pattern="*.tmo"/>
-  </mime-type>
-  <mime-type type="application/vnd.trid.tpt">
-    <glob pattern="*.tpt"/>
-  </mime-type>
-  <mime-type type="application/vnd.triscape.mxs">
-    <glob pattern="*.mxs"/>
-  </mime-type>
-  <mime-type type="application/vnd.trueapp">
-    <glob pattern="*.tra"/>
-  </mime-type>
-  <mime-type type="application/vnd.truedoc"/>
-  <mime-type type="application/vnd.ufdl">
-    <glob pattern="*.ufd"/>
-    <glob pattern="*.ufdl"/>
-  </mime-type>
-  <mime-type type="application/vnd.uiq.theme">
-    <glob pattern="*.utz"/>
-  </mime-type>
-  <mime-type type="application/vnd.umajin">
-    <glob pattern="*.umj"/>
-  </mime-type>
-  <mime-type type="application/vnd.unity">
-    <glob pattern="*.unityweb"/>
-  </mime-type>
-  <mime-type type="application/vnd.uoml+xml">
-    <glob pattern="*.uoml"/>
-  </mime-type>
-  <mime-type type="application/vnd.uplanet.alert"/>
-  <mime-type type="application/vnd.uplanet.alert-wbxml"/>
-  <mime-type type="application/vnd.uplanet.bearer-choice"/>
-  <mime-type type="application/vnd.uplanet.bearer-choice-wbxml"/>
-  <mime-type type="application/vnd.uplanet.cacheop"/>
-  <mime-type type="application/vnd.uplanet.cacheop-wbxml"/>
-  <mime-type type="application/vnd.uplanet.channel"/>
-  <mime-type type="application/vnd.uplanet.channel-wbxml"/>
-  <mime-type type="application/vnd.uplanet.list"/>
-  <mime-type type="application/vnd.uplanet.list-wbxml"/>
-  <mime-type type="application/vnd.uplanet.listcmd"/>
-  <mime-type type="application/vnd.uplanet.listcmd-wbxml"/>
-  <mime-type type="application/vnd.uplanet.signal"/>
-  <mime-type type="application/vnd.vcx">
-    <glob pattern="*.vcx"/>
-  </mime-type>
-  <mime-type type="application/vnd.vd-study"/>
-  <mime-type type="application/vnd.vectorworks"/>
-  <mime-type type="application/vnd.vidsoft.vidconference"/>
-
-  <!-- http://www.iana.org/assignments/media-types/application/vnd.visio -->
-  <mime-type type="application/vnd.visio">
-    <_comment>Microsoft Visio Diagram</_comment>
-    <glob pattern="*.vsd"/>
-    <glob pattern="*.vst"/>
-    <glob pattern="*.vss"/>
-    <glob pattern="*.vsw"/>
-    <sub-class-of type="application/x-tika-msoffice"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.visionary">
-    <glob pattern="*.vis"/>
-  </mime-type>
-  <mime-type type="application/vnd.vividence.scriptfile"/>
-  <mime-type type="application/vnd.vsf">
-    <glob pattern="*.vsf"/>
-  </mime-type>
-  <mime-type type="application/vnd.wap.sic"/>
-  <mime-type type="application/vnd.wap.slc"/>
-
-  <mime-type type="application/vnd.wap.wbxml">
-    <glob pattern="*.wbxml"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.wap.wmlc">
-    <_comment>Compiled WML Document</_comment>
-    <glob pattern="*.wmlc"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.wap.wmlscriptc">
-    <_comment>Compiled WML Script</_comment>
-    <glob pattern="*.wmlsc"/>
-  </mime-type>
-
-  <mime-type type="application/vnd.webturbo">
-    <glob pattern="*.wtb"/>
-  </mime-type>
-  <mime-type type="application/vnd.wfa.wsc"/>
-  <mime-type type="application/vnd.wmc"/>
-  <mime-type type="application/vnd.wmf.bootstrap"/>
-  <mime-type type="application/vnd.wordperfect">
-    <glob pattern="*.wpd"/>
-  </mime-type>
-  <mime-type type="application/vnd.wqd">
-    <glob pattern="*.wqd"/>
-  </mime-type>
-  <mime-type type="application/vnd.wrq-hp3000-labelled"/>
-  <mime-type type="application/vnd.wt.stf">
-    <glob pattern="*.stf"/>
-  </mime-type>
-  <mime-type type="application/vnd.wv.csp+wbxml"/>
-  <mime-type type="application/vnd.wv.csp+xml"/>
-  <mime-type type="application/vnd.wv.ssp+xml"/>
-  <mime-type type="application/vnd.xara">
-    <glob pattern="*.xar"/>
-  </mime-type>
-  <mime-type type="application/vnd.xfdl">
-    <glob pattern="*.xfdl"/>
-  </mime-type>
-  <mime-type type="application/vnd.xfdl.webform"/>
-  <mime-type type="application/vnd.xmi+xml"/>
-  <mime-type type="application/vnd.xmpie.cpkg"/>
-  <mime-type type="application/vnd.xmpie.dpkg"/>
-  <mime-type type="application/vnd.xmpie.plan"/>
-  <mime-type type="application/vnd.xmpie.ppkg"/>
-  <mime-type type="application/vnd.xmpie.xlim"/>
-  <mime-type type="application/vnd.yamaha.hv-dic">
-    <glob pattern="*.hvd"/>
-  </mime-type>
-  <mime-type type="application/vnd.yamaha.hv-script">
-    <glob pattern="*.hvs"/>
-  </mime-type>
-  <mime-type type="application/vnd.yamaha.hv-voice">
-    <glob pattern="*.hvp"/>
-  </mime-type>
-  <mime-type type="application/vnd.yamaha.openscoreformat">
-    <glob pattern="*.osf"/>
-  </mime-type>
-  <mime-type type="application/vnd.yamaha.openscoreformat.osfpvg+xml">
-    <glob pattern="*.osfpvg"/>
-  </mime-type>
-  <mime-type type="application/vnd.yamaha.smaf-audio">
-    <glob pattern="*.saf"/>
-  </mime-type>
-  <mime-type type="application/vnd.yamaha.smaf-phrase">
-    <glob pattern="*.spf"/>
-  </mime-type>
-  <mime-type type="application/vnd.yellowriver-custom-menu">
-    <glob pattern="*.cmp"/>
-  </mime-type>
-  <mime-type type="application/vnd.zul">
-    <glob pattern="*.zir"/>
-    <glob pattern="*.zirz"/>
-  </mime-type>
-  <mime-type type="application/vnd.zzazz.deck+xml">
-    <glob pattern="*.zaz"/>
-  </mime-type>
-  <mime-type type="application/voicexml+xml">
-    <glob pattern="*.vxml"/>
-  </mime-type>
-  <mime-type type="application/watcherinfo+xml"/>
-  <mime-type type="application/whoispp-query"/>
-  <mime-type type="application/whoispp-response"/>
-  <mime-type type="application/winhlp">
-    <glob pattern="*.hlp"/>
-  </mime-type>
-  <mime-type type="application/wita"/>
-  <mime-type type="application/wordperfect5.1"/>
-  <mime-type type="application/wsdl+xml">
-    <glob pattern="*.wsdl"/>
-  </mime-type>
-  <mime-type type="application/wspolicy+xml">
-    <glob pattern="*.wspolicy"/>
-  </mime-type>
-
-  <mime-type type="application/x-123">
-    <magic priority="50">
-      <match value="0x00001a00" type="big32" offset="0" />
-      <match value="0x00000200" type="big32" offset="0" />
-    </magic>
-  </mime-type>
-
-  <mime-type type="application/x-abiword">
-    <glob pattern="*.abw"/>
-  </mime-type>
-  <mime-type type="application/x-ace-compressed">
-    <glob pattern="*.ace"/>
-  </mime-type>
-
-  <mime-type type="application/x-adobe-indesign">
-    <acronym>INDD</acronym>
-    <_comment>Adobe InDesign document</_comment>
-    <glob pattern="*.indd"/>
-  </mime-type>
-
-  <mime-type type="application/x-adobe-indesign-interchange">
-    <acronym>INX</acronym>
-    <_comment>Adobe InDesign Interchange format</_comment>
-    <magic priority="50">
-      <match value="&lt;?aid" type="string" offset="0:100"/>
-    </magic>
-    <glob pattern="*.inx"/>
-    <sub-class-of type="application/xml"/>
-  </mime-type>
-
-  <mime-type type="application/x-archive">
-    <magic priority="50">
-      <match value="=&lt;ar&gt;" type="string" offset="0"/>
-      <match value="=!&lt;arch&gt;" type="string" offset="0"/>
-    </magic>
-    <glob patter="*.ar"/>
-  </mime-type>
-
-  <mime-type type="application/x-authorware-bin">
-    <glob pattern="*.aab"/>
-    <glob pattern="*.x32"/>
-    <glob pattern="*.u32"/>
-    <glob pattern="*.vox"/>
-  </mime-type>
-  <mime-type type="application/x-authorware-map">
-    <glob pattern="*.aam"/>
-  </mime-type>
-  <mime-type type="application/x-authorware-seg">
-    <glob pattern="*.aas"/>
-  </mime-type>
-  <mime-type type="application/x-bcpio">
-    <glob pattern="*.bcpio"/>
-  </mime-type>
-
-  <mime-type type="application/x-berkeley-db">
-    <magic priority="50">
-      <match value="0x00061561" type="big32" offset="0"/>
-      <match value="0x00061561" type="host32" offset="12"/>
-      <match value="0x00061561" type="big32" offset="12"/>
-      <match value="0x00061561" type="little32" offset="12"/>
-      <match value="0x00053162" type="host32" offset="12"/>
-      <match value="0x00053162" type="big32" offset="12"/>
-      <match value="0x00053162" type="little32" offset="12"/>
-      <match value="0x00042253" type="host32" offset="12"/>
-      <match value="0x00042253" type="big32" offset="12"/>
-      <match value="0x00042253" type="little32" offset="12"/>
-      <match value="0x00040988" type="host32" offset="12"/>
-      <match value="0x00040988" type="little32" offset="12"/>
-      <match value="0x00040988" type="big32" offset="12"/>
-      <match value="0x00053162" type="host32" offset="0"/>
-      <match value="0x00053162" type="big32" offset="0"/>
-      <match value="0x00053162" type="little32" offset="0"/>
-    </magic>
-  </mime-type>
-
-  <mime-type type="application/x-bibtex-text-file">
-    <magic priority="50">
-      <match value="%\ BibTeX\ `" type="string" offset="0"/>
-      <match value="%%%\ \ " type="string" offset="73"/>
-      <match value="%\ BibTeX\ standard\ bibliography\ " type="string" offset="0"/>
-      <match value="%%%\ \ @BibTeX-style-file{" type="string" offset="73"/>
-      <match value="@article{" type="string" offset="0"/>
-      <match value="@book{" type="string" offset="0"/>
-      <match value="@inbook{" type="string" offset="0"/>
-      <match value="@incollection{" type="string" offset="0"/>
-      <match value="@inproceedings{" type="string" offset="0"/>
-      <match value="@manual{" type="string" offset="0"/>
-      <match value="@misc{" type="string" offset="0"/>
-      <match value="@preamble{" type="string" offset="0"/>
-      <match value="@phdthesis{" type="string" offset="0"/>
-      <match value="@techreport{" type="string" offset="0"/>
-      <match value="@unpublished{" type="string" offset="0"/>
-    </magic>
-    <glob pattern="*.bib"/>
-    <glob pattern="*.bibtex"/>
-  </mime-type>
-
-  <mime-type type="application/x-bittorrent">
-    <magic priority="50">
-      <match value="d8:announce" type="string" offset="0"/>
-    </magic>
-    <glob pattern="*.torrent"/>
-  </mime-type>
-
-  <mime-type type="application/x-bzip">
-    <magic priority="40">
-      <match value="BZh" type="string" offset="0"/>
-    </magic>
-    <glob pattern="*.bz"/>
-    <glob pattern="*.tbz"/>
-  </mime-type>
-
-  <mime-type type="application/x-bzip2">
-    <glob pattern="*.bz2"/>
-    <glob pattern="*.tbz2"/>
-    <glob pattern="*.boz"/>
-    <sub-class-of type="application/x-bzip"/>
-  </mime-type>
-
-  <mime-type type="application/x-cdlink">
-    <_comment>Virtual CD-ROM CD Image File</_comment>
-    <glob pattern="*.vcd"/>
-  </mime-type>
-
-  <mime-type type="application/x-chat">
-    <glob pattern="*.chat"/>
-  </mime-type>
-  <mime-type type="application/x-chess-pgn">
-    <glob pattern="*.pgn"/>
-  </mime-type>
-
-  <mime-type type="application/x-compress">
-    <magic priority="50">
-      <match value="\037\235" type="string" offset="0"/>
-    </magic>
-    <glob pattern="*.z"/>
-  </mime-type>
-
-  <mime-type type="application/x-corelpresentations">
-    <glob pattern="*.shw"/>
-    <sub-class-of type="application/x-tika-msoffice"/>
-  </mime-type>
-  
-  <mime-type type="application/x-cpio">
-    <magic priority="50">
-      <match value="070707" type="little16" offset="0"/>
-      <match value="070707" type="big16" offset="0"/>
-      <match value="070707" type="string" offset="0"/>
-      <match value="070701" type="string" offset="0"/>
-      <match value="070702" type="string" offset="0"/>
-    </magic>
-    <glob pattern="*.cpio"/>
-  </mime-type>
-
-  <mime-type type="application/x-csh">
-    <glob pattern="*.csh"/>
-  </mime-type>
-
-  <mime-type type="application/x-debian-package">
-    <glob pattern="*.deb"/>
-    <glob pattern="*.udeb"/>
-  </mime-type>
-
-  <mime-type type="application/x-director">
-    <_comment>Shockwave Movie</_comment>
-    <glob pattern="*.dir"/>
-    <glob pattern="*.dcr"/>
-    <glob pattern="*.dxr"/>
-    <glob pattern="*.cst"/>
-    <glob pattern="*.cct"/>
-    <glob pattern="*.cxt"/>
-    <glob pattern="*.w3d"/>
-    <glob pattern="*.fgd"/>
-    <glob pattern="*.swa"/>
-  </mime-type>
-
-  <mime-type type="application/x-doom">
-    <glob pattern="*.wad"/>
-  </mime-type>
-  <mime-type type="application/x-dtbncx+xml">
-    <glob pattern="*.ncx"/>
-  </mime-type>
-  <mime-type type="application/x-dtbook+xml">
-    <glob pattern="*.dtb"/>
-  </mime-type>
-  <mime-type type="application/x-dtbresource+xml">
-    <glob pattern="*.res"/>
-  </mime-type>
-
-  <mime-type type="application/x-dvi">
-    <magic priority="50">
-      <match value="\367\002" type="string" offset="0"/>
-      <match value="0x02f7" type="little16" offset="0"/>
-    </magic>
-    <glob pattern="*.dvi"/>
-  </mime-type>
-
-  <mime-type type="application/x-elc">
-    <_comment>Emacs Lisp bytecode</_comment>
-    <magic priority="50">
-      <!-- Emacs 18 -->
-      <match value="\012(" type="string" offset="0" />
-      <!-- Emacs 19 -->
-      <match value=";ELC\023\000\000\000" type="string" offset="0" />
-    </magic>
-    <glob pattern="*.elc"/>
-  </mime-type>
-
-  <mime-type type="application/x-font-bdf">
-    <glob pattern="*.bdf"/>
-  </mime-type>
-  <mime-type type="application/x-font-dos"/>
-  <mime-type type="application/x-font-framemaker"/>
-  <mime-type type="application/x-font-ghostscript">
-    <glob pattern="*.gsf"/>
-  </mime-type>
-  <mime-type type="application/x-font-libgrx"/>
-  <mime-type type="application/x-font-linux-psf">
-    <glob pattern="*.psf"/>
-  </mime-type>
-
-  <mime-type type="application/x-font-otf">
-    <acronym>OTF</acronym>
-    <_comment>OpenType Font</_comment>
-    <glob pattern="*.otf"/>
-  </mime-type>
-
-  <mime-type type="application/x-font-pcf">
-    <glob pattern="*.pcf"/>
-  </mime-type>
-  <mime-type type="application/x-font-snf">
-    <glob pattern="*.snf"/>
-  </mime-type>
-  <mime-type type="application/x-font-speedo"/>
-  <mime-type type="application/x-font-sunos-news"/>
-
-  <mime-type type="application/x-font-ttf">
-    <acronym>TTF</acronym>
-    <_comment>TrueType Font</_comment>
-    <glob pattern="*.ttf"/>
-    <glob pattern="*.ttc"/>
-    <magic priority="40">
-      <match value="0x00010000" type="string" offset="0"/>
-    </magic>
-  </mime-type>
-
-  <mime-type type="application/x-font-type1">
-    <glob pattern="*.pfa"/>
-    <glob pattern="*.pfb"/>
-    <glob pattern="*.pfm"/>
-    <glob pattern="*.afm"/>
-  </mime-type>
-  <mime-type type="application/x-font-vfont"/>
-
-  <mime-type type="application/x-futuresplash">
-    <_comment>Macromedia FutureSplash File</_comment>
-    <glob pattern="*.spl"/>
-  </mime-type>
-
-  <mime-type type="application/x-gnucash">
-    <glob pattern="*.gnucash" />
-  </mime-type>
-
-  <mime-type type="application/x-gnumeric">
-    <alias type="application/x-Gnumeric-spreadsheet"/>
-    <magic priority="50">
-      <match value="=&lt;gmr:Workbook" type="string" offset="39" />
-    </magic>
-    <glob pattern="*.gnumeric"/>
-  </mime-type>
-
-  <mime-type type="application/x-gtar">
-    <magic priority="40">
-      <!-- GNU tar archive -->
-      <match value="ustar \0" type="string" offset="257" />
-    </magic>
-    <glob pattern="*.gtar"/>
-    <sub-class-of type="application/x-tar"/>
-  </mime-type>
-
-  <mime-type type="application/x-gzip">
-    <magic priority="40">
-      <match value="\037\213" type="string" offset="0" />
-    </magic>
-    <glob pattern="*.tgz" />
-    <glob pattern="*.gz" />
-    <glob pattern="*-gz" />
-    <glob pattern="*.emz" />
-  </mime-type>
-
-  <mime-type type="application/x-hdf">
-    <magic priority="50">
-      <match value="0x0e031301" type="big32" offset="0"/>
-      <match value="\211HDF\r\n\032" type="string" offset="0"/>
-    </magic>
-    <glob pattern="*.hdf"/>
-    <glob pattern="*.he5"/>
-  </mime-type>
-
-  <mime-type type="application/x-hwp">
-    <magic priority="50">
-      <!--
-        TIKA-330: Detection pattern based on signature strings from
-        the hwpfilter/source/hwpfile.cpp file in OpenOffice.org.
-      -->
-      <match value="HWP Document File V" type="string" offset="0"/>
-    </magic>
-  </mime-type>
-
-  <mime-type type="application/x-iso9660-image">
-    <magic priority="50">
-      <match value="CD001" type="string" offset="37633"/>
-    </magic>
-    <glob pattern="*.iso" />
-  </mime-type>
-
-  <mime-type type="application/x-java-jnlp-file">
-    <glob pattern="*.jnlp"/>
-  </mime-type>
-
-  <mime-type type="application/x-kdelnk">
-    <magic priority="50">
-      <match value="[KDE\ Desktop\ Entry]" type="string" offset="0"/>
-      <match value="#\ KDE\ Config\ File" type="string" offs

<TRUNCATED>

[5/8] oodt git commit: Altered config publisher CLI to use cas-cli

Posted by ma...@apache.org.
Altered config publisher CLI to use cas-cli


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

Branch: refs/heads/feature/zookeeper-config
Commit: 01331125b24dafa374af6f5a6789c060651474fd
Parents: 39b6c88
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Wed Jul 26 23:50:52 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Fri Jul 28 21:20:43 2017 +0530

----------------------------------------------------------------------
 config/pom.xml                                  |   4 +-
 config/src/main/assembly/assembly.xml           |  18 ++-
 .../oodt/config/distributed/cli/CLIAction.java  | 116 +++++++++++++++++++
 .../config/distributed/cli/CmdLineOptions.java  |  58 ----------
 .../config/distributed/cli/ConfigPublisher.java |  84 ++------------
 config/src/main/resources/cmd-line-actions.xml  |  38 ++++++
 config/src/main/resources/cmd-line-options.xml  |  50 ++++++++
 config/src/main/resources/config-publisher.xml  |  42 +++++++
 .../src/main/resources/etc/config-publisher.xml |  42 -------
 config/src/main/resources/etc/log4j.xml         |  54 ---------
 config/src/main/resources/log4j.xml             |  54 +++++++++
 config/src/main/scripts/conf-publisher          |   4 +
 .../AbstractDistributedConfigurationTest.java   |   2 +
 .../DistributedConfigurationManagerTest.java    |   4 +-
 .../DistributedConfigurationPublisherTest.java  |   5 +-
 core/pom.xml                                    |   5 -
 16 files changed, 337 insertions(+), 243 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/pom.xml
----------------------------------------------------------------------
diff --git a/config/pom.xml b/config/pom.xml
index 6719c48..438efc4 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -17,8 +17,8 @@
 
     <dependencies>
         <dependency>
-            <groupId>args4j</groupId>
-            <artifactId>args4j</artifactId>
+            <groupId>org.apache.oodt</groupId>
+            <artifactId>cas-cli</artifactId>
         </dependency>
         <dependency>
             <groupId>commons-io</groupId>

http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/config/src/main/assembly/assembly.xml b/config/src/main/assembly/assembly.xml
index bb6f31e..a6db0fc 100644
--- a/config/src/main/assembly/assembly.xml
+++ b/config/src/main/assembly/assembly.xml
@@ -40,7 +40,23 @@
         </fileSet>
         <fileSet>
             <directory>${basedir}/src/main/resources</directory>
-            <outputDirectory>.</outputDirectory>
+            <outputDirectory>etc</outputDirectory>
+            <includes>
+                <include>config-publisher.xml</include>
+                <include>log4j.xml</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>${basedir}/src/main/resources</directory>
+            <outputDirectory>policy</outputDirectory>
+            <includes>
+                <include>cmd-line-actions.xml</include>
+                <include>cmd-line-options.xml</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>${basedir}/src/main/resources/examples</directory>
+            <outputDirectory>examples</outputDirectory>
             <includes/>
         </fileSet>
     </fileSets>

http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java b/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java
new file mode 100644
index 0000000..32fd640
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/distributed/cli/CLIAction.java
@@ -0,0 +1,116 @@
+/*
+ * 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.oodt.config.distributed.cli;
+
+import org.apache.oodt.cas.cli.action.CmdLineAction;
+import org.apache.oodt.cas.cli.exception.CmdLineActionException;
+import org.apache.oodt.config.Constants;
+import org.apache.oodt.config.distributed.DistributedConfigurationPublisher;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.util.Map;
+
+import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
+
+/**
+ * {@link CmdLineAction} specifying the verify, publish and clear tasks of distributed configuration management.
+ *
+ * @author Imesha Sudasingha
+ */
+public class CLIAction extends CmdLineAction {
+
+    public enum Action {
+        PUBLISH, VERIFY, CLEAR
+    }
+
+    private String connectString;
+    private Action action;
+
+    public CLIAction(Action action) {
+        this.action = action;
+    }
+
+    @Override
+    public void execute(ActionMessagePrinter printer) throws CmdLineActionException {
+        try {
+            ApplicationContext applicationContext = new ClassPathXmlApplicationContext(Constants.CONFIG_PUBLISHER_XML);
+            Map distributedConfigurationPublisher = applicationContext.getBeansOfType(DistributedConfigurationPublisher.class);
+
+            for (Object bean : distributedConfigurationPublisher.values()) {
+                DistributedConfigurationPublisher publisher = (DistributedConfigurationPublisher) bean;
+                switch (action) {
+                    case PUBLISH:
+                        publish(publisher);
+                        break;
+                    case VERIFY:
+                        verify(publisher);
+                        break;
+                    case CLEAR:
+                        clear(publisher);
+                        break;
+                }
+                publisher.destroy();
+            }
+        } catch (BeansException e) {
+            System.out.println(String.format("Error occurred when obtaining configuration publisher beans: '%s'", e.getMessage()));
+        } catch (Exception e) {
+            System.out.println(String.format("Error occurred when publishing configuration to zookeeper: '%s'", e.getMessage()));
+        }
+
+        System.out.println("Exiting CLI ...");
+    }
+
+    private void publish(DistributedConfigurationPublisher publisher) throws Exception {
+        System.out.println();
+        System.out.println(String.format("Publishing configuration for : %s", publisher.getComponent()));
+        publisher.publishConfiguration();
+        System.out.println(String.format("Published configuration for : %s", publisher.getComponent()));
+        System.out.println();
+    }
+
+    private void verify(DistributedConfigurationPublisher publisher) throws Exception {
+        System.out.println();
+        System.out.println(String.format("Verifying configuration for : %s", publisher.getComponent()));
+        if (publisher.verifyPublishedConfiguration()) {
+            System.out.println("OK... Configuration verified");
+            System.out.println(String.format("Verified configuration for : %s", publisher.getComponent()));
+        } else {
+            System.err.println("ERROR... Published configuration doesn't match the local files. Please check above logs");
+        }
+        System.out.println();
+    }
+
+    private void clear(DistributedConfigurationPublisher publisher) throws Exception {
+        System.out.println();
+        System.out.println(String.format("Clearing configuration for : %s", publisher.getComponent()));
+        publisher.clearConfiguration();
+        System.out.println(String.format("Cleared configuration for : %s", publisher.getComponent()));
+        System.out.println();
+    }
+
+    public String getConnectString() {
+        return connectString;
+    }
+
+    public void setConnectString(String connectString) {
+        System.setProperty(ZK_CONNECT_STRING, connectString);
+        this.connectString = connectString;
+    }
+}

http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java b/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java
deleted file mode 100644
index a262387..0000000
--- a/config/src/main/java/org/apache/oodt/config/distributed/cli/CmdLineOptions.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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.oodt.config.distributed.cli;
-
-import org.kohsuke.args4j.Option;
-
-/**
- * Bean class used to map CLI options and arguments provided by the user when publishing configuration to zookeeper
- *
- * @author Imesha Sudaingha
- */
-public class CmdLineOptions {
-
-    @Option(name = "-connectString", usage = "Zookeeper connect string", required = true)
-    private String connectString;
-
-    @Option(name = "-publish", usage = "Publishes configuration specified in the spring config file to zookeeper. " +
-                                               "Any current similar config in zookeeper will be overwritten. If not specified, " +
-                                               "command will be assumed as a publish")
-    private boolean publish = false;
-
-    @Option(name = "-verify", usage = "Verifies the content in the local files and the published ones. Results will be printed.")
-    private boolean verify = false;
-
-    @Option(name = "-clear", usage = "Unpublish any configuration which has been published earlier using the same spring config file")
-    private boolean clear = false;
-
-    public String getConnectString() {
-        return connectString;
-    }
-
-    public boolean isPublish() {
-        return publish;
-    }
-
-    public boolean isVerify() {
-        return verify;
-    }
-
-    public boolean isClear() {
-        return clear;
-    }
-}

http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java b/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java
index 7a78a8c..f4c45a7 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java
@@ -17,89 +17,21 @@
 
 package org.apache.oodt.config.distributed.cli;
 
-import org.apache.oodt.config.Constants;
-import org.apache.oodt.config.distributed.DistributedConfigurationPublisher;
-import org.kohsuke.args4j.CmdLineException;
-import org.kohsuke.args4j.CmdLineParser;
+import org.apache.oodt.cas.cli.CmdLineUtility;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.beans.BeansException;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import java.util.Map;
-
-import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
 
+/**
+ * Class with main method which gets invoked by the CLI.
+ *
+ * @author Imesha Sudasingha
+ */
 public class ConfigPublisher {
 
     private static final Logger logger = LoggerFactory.getLogger(ConfigPublisher.class);
 
     public static void main(String[] args) throws Exception {
-        CmdLineOptions cmdLineOptions = new CmdLineOptions();
-        CmdLineParser parser = new CmdLineParser(cmdLineOptions);
-
-        try {
-            parser.parseArgument(args);
-        } catch (CmdLineException e) {
-            System.err.println("There's an error in your command");
-            parser.printUsage(System.err);
-            return;
-        }
-
-        if (cmdLineOptions.getConnectString() == null && System.getProperty(ZK_CONNECT_STRING) == null) {
-            System.err.println("Zookeeper connect string is not found");
-            parser.printUsage(System.err);
-            return;
-        } else {
-            System.setProperty(ZK_CONNECT_STRING, cmdLineOptions.getConnectString());
-        }
-
-        System.out.println("Starting configuration publishing");
-
-        try {
-            ApplicationContext applicationContext = new ClassPathXmlApplicationContext(Constants.CONFIG_PUBLISHER_XML);
-            Map distributedConfigurationPublisher = applicationContext.getBeansOfType(DistributedConfigurationPublisher.class);
-
-            for (Object bean : distributedConfigurationPublisher.values()) {
-                DistributedConfigurationPublisher publisher = (DistributedConfigurationPublisher) bean;
-                System.out.println(String.format("\nProcessing commands for component : %s", publisher.getComponent()));
-
-                if (cmdLineOptions.isPublish()) {
-                    System.out.println(String.format("Publishing configuration for : %s", publisher.getComponent()));
-                    publisher.publishConfiguration();
-                    System.out.println(String.format("Published configuration for : %s", publisher.getComponent()));
-                    System.out.println();
-                }
-
-                if (cmdLineOptions.isVerify()) {
-                    System.out.println(String.format("Verifying configuration for : %s", publisher.getComponent()));
-                    if (publisher.verifyPublishedConfiguration()) {
-                        System.out.println("OK... Configuration verified");
-                        System.out.println(String.format("Verified configuration for : %s", publisher.getComponent()));
-                    } else {
-                        System.err.println("ERROR... Published configuration doesn't match the local files. Please check above logs");
-                    }
-                    System.out.println();
-                }
-
-                if (cmdLineOptions.isClear()) {
-                    System.out.println(String.format("Clearing configuration for : %s", publisher.getComponent()));
-                    publisher.clearConfiguration();
-                    System.out.println(String.format("Cleared configuration for : %s", publisher.getComponent()));
-                    System.out.println();
-                }
-
-                publisher.destroy();
-            }
-        } catch (BeansException e) {
-            logger.error("Error occurred when obtaining configuration publisher beans", e);
-            throw e;
-        } catch (Exception e) {
-            logger.error("Error occurred when publishing configuration to zookeeper", e);
-            throw e;
-        }
-
-        logger.info("Exiting CLI ...");
+        CmdLineUtility cmdLineUtility = new CmdLineUtility();
+        cmdLineUtility.run(args);
     }
 }

http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/main/resources/cmd-line-actions.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/cmd-line-actions.xml b/config/src/main/resources/cmd-line-actions.xml
new file mode 100644
index 0000000..08f5415
--- /dev/null
+++ b/config/src/main/resources/cmd-line-actions.xml
@@ -0,0 +1,38 @@
+<?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.
+  -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+       http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+    <bean id="publish" class="org.apache.oodt.config.distributed.cli.CLIAction">
+        <constructor-arg value="PUBLISH"/>
+        <property name="description" value="Publishes configuration to zookeeper"/>
+    </bean>
+
+    <bean id="verify" class="org.apache.oodt.config.distributed.cli.CLIAction">
+        <constructor-arg value="VERIFY"/>
+        <property name="description" value="Verifies configuration published to zookeeper"/>
+    </bean>
+
+    <bean id="clear" class="org.apache.oodt.config.distributed.cli.CLIAction">
+        <constructor-arg value="CLEAR"/>
+        <property name="description" value="Clears all published configuration from zookeeper"/>
+    </bean>
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/main/resources/cmd-line-options.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/cmd-line-options.xml b/config/src/main/resources/cmd-line-options.xml
new file mode 100644
index 0000000..9aff21e
--- /dev/null
+++ b/config/src/main/resources/cmd-line-options.xml
@@ -0,0 +1,50 @@
+<?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.
+  -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+       http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+    <bean id="connectStringOption" class="org.apache.oodt.cas.cli.option.AdvancedCmdLineOption">
+        <property name="shortOption" value="cs"/>
+        <property name="longOption" value="connectString"/>
+        <property name="description" value="Connect String to Zookeeper (ip1:port1,ip2:port2,..)"/>
+        <property name="hasArgs" value="true"/>
+        <property name="requirementRules">
+            <list>
+                <bean class="org.apache.oodt.cas.cli.option.require.ActionDependencyRule"
+                      p:actionName="publishConfiguration" p:relation="REQUIRED"/>
+            </list>
+        </property>
+        <property name="handler">
+            <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToActionHandler">
+                <property name="applyToActions">
+                    <list>
+                        <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+                              p:actionName="publish" p:methodName="setConnectString"/>
+                        <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+                              p:actionName="verify" p:methodName="setConnectString"/>
+                        <bean class="org.apache.oodt.cas.cli.option.handler.ApplyToAction"
+                              p:actionName="clear" p:methodName="setConnectString"/>
+                    </list>
+                </property>
+            </bean>
+        </property>
+    </bean>
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/main/resources/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/config-publisher.xml b/config/src/main/resources/config-publisher.xml
new file mode 100644
index 0000000..88ba33b
--- /dev/null
+++ b/config/src/main/resources/config-publisher.xml
@@ -0,0 +1,42 @@
+<!--
+  ~ 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.
+  -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+    <!-- Configuration publisher for File Manager OODT Component -->
+    <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
+        <constructor-arg value="FILE_MANAGER"/>
+        <property name="propertiesFiles">
+            <map key-type="java.lang.String" value-type="java.lang.String">
+                <entry key="examples/filemgr/filemgr.properties" value="/etc/filemgr.properties"/>
+            </map>
+        </property>
+        <property name="configFiles">
+            <map key-type="java.lang.String" value-type="java.lang.String">
+                <entry key="examples/filemgr/mime-types.xml" value="/etc/mime-types.xml"/>
+                <entry key="examples/filemgr/cmd-line-actions.xml" value="/policy/cmd-line-actions.xml"/>
+                <entry key="examples/filemgr/cmd-line-options.xml" value="/policy/cmd-line-options.xml"/>
+                <entry key="examples/filemgr/oodt/elements.xml" value="/policy/oodt/elements.xml"/>
+                <entry key="examples/filemgr/oodt/product-types.xml" value="/policy/oodt/product-types.xml"/>
+                <entry key="examples/filemgr/oodt/product-type-element-map.xml" value="/policy/oodt/product-type-element-map.xml"/>
+            </map>
+        </property>
+    </bean>
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/main/resources/etc/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/etc/config-publisher.xml b/config/src/main/resources/etc/config-publisher.xml
deleted file mode 100644
index 88ba33b..0000000
--- a/config/src/main/resources/etc/config-publisher.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<!--
-  ~ 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.
-  -->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
-    <!-- Configuration publisher for File Manager OODT Component -->
-    <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
-        <constructor-arg value="FILE_MANAGER"/>
-        <property name="propertiesFiles">
-            <map key-type="java.lang.String" value-type="java.lang.String">
-                <entry key="examples/filemgr/filemgr.properties" value="/etc/filemgr.properties"/>
-            </map>
-        </property>
-        <property name="configFiles">
-            <map key-type="java.lang.String" value-type="java.lang.String">
-                <entry key="examples/filemgr/mime-types.xml" value="/etc/mime-types.xml"/>
-                <entry key="examples/filemgr/cmd-line-actions.xml" value="/policy/cmd-line-actions.xml"/>
-                <entry key="examples/filemgr/cmd-line-options.xml" value="/policy/cmd-line-options.xml"/>
-                <entry key="examples/filemgr/oodt/elements.xml" value="/policy/oodt/elements.xml"/>
-                <entry key="examples/filemgr/oodt/product-types.xml" value="/policy/oodt/product-types.xml"/>
-                <entry key="examples/filemgr/oodt/product-type-element-map.xml" value="/policy/oodt/product-type-element-map.xml"/>
-            </map>
-        </property>
-    </bean>
-
-</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/main/resources/etc/log4j.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/etc/log4j.xml b/config/src/main/resources/etc/log4j.xml
deleted file mode 100644
index 8cc1919..0000000
--- a/config/src/main/resources/etc/log4j.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?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.
-  -->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-    <appender name="console" class="org.apache.log4j.ConsoleAppender">
-        <param name="Target" value="System.out"/>
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
-        </layout>
-    </appender>
-
-    <appender name="file" class="org.apache.log4j.FileAppender">
-        <param name="file" value="logs/log.out"/>
-        <param name="immediateFlush" value="true"/>
-        <param name="threshold" value="debug"/>
-        <param name="append" value="false"/>
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
-        </layout>
-    </appender>
-
-    <root>
-        <priority value="INFO"/>
-        <appender-ref ref="console"/>
-        <appender-ref ref="file"/>
-    </root>
-
-    <logger name="org.apache.zookeeper">
-        <level value="ERROR"/>
-    </logger>
-    <logger name="org.springframework">
-        <level value="ERROR"/>
-    </logger>
-    <logger name="org.apache.curator">
-        <level value="ERROR"/>
-    </logger>
-</log4j:configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/main/resources/log4j.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/log4j.xml b/config/src/main/resources/log4j.xml
new file mode 100644
index 0000000..8cc1919
--- /dev/null
+++ b/config/src/main/resources/log4j.xml
@@ -0,0 +1,54 @@
+<?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.
+  -->
+
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+    <appender name="console" class="org.apache.log4j.ConsoleAppender">
+        <param name="Target" value="System.out"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
+        </layout>
+    </appender>
+
+    <appender name="file" class="org.apache.log4j.FileAppender">
+        <param name="file" value="logs/log.out"/>
+        <param name="immediateFlush" value="true"/>
+        <param name="threshold" value="debug"/>
+        <param name="append" value="false"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
+        </layout>
+    </appender>
+
+    <root>
+        <priority value="INFO"/>
+        <appender-ref ref="console"/>
+        <appender-ref ref="file"/>
+    </root>
+
+    <logger name="org.apache.zookeeper">
+        <level value="ERROR"/>
+    </logger>
+    <logger name="org.springframework">
+        <level value="ERROR"/>
+    </logger>
+    <logger name="org.apache.curator">
+        <level value="ERROR"/>
+    </logger>
+</log4j:configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/main/scripts/conf-publisher
----------------------------------------------------------------------
diff --git a/config/src/main/scripts/conf-publisher b/config/src/main/scripts/conf-publisher
index 618af4b..47c32f2 100644
--- a/config/src/main/scripts/conf-publisher
+++ b/config/src/main/scripts/conf-publisher
@@ -30,6 +30,10 @@ echo -n "Starting Configuration Publisher"
 $JAVA_HOME/bin/java \
         	-cp ${LIB_DEPS} \
         	-Dlog4j.configuration=etc/log4j.xml \
+        	-Djava.ext.dirs=. \
+            -Djava.util.logging.config.file=${CONF_HOME}/etc/logging.properties \
+            -Dorg.apache.oodt.cas.cli.action.spring.config=${CONF_HOME}/policy/cmd-line-actions.xml \
+            -Dorg.apache.oodt.cas.cli.option.spring.config=${CONF_HOME}/policy/cmd-line-options.xml \
         	org.apache.oodt.config.distributed.cli.ConfigPublisher "$@"
 echo "OK"
 sleep 1

http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java b/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
index e14d43a..4694dfa 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/AbstractDistributedConfigurationTest.java
@@ -36,6 +36,8 @@ public abstract class AbstractDistributedConfigurationTest {
         zookeeper.start();
 
         System.setProperty(ZK_CONNECT_STRING, zookeeper.getConnectString());
+        System.setProperty("org.apache.oodt.cas.cli.action.spring.config", "src/main/resources/cmd-line-actions.xml");
+        System.setProperty("org.apache.oodt.cas.cli.option.spring.config", "src/main/resources/cmd-line-options.xml");
 
         client = CuratorUtils.newCuratorFrameworkClient(zookeeper.getConnectString());
         client.start();

http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
index 9052ac3..71ce713 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
@@ -58,7 +58,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
 
         ConfigPublisher.main(new String[]{
                 "-connectString", zookeeper.getConnectString(),
-                "-publish"
+                "-a", "publish"
         });
 
         ApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_PUBLISHER_XML);
@@ -140,7 +140,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
 
         ConfigPublisher.main(new String[]{
                 "-connectString", zookeeper.getConnectString(),
-                "-clear"
+                "-a", "clear"
         });
 
         AbstractDistributedConfigurationTest.tearDown();

http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
index 2c130db..5a529ed 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
@@ -43,8 +43,7 @@ public class DistributedConfigurationPublisherTest extends AbstractDistributedCo
         // Publishing configuration through CLI and verifying whether they were stored correctly
         ConfigPublisher.main(new String[]{
                 "-connectString", zookeeper.getConnectString(),
-                "-publish",
-                "-verify"
+                "-a", "publish"
         });
 
         ApplicationContext applicationContext = new ClassPathXmlApplicationContext(CONFIG_PUBLISHER_XML);
@@ -84,7 +83,7 @@ public class DistributedConfigurationPublisherTest extends AbstractDistributedCo
         // Clearing configuration through CLI and checking whether the configuration has actually been gone
         ConfigPublisher.main(new String[]{
                 "-connectString", zookeeper.getConnectString(),
-                "-clear"
+                "-a", "clear"
         });
 
         for (DistributedConfigurationPublisher publisher : publishers) {

http://git-wip-us.apache.org/repos/asf/oodt/blob/01331125/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index f6382f4..118d171 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -254,11 +254,6 @@ the License.
         <scope>test</scope>
       </dependency>
       <dependency>
-        <groupId>args4j</groupId>
-        <artifactId>args4j</artifactId>
-        <version>2.33</version>
-      </dependency>
-      <dependency>
         <groupId>org.apache.cxf</groupId>
         <artifactId>cxf-rt-frontend-jaxrs</artifactId>
         <version>2.6.0</version>


[4/8] oodt git commit: Added missing conf-publisher binary and minor improvements

Posted by ma...@apache.org.
Added missing conf-publisher binary and minor improvements


Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/39b6c888
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/39b6c888
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/39b6c888

Branch: refs/heads/feature/zookeeper-config
Commit: 39b6c888512b74feaa9d5494c7bd7268f4b42f6e
Parents: 8b02792
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Wed Jul 26 21:51:41 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Fri Jul 28 21:20:43 2017 +0530

----------------------------------------------------------------------
 config/pom.xml                                  |  36 +-
 config/src/main/assembly/assembly.xml           |   4 +-
 .../DistributedConfigurationManager.java        |   1 -
 .../DistributedConfigurationPublisher.java      | 257 ++++++++++++++
 .../config/distributed/cli/ConfigPublisher.java | 105 ++++++
 .../cli/DistributedConfigurationPublisher.java  | 331 -------------------
 .../config/distributed/utils/FilePathUtils.java |   6 +-
 .../src/main/resources/etc/config-publisher.xml |  16 +-
 config/src/main/resources/etc/log4j.xml         |   5 +-
 config/src/main/scripts/conf-publisher          |  36 ++
 .../DistributedConfigurationManagerTest.java    |  25 +-
 .../DistributedConfigurationPublisherTest.java  |   6 +-
 .../src/test/resources/etc/config-publisher.xml |   4 +-
 13 files changed, 454 insertions(+), 378 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/config/pom.xml
----------------------------------------------------------------------
diff --git a/config/pom.xml b/config/pom.xml
index 741caac..6719c48 100644
--- a/config/pom.xml
+++ b/config/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <artifactId>oodt-core</artifactId>
         <groupId>org.apache.oodt</groupId>
-        <version>1.1-SNAPSHOT</version>
+        <version>1.2-SNAPSHOT</version>
         <relativePath>../core/pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
@@ -17,29 +17,25 @@
 
     <dependencies>
         <dependency>
-            <groupId>org.apache.curator</groupId>
-            <artifactId>curator-framework</artifactId>
-	    
+            <groupId>args4j</groupId>
+            <artifactId>args4j</artifactId>
         </dependency>
         <dependency>
             <groupId>commons-io</groupId>
             <artifactId>commons-io</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-beans</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-context</artifactId>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-framework</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-core</artifactId>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-test</artifactId>
         </dependency>
         <dependency>
-            <groupId>args4j</groupId>
-            <artifactId>args4j</artifactId>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
@@ -50,12 +46,16 @@
             <artifactId>slf4j-log4j12</artifactId>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-beans</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.apache.curator</groupId>
-            <artifactId>curator-test</artifactId>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-core</artifactId>
         </dependency>
     </dependencies>
 

http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/config/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/config/src/main/assembly/assembly.xml b/config/src/main/assembly/assembly.xml
index 2743cab..bb6f31e 100644
--- a/config/src/main/assembly/assembly.xml
+++ b/config/src/main/assembly/assembly.xml
@@ -33,8 +33,8 @@
             </includes>
         </fileSet>
         <fileSet>
-            <directory>${basedir}/src/main/bin</directory>
-            <outputDirectory>bin</outputDirectory>
+            <directory>${basedir}/src/main/scripts</directory>
+            <outputDirectory>.</outputDirectory>
             <includes/>
             <fileMode>755</fileMode>
         </fileSet>

http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
index da96913..122a78e 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
@@ -37,7 +37,6 @@ import java.util.concurrent.TimeUnit;
 
 import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
 import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
-import static org.apache.oodt.config.Constants.SEPARATOR;
 
 /**
  * Distributed configuration manager implementation. This class make use of a {@link CuratorFramework} instance to

http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
new file mode 100644
index 0000000..81fe2af
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
@@ -0,0 +1,257 @@
+/*
+ * 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.oodt.config.distributed;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.oodt.config.Component;
+import org.apache.oodt.config.Constants;
+import org.apache.oodt.config.distributed.utils.CuratorUtils;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
+import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
+
+/**
+ * The class to publish configuration to Zookeeper. When using distributed configuration with OODT, configuration per
+ * each component type needs to be stored in zookeeper beforehand. This class, provides the means to do that.
+ *
+ * @author Imesha Sudasingha
+ */
+public class DistributedConfigurationPublisher {
+
+    private static final Logger logger = LoggerFactory.getLogger(DistributedConfigurationPublisher.class);
+
+    private Map<String, String> propertiesFiles;
+    private Map<String, String> configFiles;
+    private String connectString;
+    private CuratorFramework client;
+    private ZNodePaths zNodePaths;
+    private Component component;
+
+    public DistributedConfigurationPublisher(Component component) {
+        this.component = component;
+        this.zNodePaths = new ZNodePaths(this.component.getName());
+
+        if (System.getProperty(ZK_PROPERTIES_FILE) == null && System.getProperty(ZK_CONNECT_STRING) == null) {
+            throw new IllegalArgumentException("Zookeeper requires system properties " + ZK_PROPERTIES_FILE + " or " + ZK_CONNECT_STRING + " to be set");
+        }
+
+        if (System.getProperty(ZK_PROPERTIES_FILE) != null) {
+            try {
+                CuratorUtils.loadZookeeperProperties();
+            } catch (IOException e) {
+                logger.error("Error occurred when loading properties from properties file");
+            }
+        }
+
+        if (System.getProperty(ZK_CONNECT_STRING) == null) {
+            throw new IllegalArgumentException("Zookeeper requires a proper connect string to connect to zookeeper ensemble");
+        }
+
+        connectString = System.getProperty(ZK_CONNECT_STRING);
+        logger.info("Using zookeeper connect string : {}", connectString);
+
+        startZookeeper();
+    }
+
+    /**
+     * Creates a {@link CuratorFramework} instance and start it. This method will wait a maximum amount of {@link
+     * Constants.Properties#ZK_STARTUP_TIMEOUT} milli-seconds until the client connects to the zookeeper ensemble.
+     */
+    private void startZookeeper() {
+        client = CuratorUtils.newCuratorFrameworkClient(connectString, logger);
+
+        client.start();
+        logger.info("Curator framework start operation invoked");
+
+        int startupTimeOutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_STARTUP_TIMEOUT, "30000"));
+        try {
+            logger.info("Waiting to connect to zookeeper, startupTimeout : {}", startupTimeOutMs);
+            client.blockUntilConnected(startupTimeOutMs, TimeUnit.MILLISECONDS);
+        } catch (InterruptedException ex) {
+            logger.error("Interrupted while waiting to connect zookeeper (connectString : {}) : {}", ex, connectString);
+        }
+
+        if (!client.getZookeeperClient().isConnected()) {
+            throw new IllegalStateException("Could not connect to ZooKeeper : " + connectString);
+        }
+
+        logger.info("CuratorFramework client started successfully");
+    }
+
+    public void destroy() {
+        logger.debug("Destroying configuration publisher");
+        try {
+            client.close();
+        } catch (Exception e) {
+            logger.error("Error occurred when trying to close Curator client : {}", e);
+        }
+
+        logger.info("Configuration publisher destroyed");
+    }
+
+    /**
+     * Publishes the configuration files specified to zookeeper. If an exception is thrown while configuration being
+     * published, no further publishing attempts will be carried on. Error will be reported to user.
+     *
+     * @throws Exception Zookeeper errors
+     */
+    public void publishConfiguration() throws Exception {
+        logger.debug("Publishing properties files : {}", propertiesFiles);
+        publishConfiguration(propertiesFiles, true);
+        logger.info("Properties files published successfully");
+
+        logger.debug("Publishing config files : {}", configFiles);
+        publishConfiguration(configFiles, false);
+        logger.info("Config files published successfully");
+    }
+
+    /**
+     * Verified whether the actual content of the local files specified to be published are 100% similar to the ones
+     * that has been published and stored in zookeeper at the moment.
+     *
+     * @return true | if content are up to date and similar
+     */
+    public boolean verifyPublishedConfiguration() {
+        try {
+            return verifyPublishedConfiguration(propertiesFiles, true) && verifyPublishedConfiguration(configFiles, false);
+        } catch (Exception e) {
+            logger.error("Error occurred when checking published config", e);
+            return false;
+        }
+    }
+
+    /**
+     * Removes all the nodes from zookeeper where the configuration corresponding to component {@link #component} is
+     * stored
+     *
+     * @throws Exception zookeeper errors
+     */
+    public void clearConfiguration() throws Exception {
+        logger.debug("Clearing configuration from zookeeper");
+        CuratorUtils.deleteChildNodes(client, zNodePaths.getPropertiesZNodePath());
+        CuratorUtils.deleteChildNodes(client, zNodePaths.getConfigurationZNodePath());
+        logger.info("Configuration cleared!");
+    }
+
+    private void publishConfiguration(Map<String, String> fileMapping, boolean isProperties) throws Exception {
+        for (Map.Entry<String, String> entry : fileMapping.entrySet()) {
+            String filePath = entry.getKey();
+            String relativeZNodePath = entry.getValue();
+            logger.info("Publishing configuration {} - {}", filePath, relativeZNodePath);
+
+            String content = getFileContent(filePath);
+
+            String zNodePath = isProperties ? zNodePaths.getPropertiesZNodePath(relativeZNodePath) : zNodePaths.getConfigurationZNodePath(relativeZNodePath);
+            if (client.checkExists().forPath(zNodePath) != null) {
+                byte[] bytes = client.getData().forPath(zNodePath);
+                String existingData = new String(bytes);
+                if (existingData.equals(content)) {
+                    logger.warn("{} already exists in zookeeper at {}", filePath, relativeZNodePath);
+                } else {
+                    Stat stat = client.setData().forPath(zNodePath, content.getBytes());
+                    if (stat != null) {
+                        logger.info("Published configuration file {} to {}", filePath, relativeZNodePath);
+                    } else {
+                        logger.warn("Unable to publish configuration file {} to {}", filePath, relativeZNodePath);
+                    }
+                }
+            } else {
+                /*
+                 * Creating these ZNodes with parent 'Containers' is important since containers are automatically deleted
+                 * when no child node is present under them.
+                 */
+                client.create().creatingParentContainersIfNeeded().forPath(zNodePath, content.getBytes());
+                logger.info("Replaced old published configuration at {} with content of file : {}", relativeZNodePath, filePath);
+            }
+        }
+    }
+
+    private boolean verifyPublishedConfiguration(Map<String, String> fileMapping, boolean isProperties) throws Exception {
+        boolean noError = true;
+        for (Map.Entry<String, String> entry : fileMapping.entrySet()) {
+            String filePath = entry.getKey();
+            String relativeZNodePath = entry.getValue();
+            logger.info("Checking published configuration for {} - {}", filePath, relativeZNodePath);
+
+            String originalContent = getFileContent(filePath);
+
+            String zNodePath = isProperties ? zNodePaths.getPropertiesZNodePath(relativeZNodePath) : zNodePaths.getConfigurationZNodePath(relativeZNodePath);
+            if (client.checkExists().forPath(zNodePath) == null) {
+                logger.error("File : {} hasn't been published to ZNode : {}", filePath, relativeZNodePath);
+                noError = false;
+                continue;
+            }
+
+            String publishedContent = new String(client.getData().forPath(zNodePath));
+            if (!publishedContent.equals(originalContent)) {
+                logger.error("Content of local file : {} and content published to {} are not similar", filePath, relativeZNodePath);
+                noError = false;
+                continue;
+            }
+
+            logger.info("{} - {} configuration checked and OK", filePath, relativeZNodePath);
+        }
+
+        return noError;
+    }
+
+    private String getFileContent(String file) {
+        String content;
+        try {
+            content = FileUtils.readFileToString(new File(file));
+        } catch (IOException e) {
+            logger.error("Unable to read file : {}", file, e);
+            throw new IllegalArgumentException("Unable to read content of the file : " + file);
+        }
+
+        return content;
+    }
+
+    public Map<String, String> getPropertiesFiles() {
+        return propertiesFiles;
+    }
+
+    public void setPropertiesFiles(Map<String, String> propertiesFiles) {
+        this.propertiesFiles = propertiesFiles;
+    }
+
+    public Map<String, String> getConfigFiles() {
+        return configFiles;
+    }
+
+    public void setConfigFiles(Map<String, String> configFiles) {
+        this.configFiles = configFiles;
+    }
+
+    public ZNodePaths getZNodePaths() {
+        return zNodePaths;
+    }
+
+    public Component getComponent() {
+        return component;
+    }
+}

http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java b/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java
new file mode 100644
index 0000000..7a78a8c
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/distributed/cli/ConfigPublisher.java
@@ -0,0 +1,105 @@
+/*
+ * 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.oodt.config.distributed.cli;
+
+import org.apache.oodt.config.Constants;
+import org.apache.oodt.config.distributed.DistributedConfigurationPublisher;
+import org.kohsuke.args4j.CmdLineException;
+import org.kohsuke.args4j.CmdLineParser;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.util.Map;
+
+import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
+
+public class ConfigPublisher {
+
+    private static final Logger logger = LoggerFactory.getLogger(ConfigPublisher.class);
+
+    public static void main(String[] args) throws Exception {
+        CmdLineOptions cmdLineOptions = new CmdLineOptions();
+        CmdLineParser parser = new CmdLineParser(cmdLineOptions);
+
+        try {
+            parser.parseArgument(args);
+        } catch (CmdLineException e) {
+            System.err.println("There's an error in your command");
+            parser.printUsage(System.err);
+            return;
+        }
+
+        if (cmdLineOptions.getConnectString() == null && System.getProperty(ZK_CONNECT_STRING) == null) {
+            System.err.println("Zookeeper connect string is not found");
+            parser.printUsage(System.err);
+            return;
+        } else {
+            System.setProperty(ZK_CONNECT_STRING, cmdLineOptions.getConnectString());
+        }
+
+        System.out.println("Starting configuration publishing");
+
+        try {
+            ApplicationContext applicationContext = new ClassPathXmlApplicationContext(Constants.CONFIG_PUBLISHER_XML);
+            Map distributedConfigurationPublisher = applicationContext.getBeansOfType(DistributedConfigurationPublisher.class);
+
+            for (Object bean : distributedConfigurationPublisher.values()) {
+                DistributedConfigurationPublisher publisher = (DistributedConfigurationPublisher) bean;
+                System.out.println(String.format("\nProcessing commands for component : %s", publisher.getComponent()));
+
+                if (cmdLineOptions.isPublish()) {
+                    System.out.println(String.format("Publishing configuration for : %s", publisher.getComponent()));
+                    publisher.publishConfiguration();
+                    System.out.println(String.format("Published configuration for : %s", publisher.getComponent()));
+                    System.out.println();
+                }
+
+                if (cmdLineOptions.isVerify()) {
+                    System.out.println(String.format("Verifying configuration for : %s", publisher.getComponent()));
+                    if (publisher.verifyPublishedConfiguration()) {
+                        System.out.println("OK... Configuration verified");
+                        System.out.println(String.format("Verified configuration for : %s", publisher.getComponent()));
+                    } else {
+                        System.err.println("ERROR... Published configuration doesn't match the local files. Please check above logs");
+                    }
+                    System.out.println();
+                }
+
+                if (cmdLineOptions.isClear()) {
+                    System.out.println(String.format("Clearing configuration for : %s", publisher.getComponent()));
+                    publisher.clearConfiguration();
+                    System.out.println(String.format("Cleared configuration for : %s", publisher.getComponent()));
+                    System.out.println();
+                }
+
+                publisher.destroy();
+            }
+        } catch (BeansException e) {
+            logger.error("Error occurred when obtaining configuration publisher beans", e);
+            throw e;
+        } catch (Exception e) {
+            logger.error("Error occurred when publishing configuration to zookeeper", e);
+            throw e;
+        }
+
+        logger.info("Exiting CLI ...");
+    }
+}

http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java b/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
deleted file mode 100644
index 25a45ba..0000000
--- a/config/src/main/java/org/apache/oodt/config/distributed/cli/DistributedConfigurationPublisher.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- * 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.oodt.config.distributed.cli;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.curator.framework.CuratorFramework;
-import org.apache.oodt.config.Component;
-import org.apache.oodt.config.Constants;
-import org.apache.oodt.config.distributed.ZNodePaths;
-import org.apache.oodt.config.distributed.utils.CuratorUtils;
-import org.apache.zookeeper.data.Stat;
-import org.kohsuke.args4j.CmdLineException;
-import org.kohsuke.args4j.CmdLineParser;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.BeansException;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-
-import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
-import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
-
-/**
- * The class to publish configuration to Zookeeper. When using distributed configuration with OODT, configuration per
- * each component type needs to be stored in zookeeper beforehand. This class, provides the means to do that.
- *
- * @author Imesha Sudasingha
- */
-public class DistributedConfigurationPublisher {
-
-    private static final Logger logger = LoggerFactory.getLogger(DistributedConfigurationPublisher.class);
-
-    private Map<String, String> propertiesFiles;
-    private Map<String, String> configFiles;
-    private String connectString;
-    private CuratorFramework client;
-    private ZNodePaths zNodePaths;
-    private Component component;
-
-    public DistributedConfigurationPublisher(Component component) {
-        this.component = component;
-        this.zNodePaths = new ZNodePaths(this.component.getName());
-
-        if (System.getProperty(ZK_PROPERTIES_FILE) == null && System.getProperty(ZK_CONNECT_STRING) == null) {
-            throw new IllegalArgumentException("Zookeeper requires system properties " + ZK_PROPERTIES_FILE + " or " + ZK_CONNECT_STRING + " to be set");
-        }
-
-        if (System.getProperty(ZK_PROPERTIES_FILE) != null) {
-            try {
-                CuratorUtils.loadZookeeperProperties();
-            } catch (IOException e) {
-                logger.error("Error occurred when loading properties from properties file");
-            }
-        }
-
-        if (System.getProperty(ZK_CONNECT_STRING) == null) {
-            throw new IllegalArgumentException("Zookeeper requires a proper connect string to connect to zookeeper ensemble");
-        }
-
-        connectString = System.getProperty(ZK_CONNECT_STRING);
-        logger.info("Using zookeeper connect string : {}", connectString);
-
-        startZookeeper();
-    }
-
-    /**
-     * Creates a {@link CuratorFramework} instance and start it. This method will wait a maximum amount of {@link
-     * Constants.Properties#ZK_STARTUP_TIMEOUT} milli-seconds until the client connects to the zookeeper ensemble.
-     */
-    private void startZookeeper() {
-        client = CuratorUtils.newCuratorFrameworkClient(connectString, logger);
-
-        client.start();
-        logger.info("Curator framework start operation invoked");
-
-        int startupTimeOutMs = Integer.parseInt(System.getProperty(Constants.Properties.ZK_STARTUP_TIMEOUT, "30000"));
-        try {
-            logger.info("Waiting to connect to zookeeper, startupTimeout : {}", startupTimeOutMs);
-            client.blockUntilConnected(startupTimeOutMs, TimeUnit.MILLISECONDS);
-        } catch (InterruptedException ex) {
-            logger.error("Interrupted while waiting to connect zookeeper (connectString : {}) : {}", ex, connectString);
-        }
-
-        if (!client.getZookeeperClient().isConnected()) {
-            throw new IllegalStateException("Could not connect to ZooKeeper : " + connectString);
-        }
-
-        logger.info("CuratorFramework client started successfully");
-    }
-
-    public void destroy() {
-        logger.debug("Destroying configuration publisher");
-        try {
-            client.close();
-        } catch (Exception e) {
-            logger.error("Error occurred when trying to close Curator client : {}", e);
-        }
-
-        logger.info("Configuration publisher destroyed");
-    }
-
-    /**
-     * Publishes the configuration files specified to zookeeper. If an exception is thrown while configuration being
-     * published, no further publishing attempts will be carried on. Error will be reported to user.
-     *
-     * @throws Exception Zookeeper errors
-     */
-    public void publishConfiguration() throws Exception {
-        logger.debug("Publishing properties files : {}", propertiesFiles);
-        publishConfiguration(propertiesFiles, true);
-        logger.info("Properties files published successfully");
-
-        logger.debug("Publishing config files : {}", configFiles);
-        publishConfiguration(configFiles, false);
-        logger.info("Config files published successfully");
-    }
-
-    /**
-     * Verified whether the actual content of the local files specified to be published are 100% similar to the ones
-     * that has been published and stored in zookeeper at the moment.
-     *
-     * @return true | if content are up to date and similar
-     */
-    public boolean verifyPublishedConfiguration() {
-        try {
-            return verifyPublishedConfiguration(propertiesFiles, true) && verifyPublishedConfiguration(configFiles, false);
-        } catch (Exception e) {
-            logger.error("Error occurred when checking published config", e);
-            return false;
-        }
-    }
-
-    /**
-     * Removes all the nodes from zookeeper where the configuration corresponding to component {@link #component} is
-     * stored
-     *
-     * @throws Exception zookeeper errors
-     */
-    public void clearConfiguration() throws Exception {
-        logger.debug("Clearing configuration from zookeeper");
-        CuratorUtils.deleteChildNodes(client, zNodePaths.getPropertiesZNodePath());
-        CuratorUtils.deleteChildNodes(client, zNodePaths.getConfigurationZNodePath());
-        logger.info("Configuration cleared!");
-    }
-
-    private void publishConfiguration(Map<String, String> fileMapping, boolean isProperties) throws Exception {
-        for (Map.Entry<String, String> entry : fileMapping.entrySet()) {
-            String filePath = entry.getKey();
-            String relativeZNodePath = entry.getValue();
-            logger.info("Publishing configuration {} - {}", filePath, relativeZNodePath);
-
-            String content = getFileContent(filePath);
-
-            String zNodePath = isProperties ? zNodePaths.getPropertiesZNodePath(relativeZNodePath) : zNodePaths.getConfigurationZNodePath(relativeZNodePath);
-            if (client.checkExists().forPath(zNodePath) != null) {
-                byte[] bytes = client.getData().forPath(zNodePath);
-                String existingData = new String(bytes);
-                if (existingData.equals(content)) {
-                    logger.warn("{} already exists in zookeeper at {}", filePath, relativeZNodePath);
-                } else {
-                    Stat stat = client.setData().forPath(zNodePath, content.getBytes());
-                    if (stat != null) {
-                        logger.info("Published configuration file {} to {}", filePath, relativeZNodePath);
-                    } else {
-                        logger.warn("Unable to publish configuration file {} to {}", filePath, relativeZNodePath);
-                    }
-                }
-            } else {
-                /*
-                 * Creating these ZNodes with parent 'Containers' is important since containers are automatically deleted
-                 * when no child node is present under them.
-                 */
-                client.create().creatingParentContainersIfNeeded().forPath(zNodePath, content.getBytes());
-                logger.info("Replaced old published configuration at {} with content of file : {}", relativeZNodePath, filePath);
-            }
-        }
-    }
-
-    private boolean verifyPublishedConfiguration(Map<String, String> fileMapping, boolean isProperties) throws Exception {
-        boolean noError = true;
-        for (Map.Entry<String, String> entry : fileMapping.entrySet()) {
-            String filePath = entry.getKey();
-            String relativeZNodePath = entry.getValue();
-            logger.info("Checking published configuration for {} - {}", filePath, relativeZNodePath);
-
-            String originalContent = getFileContent(filePath);
-
-            String zNodePath = isProperties ? zNodePaths.getPropertiesZNodePath(relativeZNodePath) : zNodePaths.getConfigurationZNodePath(relativeZNodePath);
-            if (client.checkExists().forPath(zNodePath) == null) {
-                logger.error("File : {} hasn't been published to ZNode : {}", filePath, relativeZNodePath);
-                noError = false;
-                continue;
-            }
-
-            String publishedContent = new String(client.getData().forPath(zNodePath));
-            if (!publishedContent.equals(originalContent)) {
-                logger.error("Content of local file : {} and content published to {} are not similar", filePath, relativeZNodePath);
-                noError = false;
-                continue;
-            }
-
-            logger.info("{} - {} configuration checked and OK", filePath, relativeZNodePath);
-        }
-
-        return noError;
-    }
-
-    private String getFileContent(String file) {
-        String content;
-        try {
-            content = FileUtils.readFileToString(new File(file));
-        } catch (IOException e) {
-            logger.error("Unable to read file : {}", file, e);
-            throw new IllegalArgumentException("Unable to read content of the file : " + file);
-        }
-
-        return content;
-    }
-
-    public Map<String, String> getPropertiesFiles() {
-        return propertiesFiles;
-    }
-
-    public void setPropertiesFiles(Map<String, String> propertiesFiles) {
-        this.propertiesFiles = propertiesFiles;
-    }
-
-    public Map<String, String> getConfigFiles() {
-        return configFiles;
-    }
-
-    public void setConfigFiles(Map<String, String> configFiles) {
-        this.configFiles = configFiles;
-    }
-
-    public ZNodePaths getZNodePaths() {
-        return zNodePaths;
-    }
-
-    public static void main(String[] args) throws Exception {
-        CmdLineOptions cmdLineOptions = new CmdLineOptions();
-        CmdLineParser parser = new CmdLineParser(cmdLineOptions);
-
-        try {
-            parser.parseArgument(args);
-        } catch (CmdLineException e) {
-            System.err.println("There's an error in your command");
-            parser.printUsage(System.err);
-            return;
-        }
-
-        if (cmdLineOptions.getConnectString() == null && System.getProperty(ZK_CONNECT_STRING) == null) {
-            System.err.println("Zookeeper connect string is not found");
-            parser.printUsage(System.err);
-            return;
-        } else {
-            System.setProperty(ZK_CONNECT_STRING, cmdLineOptions.getConnectString());
-        }
-
-        System.out.println("Starting configuration publishing");
-
-        try {
-            ApplicationContext applicationContext = new ClassPathXmlApplicationContext(Constants.CONFIG_PUBLISHER_XML);
-            Map distributedConfigurationPublisher = applicationContext.getBeansOfType(DistributedConfigurationPublisher.class);
-
-            for (Object bean : distributedConfigurationPublisher.values()) {
-                DistributedConfigurationPublisher publisher = (DistributedConfigurationPublisher) bean;
-                System.out.println(String.format("\nProcessing commands for component : %s", publisher.getComponent()));
-
-                if (cmdLineOptions.isPublish()) {
-                    System.out.println(String.format("Publishing configuration for : %s", publisher.getComponent()));
-                    publisher.publishConfiguration();
-                    System.out.println(String.format("Published configuration for : %s", publisher.getComponent()));
-                    System.out.println();
-                }
-
-                if (cmdLineOptions.isVerify()) {
-                    System.out.println(String.format("Verifying configuration for : %s", publisher.getComponent()));
-                    if (publisher.verifyPublishedConfiguration()) {
-                        System.out.println("OK... Configuration verified");
-                        System.out.println(String.format("Verified configuration for : %s", publisher.getComponent()));
-                    } else {
-                        System.err.println("ERROR... Published configuration doesn't match the local files. Please check above logs");
-                    }
-                    System.out.println();
-                }
-
-                if (cmdLineOptions.isClear()) {
-                    System.out.println(String.format("Clearing configuration for : %s", publisher.getComponent()));
-                    publisher.clearConfiguration();
-                    System.out.println(String.format("Cleared configuration for : %s", publisher.getComponent()));
-                    System.out.println();
-                }
-
-                publisher.destroy();
-            }
-        } catch (BeansException e) {
-            logger.error("Error occurred when obtaining configuration publisher beans", e);
-            throw e;
-        } catch (Exception e) {
-            logger.error("Error occurred when publishing configuration to zookeeper", e);
-            throw e;
-        }
-
-        logger.info("Exiting CLI ...");
-    }
-
-    public Component getComponent() {
-        return component;
-    }
-}

http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java b/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java
index 5b242c2..cfb5ff9 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java
@@ -32,7 +32,11 @@ public class FilePathUtils {
     }
 
     public static String fixForComponentHome(Component component, String suffixPath) {
-        String prefix = System.getenv().get(component.getHome());
+        String prefix = System.getProperty(component.getHome());
+        if (prefix == null) {
+            prefix = System.getenv().get(component.getHome());
+        }
+
         StringBuilder path = new StringBuilder();
         if (prefix != null && !prefix.trim().isEmpty()) {
             prefix = prefix.trim();

http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/config/src/main/resources/etc/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/etc/config-publisher.xml b/config/src/main/resources/etc/config-publisher.xml
index 443a7a5..88ba33b 100644
--- a/config/src/main/resources/etc/config-publisher.xml
+++ b/config/src/main/resources/etc/config-publisher.xml
@@ -20,21 +20,21 @@
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
 
     <!-- Configuration publisher for File Manager OODT Component -->
-    <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher">
+    <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
         <constructor-arg value="FILE_MANAGER"/>
         <property name="propertiesFiles">
             <map key-type="java.lang.String" value-type="java.lang.String">
-                <entry key="../examples/filemgr/filemgr.properties" value="/etc/filemgr.properties"/>
+                <entry key="examples/filemgr/filemgr.properties" value="/etc/filemgr.properties"/>
             </map>
         </property>
         <property name="configFiles">
             <map key-type="java.lang.String" value-type="java.lang.String">
-                <entry key="../examples/filemgr/mime-types.xml" value="/etc/mime-types.xml"/>
-                <entry key="../examples/filemgr/cmd-line-actions.xml" value="/policy/cmd-line-actions.xml"/>
-                <entry key="../examples/filemgr/cmd-line-options.xml" value="/policy/cmd-line-options.xml"/>
-                <entry key="../examples/filemgr/oodt/elements.xml" value="/policy/oodt/elements.xml"/>
-                <entry key="../examples/filemgr/oodt/product-types.xml" value="/policy/oodt/product-types.xml"/>
-                <entry key="../examples/filemgr/oodt/product-type-element-map.xml" value="/policy/oodt/product-type-element-map.xml"/>
+                <entry key="examples/filemgr/mime-types.xml" value="/etc/mime-types.xml"/>
+                <entry key="examples/filemgr/cmd-line-actions.xml" value="/policy/cmd-line-actions.xml"/>
+                <entry key="examples/filemgr/cmd-line-options.xml" value="/policy/cmd-line-options.xml"/>
+                <entry key="examples/filemgr/oodt/elements.xml" value="/policy/oodt/elements.xml"/>
+                <entry key="examples/filemgr/oodt/product-types.xml" value="/policy/oodt/product-types.xml"/>
+                <entry key="examples/filemgr/oodt/product-type-element-map.xml" value="/policy/oodt/product-type-element-map.xml"/>
             </map>
         </property>
     </bean>

http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/config/src/main/resources/etc/log4j.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/etc/log4j.xml b/config/src/main/resources/etc/log4j.xml
index 17d6e8e..8cc1919 100644
--- a/config/src/main/resources/etc/log4j.xml
+++ b/config/src/main/resources/etc/log4j.xml
@@ -37,7 +37,7 @@
     </appender>
 
     <root>
-        <priority value="DEBUG"/>
+        <priority value="INFO"/>
         <appender-ref ref="console"/>
         <appender-ref ref="file"/>
     </root>
@@ -45,6 +45,9 @@
     <logger name="org.apache.zookeeper">
         <level value="ERROR"/>
     </logger>
+    <logger name="org.springframework">
+        <level value="ERROR"/>
+    </logger>
     <logger name="org.apache.curator">
         <level value="ERROR"/>
     </logger>

http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/config/src/main/scripts/conf-publisher
----------------------------------------------------------------------
diff --git a/config/src/main/scripts/conf-publisher b/config/src/main/scripts/conf-publisher
new file mode 100644
index 0000000..618af4b
--- /dev/null
+++ b/config/src/main/scripts/conf-publisher
@@ -0,0 +1,36 @@
+#!/bin/sh
+#/*
+# * 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.
+# */
+
+[ -f /etc/sysconfig/java ] && . /etc/sysconfig/java
+
+CONF_HOME=.
+
+for file in `find ${CONF_HOME}/lib/*.jar`; do
+     LIB_DEPS="${file}:${LIB_DEPS}"
+done
+
+LIB_DEPS="${CONF_HOME}/etc/log4j.xml:${LIB_DEPS}"
+
+echo -n "Starting Configuration Publisher"
+$JAVA_HOME/bin/java \
+        	-cp ${LIB_DEPS} \
+        	-Dlog4j.configuration=etc/log4j.xml \
+        	org.apache.oodt.config.distributed.cli.ConfigPublisher "$@"
+echo "OK"
+sleep 1
+exit 0

http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
index 08ecdc1..9052ac3 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
@@ -19,14 +19,12 @@ package org.apache.oodt.config.distributed;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.oodt.config.ConfigurationManager;
-import org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher;
+import org.apache.oodt.config.distributed.cli.ConfigPublisher;
 import org.apache.oodt.config.distributed.utils.FilePathUtils;
 import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertNotNull;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -42,6 +40,7 @@ import java.util.Set;
 
 import static org.apache.oodt.config.Constants.CONFIG_PUBLISHER_XML;
 import static org.apache.oodt.config.Constants.SEPARATOR;
+import static org.junit.Assert.fail;
 
 /**
  * Testing the {@link DistributedConfigurationManager} whether it is downloading and storing the configuration correctly
@@ -57,7 +56,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
     public static void setUp() throws Exception {
         AbstractDistributedConfigurationTest.setUp();
 
-        DistributedConfigurationPublisher.main(new String[]{
+        ConfigPublisher.main(new String[]{
                 "-connectString", zookeeper.getConnectString(),
                 "-publish"
         });
@@ -68,6 +67,8 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
         publishers = new ArrayList<>(distributedConfigurationPublishers.values().size());
         for (Object bean : distributedConfigurationPublishers.values()) {
             DistributedConfigurationPublisher publisher = (DistributedConfigurationPublisher) bean;
+
+            System.setProperty(publisher.getComponent().getHome(), ".");
             publishers.add(publisher);
         }
     }
@@ -84,11 +85,10 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
                 Properties properties = new Properties();
                 try (InputStream in = new FileInputStream(originalFile)) {
                     properties.load(in);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    fail(e.getMessage());
                 }
-		catch (Exception e){
-		    e.printStackTrace();
-		    fail(e.getMessage());
-		}
 
                 for (String key : properties.stringPropertyNames()) {
                     Assert.assertEquals(properties.getProperty(key), System.getProperty(key));
@@ -98,7 +98,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
                 fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(SEPARATOR.length()) : fileName;
                 fileName = FilePathUtils.fixForComponentHome(publisher.getComponent(), fileName);
                 File downloadedFile = new File(fileName);
-		Assert.assertNotNull(downloadedFile);
+                Assert.assertNotNull(downloadedFile);
                 Assert.assertTrue(downloadedFile.exists());
             }
 
@@ -126,7 +126,10 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
                 String fileName = entry.getValue();
                 fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(1) : fileName;
 
-                String prefixPath = System.getenv(publisher.getComponent().getHome());
+                String prefixPath = System.getProperty(publisher.getComponent().getHome());
+                if (prefixPath == null) {
+                    prefixPath = System.getenv(publisher.getComponent().getHome());
+                }
                 String confDir = prefixPath != null && !prefixPath.trim().isEmpty() ?
                         prefixPath.trim() + SEPARATOR + fileName.split(SEPARATOR)[0] : fileName.split(SEPARATOR)[0];
 
@@ -135,7 +138,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
             }
         }
 
-        DistributedConfigurationPublisher.main(new String[]{
+        ConfigPublisher.main(new String[]{
                 "-connectString", zookeeper.getConnectString(),
                 "-clear"
         });

http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
index 4f1552b..2c130db 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisherTest.java
@@ -18,7 +18,7 @@
 package org.apache.oodt.config.distributed;
 
 import org.apache.commons.io.FileUtils;
-import org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher;
+import org.apache.oodt.config.distributed.cli.ConfigPublisher;
 import org.junit.Assert;
 import org.junit.Test;
 import org.springframework.context.ApplicationContext;
@@ -41,7 +41,7 @@ public class DistributedConfigurationPublisherTest extends AbstractDistributedCo
     @Test
     public void publishConfigurationTest() throws Exception {
         // Publishing configuration through CLI and verifying whether they were stored correctly
-        DistributedConfigurationPublisher.main(new String[]{
+        ConfigPublisher.main(new String[]{
                 "-connectString", zookeeper.getConnectString(),
                 "-publish",
                 "-verify"
@@ -82,7 +82,7 @@ public class DistributedConfigurationPublisherTest extends AbstractDistributedCo
         }
 
         // Clearing configuration through CLI and checking whether the configuration has actually been gone
-        DistributedConfigurationPublisher.main(new String[]{
+        ConfigPublisher.main(new String[]{
                 "-connectString", zookeeper.getConnectString(),
                 "-clear"
         });

http://git-wip-us.apache.org/repos/asf/oodt/blob/39b6c888/config/src/test/resources/etc/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/test/resources/etc/config-publisher.xml b/config/src/test/resources/etc/config-publisher.xml
index 89e16f3..ecae033 100644
--- a/config/src/test/resources/etc/config-publisher.xml
+++ b/config/src/test/resources/etc/config-publisher.xml
@@ -19,7 +19,7 @@
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
 
-    <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher">
+    <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
         <constructor-arg value="FILE_MANAGER"/>
         <property name="propertiesFiles">
             <map key-type="java.lang.String" value-type="java.lang.String">
@@ -38,7 +38,7 @@
         </property>
     </bean>
 
-    <bean id="resmgr-config-publisher" class="org.apache.oodt.config.distributed.cli.DistributedConfigurationPublisher">
+    <bean id="resmgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
         <constructor-arg value="RESOURCE_MANAGER"/>
         <property name="propertiesFiles">
             <map key-type="java.lang.String" value-type="java.lang.String">


[8/8] oodt git commit: Introducing the concept of 'project' to distributed configuration management

Posted by ma...@apache.org.
Introducing the concept of 'project' to distributed configuration management


Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/1d70bd55
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/1d70bd55
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/1d70bd55

Branch: refs/heads/feature/zookeeper-config
Commit: 1d70bd559467a6acde75056b8d76084cb21c22ce
Parents: 72722e0
Author: Imesha Sudasingha <im...@gmail.com>
Authored: Sun Aug 6 14:52:32 2017 +0530
Committer: Imesha Sudasingha <im...@gmail.com>
Committed: Sun Aug 6 14:52:32 2017 +0530

----------------------------------------------------------------------
 .../oodt/config/ConfigurationManager.java       | 10 +++
 .../java/org/apache/oodt/config/Constants.java  | 16 ++++-
 .../DistributedConfigurationManager.java        | 14 ++--
 .../DistributedConfigurationPublisher.java      | 28 ++++++--
 .../oodt/config/distributed/ZNodePaths.java     | 20 ++++--
 .../config/distributed/utils/ConfigUtils.java   | 75 ++++++++++++++++++++
 .../config/distributed/utils/FilePathUtils.java | 59 ---------------
 config/src/main/resources/config-publisher.xml  |  4 ++
 .../DistributedConfigurationManagerTest.java    | 15 ++--
 config/src/test/resources/config-publisher.xml  |  2 +
 filemgr/pom.xml                                 |  1 +
 .../cas/filemgr/system/XmlRpcFileManager.java   |  1 +
 .../distributed/config/config-publisher.xml     |  3 +
 13 files changed, 162 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
index 2554604..53aacef 100644
--- a/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/ConfigurationManager.java
@@ -27,9 +27,15 @@ import java.util.List;
 public abstract class ConfigurationManager {
 
     protected Component component;
+    protected String project;
 
     public ConfigurationManager(Component component) {
+        this(component, Constants.DEFAULT_PROJECT);
+    }
+
+    public ConfigurationManager(Component component, String project) {
         this.component = component;
+        this.project = project;
     }
 
     public abstract void loadConfiguration() throws Exception;
@@ -53,4 +59,8 @@ public abstract class ConfigurationManager {
      * @return list of locally stored files
      */
     public abstract List<String> getSavedFiles();
+
+    public String getProject() {
+        return project;
+    }
 }

http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/config/src/main/java/org/apache/oodt/config/Constants.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/Constants.java b/config/src/main/java/org/apache/oodt/config/Constants.java
index 53a1116..611f81e 100644
--- a/config/src/main/java/org/apache/oodt/config/Constants.java
+++ b/config/src/main/java/org/apache/oodt/config/Constants.java
@@ -35,12 +35,23 @@ public class Constants {
     public static final String STANDALONE_NODE_NAME = "local";
 
     /** Default environment name to be used */
-    public static final String DEFAULT_ENVIRONMENT = "default";
+    public static final String DEFAULT_PROJECT = "default";
 
     /** The XML file name in which the configuration to be published to zookeeper is defined */
     public static final String DEFAULT_CONFIG_PUBLISHER_XML = "etc" + SEPARATOR + "config-publisher.xml";
 
+    public static class Env {
+        /** Environment variable name to specify OODT project name */
+        public static final String OODT_PROJECT = "OODT_PROJECT";
+    }
+
     public static class Properties {
+        /**
+         * Name of the OODT project. This property allows us to run same type OODT components to be run with different
+         * configuration using the same zookeeper ensemble.
+         */
+        public static final String OODT_PROJECT = "org.apache.oodt.config.project";
+
         /** The system property to be set in order to enable distributed configuration management */
         public static final String ENABLE_DISTRIBUTED_CONFIGURATION = "org.apache.oodt.config.distributed";
 
@@ -68,6 +79,9 @@ public class Constants {
         /** Namespace to be used when creating ZNodes in Zookeeper */
         public static final String NAMESPACE = "oodt";
 
+        /** Where configuration for separate projects are stored */
+        public static final String PROJECTS_PATH_NAME = "projects";
+
         /** Where OODT components related configuration are stored */
         public static final String COMPONENTS_PATH_NAME = "components";
 

http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
index 6b6ef21..ae8912a 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationManager.java
@@ -23,8 +23,8 @@ import org.apache.oodt.config.Component;
 import org.apache.oodt.config.ConfigurationManager;
 import org.apache.oodt.config.Constants;
 import org.apache.oodt.config.Constants.Properties;
+import org.apache.oodt.config.distributed.utils.ConfigUtils;
 import org.apache.oodt.config.distributed.utils.CuratorUtils;
-import org.apache.oodt.config.distributed.utils.FilePathUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -38,10 +38,11 @@ import java.util.concurrent.TimeUnit;
 
 import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
 import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
+import static org.apache.oodt.config.distributed.utils.ConfigUtils.getOODTProjectName;
 
 /**
  * Distributed configuration manager implementation. This class make use of a {@link CuratorFramework} instance to
- * connect to zookeeper
+ * connect to zookeeper.
  *
  * @author Imesha Sudasingha.
  */
@@ -52,16 +53,13 @@ public class DistributedConfigurationManager extends ConfigurationManager {
     /** Connection string required to connect to zookeeper */
     private String connectString;
     private CuratorFramework client;
-    /** Name of the OODT component, to which this class is providing configuration support */
-    private Component component;
     private ZNodePaths zNodePaths;
 
     private List<String> savedFiles = new ArrayList<>();
 
     public DistributedConfigurationManager(Component component) {
-        super(component);
-        this.component = component;
-        this.zNodePaths = new ZNodePaths(this.component.getName());
+        super(component, getOODTProjectName());
+        this.zNodePaths = new ZNodePaths(this.project, this.component.getName());
 
         if (System.getProperty(ZK_PROPERTIES_FILE) == null && System.getProperty(Constants.Properties.ZK_CONNECT_STRING) == null) {
             throw new IllegalArgumentException("Zookeeper requires system properties " + ZK_PROPERTIES_FILE + " or " + ZK_CONNECT_STRING + " to be set");
@@ -170,7 +168,7 @@ public class DistributedConfigurationManager extends ConfigurationManager {
     }
 
     private void saveFile(String path, byte[] data) throws IOException {
-        String localFilePath = FilePathUtils.fixForComponentHome(component, path);
+        String localFilePath = ConfigUtils.fixForComponentHome(component, path);
         File localFile = new File(localFilePath);
         if (localFile.exists()) {
             logger.warn("Deleting already existing file at {} before writing new content", localFilePath);

http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
index a36aee2..6229e96 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/DistributedConfigurationPublisher.java
@@ -31,6 +31,7 @@ import java.io.IOException;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
+import static org.apache.oodt.config.Constants.DEFAULT_PROJECT;
 import static org.apache.oodt.config.Constants.Properties.ZK_CONNECT_STRING;
 import static org.apache.oodt.config.Constants.Properties.ZK_PROPERTIES_FILE;
 
@@ -49,11 +50,18 @@ public class DistributedConfigurationPublisher {
     private String connectString;
     private CuratorFramework client;
     private ZNodePaths zNodePaths;
+
     private Component component;
+    private String project;
 
     public DistributedConfigurationPublisher(Component component) {
+        this(component, DEFAULT_PROJECT);
+    }
+
+    public DistributedConfigurationPublisher(Component component, String project) {
         this.component = component;
-        this.zNodePaths = new ZNodePaths(this.component.getName());
+        this.project = project;
+        this.zNodePaths = new ZNodePaths(this.project, this.component.getName());
 
         if (System.getProperty(ZK_PROPERTIES_FILE) == null && System.getProperty(ZK_CONNECT_STRING) == null) {
             throw new IllegalArgumentException("Zookeeper requires system properties " + ZK_PROPERTIES_FILE + " or " + ZK_CONNECT_STRING + " to be set");
@@ -161,7 +169,7 @@ public class DistributedConfigurationPublisher {
         for (Map.Entry<String, String> entry : fileMapping.entrySet()) {
             String filePath = entry.getKey();
             String relativeZNodePath = entry.getValue();
-            logger.info("Publishing configuration {} to {}", filePath, relativeZNodePath);
+            logger.debug("Publishing configuration {} to {}", filePath, relativeZNodePath);
 
             String content = getFileContent(filePath);
 
@@ -174,9 +182,9 @@ public class DistributedConfigurationPublisher {
                 } else {
                     Stat stat = client.setData().forPath(zNodePath, content.getBytes());
                     if (stat != null) {
-                        logger.info("Replaced old published configuration at {} with content of file : {}", relativeZNodePath, filePath);
+                        logger.info("Replaced old published configuration at {} with content of file : {}", zNodePath, filePath);
                     } else {
-                        logger.warn("Unable to replace published configuration at {} with file: {}", relativeZNodePath, filePath);
+                        logger.warn("Unable to replace published configuration at {} with file: {}", zNodePath, filePath);
                     }
                 }
             } else {
@@ -185,7 +193,7 @@ public class DistributedConfigurationPublisher {
                  * when no child node is present under them.
                  */
                 client.create().creatingParentContainersIfNeeded().forPath(zNodePath, content.getBytes());
-                logger.info("Published configuration file {} to {}", filePath, relativeZNodePath);
+                logger.info("Published configuration file {} to {}", filePath, zNodePath);
             }
         }
     }
@@ -195,7 +203,7 @@ public class DistributedConfigurationPublisher {
         for (Map.Entry<String, String> entry : fileMapping.entrySet()) {
             String filePath = entry.getKey();
             String relativeZNodePath = entry.getValue();
-            logger.info("Checking published configuration for {} - {}", filePath, relativeZNodePath);
+            logger.debug("Checking published configuration for {} - {}", filePath, relativeZNodePath);
 
             String originalContent = getFileContent(filePath);
 
@@ -216,6 +224,10 @@ public class DistributedConfigurationPublisher {
             logger.info("{} - {} configuration checked and OK", filePath, relativeZNodePath);
         }
 
+        if (!noError) {
+            logger.warn("There are errors in configuration publishing");
+        }
+
         return noError;
     }
 
@@ -254,4 +266,8 @@ public class DistributedConfigurationPublisher {
     public Component getComponent() {
         return component;
     }
+
+    public String getProject() {
+        return project;
+    }
 }

http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java b/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
index 01792ba..cf3ca00 100644
--- a/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
+++ b/config/src/main/java/org/apache/oodt/config/distributed/ZNodePaths.java
@@ -17,8 +17,10 @@
 
 package org.apache.oodt.config.distributed;
 
+import static org.apache.oodt.config.Constants.DEFAULT_PROJECT;
 import static org.apache.oodt.config.Constants.ZPaths.COMPONENTS_PATH_NAME;
 import static org.apache.oodt.config.Constants.ZPaths.CONFIGURATION_PATH_NAME;
+import static org.apache.oodt.config.Constants.ZPaths.PROJECTS_PATH_NAME;
 import static org.apache.oodt.config.Constants.ZPaths.PROPERTIES_PATH_NAME;
 import static org.apache.oodt.config.Constants.ZPaths.SEPARATOR;
 
@@ -29,15 +31,15 @@ import static org.apache.oodt.config.Constants.ZPaths.SEPARATOR;
  */
 public class ZNodePaths {
 
-    /** ZNode for distinct components. /components/${component} */
+    /** ZNode for distinct components. /projects/${project}/components/${component} */
     private String componentZNodePath;
     private String componentZNodeRoot;
 
-    /** ZNode path for properties files. /components/${component}/properties */
+    /** ZNode path for properties files. /projects/${project}/components/${component}/properties */
     private String propertiesZNodePath;
     private String propertiesZNodeRoot;
 
-    /** ZNode path for other configuration files. /components/${component}/configuration */
+    /** ZNode path for other configuration files. /projects/${project}/components/${component}/configuration */
     private String configurationZNodePath;
     private String configurationZNodeRoot;
 
@@ -47,12 +49,20 @@ public class ZNodePaths {
      *
      * @param componentName Name of the OODT component
      */
-    public ZNodePaths(String componentName) {
+    public ZNodePaths(String project, String componentName) {
+        if (project == null) {
+            project = DEFAULT_PROJECT;
+        }
+
         if (componentName == null) {
             throw new IllegalArgumentException("Component name cannot be null");
         }
 
-        componentZNodePath = SEPARATOR + COMPONENTS_PATH_NAME + SEPARATOR + componentName;
+        /* ZNode for distinct projects. /projects/${project} */
+        String projectZNodePath = SEPARATOR + PROJECTS_PATH_NAME + SEPARATOR + project;
+        String projectZNodeRoot = projectZNodePath + SEPARATOR;
+
+        componentZNodePath = projectZNodeRoot + COMPONENTS_PATH_NAME + SEPARATOR + componentName;
         componentZNodeRoot = componentZNodePath + SEPARATOR;
 
         propertiesZNodePath = componentZNodeRoot + PROPERTIES_PATH_NAME;

http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/config/src/main/java/org/apache/oodt/config/distributed/utils/ConfigUtils.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/utils/ConfigUtils.java b/config/src/main/java/org/apache/oodt/config/distributed/utils/ConfigUtils.java
new file mode 100644
index 0000000..6e4d677
--- /dev/null
+++ b/config/src/main/java/org/apache/oodt/config/distributed/utils/ConfigUtils.java
@@ -0,0 +1,75 @@
+/*
+ * 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.oodt.config.distributed.utils;
+
+import org.apache.oodt.config.Component;
+import org.apache.oodt.config.Constants;
+import org.apache.oodt.config.Constants.Env;
+import org.apache.oodt.config.Constants.ZPaths;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.oodt.config.Constants.Properties.OODT_PROJECT;
+import static org.apache.oodt.config.Constants.SEPARATOR;
+
+public class ConfigUtils {
+
+    private static final Logger logger = LoggerFactory.getLogger(ConfigUtils.class);
+
+    private ConfigUtils() {
+    }
+
+    /**
+     * Fix a given path to start from given {@link Component}'s home directory. Home directory will be fetched either
+     * through a system property or through an environment variable.
+     *
+     * @param component  OODT {@link Component}
+     * @param suffixPath path to be fixed
+     * @return fixed path
+     */
+    public static String fixForComponentHome(Component component, String suffixPath) {
+        String prefix = System.getProperty(component.getHome());
+        if (prefix == null) {
+            prefix = System.getenv().get(component.getHome());
+        }
+
+        StringBuilder path = new StringBuilder();
+        if (prefix != null && !prefix.trim().isEmpty()) {
+            prefix = prefix.trim();
+            logger.debug("Found prefix {}:{} for suffixPath: {}", component.getHome(), prefix, suffixPath);
+            path.append(prefix.endsWith(SEPARATOR) ? prefix : prefix + SEPARATOR);
+        }
+        path.append(suffixPath.startsWith(ZPaths.SEPARATOR) ? suffixPath.substring(ZPaths.SEPARATOR.length()) : suffixPath);
+        logger.debug("Fixed path for {} is {}", suffixPath, path.toString());
+        return path.toString();
+    }
+
+    /**
+     * Get the name of the project name (optional) if specified. Else return a default value
+     *
+     * @return OODT project name
+     */
+    public static String getOODTProjectName() {
+        String project = System.getProperty(OODT_PROJECT);
+        if (project == null) {
+            project = System.getenv(Env.OODT_PROJECT);
+        }
+
+        return project == null ? Constants.DEFAULT_PROJECT : project;
+    }
+}

http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java b/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java
deleted file mode 100644
index cfb5ff9..0000000
--- a/config/src/main/java/org/apache/oodt/config/distributed/utils/FilePathUtils.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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.oodt.config.distributed.utils;
-
-import org.apache.oodt.config.Component;
-import org.apache.oodt.config.Constants.ZPaths;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.apache.oodt.config.Constants.SEPARATOR;
-
-public class FilePathUtils {
-
-    private static final Logger logger = LoggerFactory.getLogger(FilePathUtils.class);
-
-    private FilePathUtils() {
-    }
-
-    public static String fixForComponentHome(Component component, String suffixPath) {
-        String prefix = System.getProperty(component.getHome());
-        if (prefix == null) {
-            prefix = System.getenv().get(component.getHome());
-        }
-
-        StringBuilder path = new StringBuilder();
-        if (prefix != null && !prefix.trim().isEmpty()) {
-            prefix = prefix.trim();
-            logger.debug("Found prefix {}:{} for suffixPath: {}", component.getHome(), prefix, suffixPath);
-            path.append(prefix.endsWith(SEPARATOR) ? prefix : prefix + SEPARATOR);
-        }
-        path.append(suffixPath.startsWith(ZPaths.SEPARATOR) ? suffixPath.substring(ZPaths.SEPARATOR.length()) : suffixPath);
-        logger.debug("Fixed path for {} is {}", suffixPath, path.toString());
-        return path.toString();
-    }
-
-    public static String unfixForComponentHome(Component component, String path) {
-        String prefix = System.getenv().get(component.getHome());
-        if (prefix != null && path.startsWith(prefix)) {
-            return path.substring(prefix.length() + SEPARATOR.length());
-        }
-
-        return path;
-    }
-}

http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/config/src/main/resources/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/main/resources/config-publisher.xml b/config/src/main/resources/config-publisher.xml
index d5b387a..ab6ee12 100644
--- a/config/src/main/resources/config-publisher.xml
+++ b/config/src/main/resources/config-publisher.xml
@@ -22,6 +22,10 @@
     <!-- File Manager example configuration publisher -->
     <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
         <constructor-arg value="FILE_MANAGER"/>
+
+        <!-- An optional project name, if you want to run several instances of the same component with different configuration -->
+        <!--<constructor-arg value="project-x"/>-->
+
         <property name="propertiesFiles">
             <map key-type="java.lang.String" value-type="java.lang.String">
                 <entry key="examples/filemgr/filemgr.properties" value="/etc/filemgr.properties"/>

http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
index a4315a5..0bf2dde 100644
--- a/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
+++ b/config/src/test/java/org/apache/oodt/config/distributed/DistributedConfigurationManagerTest.java
@@ -19,7 +19,7 @@ package org.apache.oodt.config.distributed;
 
 import org.apache.oodt.config.ConfigurationManager;
 import org.apache.oodt.config.distributed.cli.ConfigPublisher;
-import org.apache.oodt.config.distributed.utils.FilePathUtils;
+import org.apache.oodt.config.distributed.utils.ConfigUtils;
 import org.apache.oodt.config.test.AbstractDistributedConfigurationTest;
 import org.junit.After;
 import org.junit.Assert;
@@ -36,7 +36,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
-import static org.apache.oodt.config.Constants.SEPARATOR;
+import static org.apache.oodt.config.Constants.Properties.OODT_PROJECT;
 import static org.junit.Assert.fail;
 
 /**
@@ -77,6 +77,8 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
     @Test
     public void loadConfigurationTest() throws Exception {
         for (DistributedConfigurationPublisher publisher : publishers) {
+            System.setProperty(OODT_PROJECT, publisher.getProject());
+
             ConfigurationManager configurationManager = new DistributedConfigurationManager(publisher.getComponent());
             configurationManager.loadConfiguration();
 
@@ -87,7 +89,6 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
                 try (InputStream in = new FileInputStream(originalFile)) {
                     properties.load(in);
                 } catch (Exception e) {
-                    e.printStackTrace();
                     fail(e.getMessage());
                 }
 
@@ -96,8 +97,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
                 }
 
                 String fileName = entry.getValue();
-                fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(SEPARATOR.length()) : fileName;
-                fileName = FilePathUtils.fixForComponentHome(publisher.getComponent(), fileName);
+                fileName = ConfigUtils.fixForComponentHome(publisher.getComponent(), fileName);
                 File downloadedFile = new File(fileName);
                 Assert.assertNotNull(downloadedFile);
                 Assert.assertTrue(downloadedFile.exists());
@@ -106,8 +106,7 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
             // Checking for configuration files
             for (Map.Entry<String, String> entry : publisher.getConfigFiles().entrySet()) {
                 String fileName = entry.getValue();
-                fileName = fileName.startsWith(SEPARATOR) ? fileName.substring(SEPARATOR.length()) : fileName;
-                fileName = FilePathUtils.fixForComponentHome(publisher.getComponent(), fileName);
+                fileName = ConfigUtils.fixForComponentHome(publisher.getComponent(), fileName);
                 File file = new File(fileName);
                 Assert.assertTrue(file.exists());
             }
@@ -118,6 +117,8 @@ public class DistributedConfigurationManagerTest extends AbstractDistributedConf
                 File file = new File(localFile);
                 Assert.assertFalse(file.exists());
             }
+
+            System.clearProperty(OODT_PROJECT);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/config/src/test/resources/config-publisher.xml
----------------------------------------------------------------------
diff --git a/config/src/test/resources/config-publisher.xml b/config/src/test/resources/config-publisher.xml
index 5720dab..bff93c2 100644
--- a/config/src/test/resources/config-publisher.xml
+++ b/config/src/test/resources/config-publisher.xml
@@ -21,6 +21,7 @@
 
     <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
         <constructor-arg value="FILE_MANAGER"/>
+        <constructor-arg value="project1"/>
         <property name="propertiesFiles">
             <map key-type="java.lang.String" value-type="java.lang.String">
                 <entry key="target/resources/examples/filemgr/filemgr.properties" value="/etc/filemgr.properties"/>
@@ -49,6 +50,7 @@
 
     <bean id="resmgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
         <constructor-arg value="RESOURCE_MANAGER"/>
+        <constructor-arg value="project2"/>
         <property name="propertiesFiles">
             <map key-type="java.lang.String" value-type="java.lang.String">
                 <entry key="target/resources/examples/resmgr/resource.properties" value="/etc/resource.properties"/>

http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/filemgr/pom.xml
----------------------------------------------------------------------
diff --git a/filemgr/pom.xml b/filemgr/pom.xml
index 84d6198..4fadcb8 100644
--- a/filemgr/pom.xml
+++ b/filemgr/pom.xml
@@ -237,6 +237,7 @@
           </systemProperties>
           <environmentVariables>
             <OODT_FILEMGR_HOME>${project.basedir}</OODT_FILEMGR_HOME>
+            <OODT_PROJECT>primary</OODT_PROJECT>
           </environmentVariables>
           <forkedProcessTimeoutInSeconds>0</forkedProcessTimeoutInSeconds>
           <redirectTestOutputToFile>true</redirectTestOutputToFile>

http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
index aa7075c..8e70479 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
@@ -1224,6 +1224,7 @@ public class XmlRpcFileManager {
   }
 
   public boolean shutdown() {
+    configurationManager.clearConfiguration();
     if (this.webServer != null) {
       this.webServer.shutdown();
       this.webServer = null;

http://git-wip-us.apache.org/repos/asf/oodt/blob/1d70bd55/filemgr/src/test/resources/distributed/config/config-publisher.xml
----------------------------------------------------------------------
diff --git a/filemgr/src/test/resources/distributed/config/config-publisher.xml b/filemgr/src/test/resources/distributed/config/config-publisher.xml
index 19e9f8c..f6a97c1 100644
--- a/filemgr/src/test/resources/distributed/config/config-publisher.xml
+++ b/filemgr/src/test/resources/distributed/config/config-publisher.xml
@@ -21,6 +21,9 @@
 
     <bean id="filemgr-config-publisher" class="org.apache.oodt.config.distributed.DistributedConfigurationPublisher">
         <constructor-arg value="FILE_MANAGER"/>
+
+        <constructor-arg value="primary"/>
+
         <property name="propertiesFiles">
             <map key-type="java.lang.String" value-type="java.lang.String">
                 <entry key="src/test/resources/distributed/config/filemgr.properties" value="target/filemgr/etc/filemgr.properties"/>