Author: mattmann
Date: Mon Feb 21 04:16:03 2011
New Revision: 1072846

URL: http://svn.apache.org/viewvc?rev=1072846&view=rev
Log:
- fix for OODT-137 OODT 0.1-incubating dependency fixer tool

Added:
    oodt/tools/depfixer/
    oodt/tools/depfixer/pom.xml
    oodt/tools/depfixer/src/
    oodt/tools/depfixer/src/main/
    oodt/tools/depfixer/src/main/ant/
    oodt/tools/depfixer/src/main/ant/fix_oodt_version.xml

Added: oodt/tools/depfixer/pom.xml
URL: 
http://svn.apache.org/viewvc/oodt/tools/depfixer/pom.xml?rev=1072846&view=auto
==============================================================================
--- oodt/tools/depfixer/pom.xml (added)
+++ oodt/tools/depfixer/pom.xml Mon Feb 21 04:16:03 2011
@@ -0,0 +1,52 @@
+<?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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+       <modelVersion>4.0.0</modelVersion>
+       <artifactId>oodt-depfixer</artifactId>
+       <version>0.1-incubating</version>
+       <name>Apache OODT 0.1-incubating Dependency Fixer</name>
+       <groupId>org.apache.oodt</groupId>
+       <packaging>pom</packaging>
+       <build>
+               <sourceDirectory>${basedir}/src/main/java</sourceDirectory>
+               <testSourceDirectory>${basedir}/src/test</testSourceDirectory>
+               <plugins>
+                       <plugin>
+                               <artifactId>maven-antrun-plugin</artifactId>
+                               <version>1.6</version>
+                               <executions>
+                                       <execution>
+                                               
<id>fix-oodt-incubating-version</id>
+                                               <phase>validate</phase>
+                                               <configuration>
+                                                       <target>
+                                                               <ant 
antfile="${basedir}/src/main/ant/fix_oodt_version.xml"
+                                                                       
inheritRefs="true" inheritAll="true">
+                                                                       
<property name="basedir" value="${basedir}" />
+                                                               </ant>
+                                                       </target>
+                                               </configuration>
+                                               <goals>
+                                                       <goal>run</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+               </plugins>
+       </build>
+</project>

Added: oodt/tools/depfixer/src/main/ant/fix_oodt_version.xml
URL: 
http://svn.apache.org/viewvc/oodt/tools/depfixer/src/main/ant/fix_oodt_version.xml?rev=1072846&view=auto
==============================================================================
--- oodt/tools/depfixer/src/main/ant/fix_oodt_version.xml (added)
+++ oodt/tools/depfixer/src/main/ant/fix_oodt_version.xml Mon Feb 21 04:16:03 
2011
@@ -0,0 +1,182 @@
+<?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.
+
+       Author: mattmann, rverma 
+       Description: Checks out Apache OODT
+       0.1-incubating components, and fixes the variable version within their
+       respective poms to point to 0.1-incubating using a replace task.
+       Finally, installs the respective components to the user's local maven
+       repo.
+-->
+<project name="fix-oodt-incubating-version" default="all">
+
+       <target name="all">
+
+               <!--  create the work directory -->
+               <mkdir dir="${basedir}/target/fix_oodt/" />
+
+               <!-- Install components -->
+               <antcall target="install_component">
+                       <param name="component" value="core" />
+               </antcall>
+               <antcall target="install_component">
+                       <param name="component" value="commons" />
+               </antcall>
+               <antcall target="install_component">
+                       <param name="component" value="catalog" />
+               </antcall>
+               <antcall target="install_component">
+                       <param name="component" value="crawler" />
+               </antcall>
+               <antcall target="install_component">
+                       <param name="component" value="curator" />
+               </antcall>
+               <antcall target="install_component">
+                       <param name="component" value="filemgr" />
+               </antcall>
+               <antcall target="install_component">
+                       <param name="component" value="grid" />
+               </antcall>
+               <antcall target="install_component">
+                       <param name="component" value="metadata" />
+               </antcall>
+               <antcall target="install_component">
+                       <param name="component" value="pge" />
+               </antcall>
+               <antcall target="install_component">
+                       <param name="component" value="product" />
+               </antcall>
+               <antcall target="install_component">
+                       <param name="component" value="profile" />
+               </antcall>
+               <antcall target="install_component">
+                       <param name="component" value="pushpull" />
+               </antcall>
+               <antcall target="install_component">
+                       <param name="component" value="resource" />
+               </antcall>
+               <antcall target="install_component">
+                       <param name="component" value="sso" />
+               </antcall>
+               <antcall target="install_component">
+                       <param name="component" value="workflow" />
+               </antcall>
+               <antcall target="install_component">
+                       <param name="component" value="xmlps" />
+               </antcall>
+               <antcall target="install_component">
+                       <param name="component" value="xmlquery" />
+               </antcall>
+
+               <!-- Install components (with special paths) -->
+               <antcall target="install_component_special">
+                       <param name="component" value="app" />
+                       <param name="pom_path" value="/fmbrowser" />
+               </antcall>
+               <antcall target="install_component_special">
+                       <param name="component" value="mvn" />
+                       <param name="pom_path" value="/plugins/cas-install" />
+               </antcall>
+               <antcall target="install_component_special">
+                       <param name="component" value="pcs" />
+                       <param name="pom_path" value="/input" />
+               </antcall>
+               <antcall target="install_component_special">
+                       <param name="component" value="webapp" />
+                       <param name="pom_path" value="/filemgr" />
+               </antcall>
+               <antcall target="install_component_special">
+                       <param name="component" value="webapp" />
+                       <param name="pom_path" value="/fmprod" />
+               </antcall>
+               <antcall target="install_component_special">
+                       <param name="component" value="webapp" />
+                       <param name="pom_path" value="/workflow" />
+               </antcall>
+
+       </target>
+
+       <target name="install_component">
+
+               <echo message="Installing component: '${component}'" />
+
+               <!--  check out Apache OODT 0.1-incubating -->
+               <exec dir="${basedir}/target/fix_oodt/" executable="svn"
+                       output="${basedir}/target/svn.oodt.${component}.co.log">
+                       <arg
+                               line="export 
https://svn.apache.org/repos/asf/oodt/tags/0.1-incubating/${component}"; />
+               </exec>
+
+               <!--
+                       now mvn install the component component pom into the 
local repo (in
+                       case they don't have it)
+               -->
+               <exec dir="${basedir}/target/fix_oodt/${component}" 
executable="mvn"
+                       output="${basedir}/target/mvn.${component}.install.log">
+                       <arg line="install" />
+               </exec>
+
+               <!--
+                       run replace on pom.xml and replace ${oodt.version} with
+                       0.1-incubating
+               -->
+               <replace file="${basedir}/target/fix_oodt/${component}/pom.xml"
+                       token="$${oodt.version}" value="0.1-incubating" />
+
+               <!--. now mvn install the fixed pom into the local repo -->
+               <exec dir="${basedir}/target/fix_oodt/${component}" 
executable="mvn"
+                       output="${basedir}/target/mvn.${component}.install.log">
+                       <arg line="install" />
+               </exec>
+
+       </target>
+
+       <target name="install_component_special">
+
+               <echo message="Installing component: '${component}'" />
+
+               <!--  check out Apache OODT 0.1-incubating -->
+               <exec dir="${basedir}/target/fix_oodt/" executable="svn"
+                       output="${basedir}/target/svn.oodt.${component}.co.log">
+                       <arg
+                               line="export 
https://svn.apache.org/repos/asf/oodt/tags/0.1-incubating/${component}"; />
+               </exec>
+
+               <!--
+                       now mvn install the oodt component pom into the local 
repo (in case
+                       they don't have it)
+               -->
+               <exec dir="${basedir}/target/fix_oodt/${component}${pom_path}"
+                       executable="mvn" 
output="${basedir}/target/mvn.${component}.install.log">
+                       <arg line="install" />
+               </exec>
+
+               <!--
+                       run replace on pom.xml and replace ${oodt.version} with
+                       0.1-incubating
+               -->
+               <replace 
file="${basedir}/target/fix_oodt/${component}${pom_path}/pom.xml"
+                       token="$${oodt.version}" value="0.1-incubating" />
+
+               <!-- now mvn install the fixed pom into the local repo -->
+               <exec dir="${basedir}/target/fix_oodt/${component}${pom_path}"
+                       executable="mvn" 
output="${basedir}/target/mvn.${component}.install.log">
+                       <arg line="install" />
+               </exec>
+
+       </target>
+
+</project>


Reply via email to