From: <bi...@us...> - 2010-02-20 03:21:06
|
Revision: 2958 http://archive-access.svn.sourceforge.net/archive-access/?rev=2958&view=rev Author: binzino Date: 2010-02-20 03:20:59 +0000 (Sat, 20 Feb 2010) Log Message: ----------- WAX-72 and WAX-71: Re-did build system. Modified Paths: -------------- trunk/archive-access/projects/nutchwax/archive/build.xml Added Paths: ----------- trunk/archive-access/projects/nutchwax/archive/src/nutch/src/plugin/ trunk/archive-access/projects/nutchwax/archive/src/nutch/src/plugin/build.xml Removed Paths: ------------- trunk/archive-access/projects/nutchwax/archive/src/plugin/build-plugin.xml trunk/archive-access/projects/nutchwax/archive/src/plugin/build.xml Modified: trunk/archive-access/projects/nutchwax/archive/build.xml =================================================================== --- trunk/archive-access/projects/nutchwax/archive/build.xml 2010-02-20 03:18:57 UTC (rev 2957) +++ trunk/archive-access/projects/nutchwax/archive/build.xml 2010-02-20 03:20:59 UTC (rev 2958) @@ -25,81 +25,52 @@ <!-- HACK: Need to import default.properties like Nutch does --> <property name="final.name" value="nutch-1.0" /> <property name="dist.dir" value="${build.dir}/${final.name}" /> - - <target name="nutch-compile-core"> - <!-- First, copy over Nutch source overlays --> + + <target name="init"> <exec executable="rsync"> <arg value="-vacC"/> <arg value="src/nutch/"/> <arg value="../../"/> </exec> - <ant dir="${nutch.dir}" target="compile-core" inheritAll="false" /> + <exec executable="rsync"> + <arg value="-vacC"/> + <arg value="lib/"/> + <arg value="../../lib/"/> + </exec> + <exec executable="rsync"> + <arg value="-vacC"/> + <arg value="bin/"/> + <arg value="../../bin/"/> + </exec> + <exec executable="rsync"> + <arg value="-vacC"/> + <arg value="src/java/"/> + <arg value="../../src/java/"/> + </exec> + <exec executable="rsync"> + <arg value="-vacC"/> + <arg value="src/plugin/"/> + <arg value="../../src/plugin/"/> + </exec> </target> - - <target name="nutch-compile-plugins"> - <ant dir="${nutch.dir}" target="compile-plugins" inheritAll="false" /> - </target> - - <target name="compile-core" depends="nutch-compile-core"> - <javac - destdir="${build.dir}/classes" - debug="true" - verbose="false" - source="1.5" - target="1.5" - encoding="UTF-8" - fork="true" - nowarn="true" - deprecation="false"> - <src path="${src.dir}/java" /> - <include name="**/*.java" /> - <classpath> - <pathelement location="${build.dir}/classes" /> - <fileset dir="${lib.dir}"> - <include name="*.jar"/> - </fileset> - <fileset dir="${nutch.dir}/lib"> - <include name="*.jar"/> - </fileset> - </classpath> - </javac> - </target> - - <target name="compile-plugins"> - <ant dir="src/plugin" target="deploy" inheritAll="false" /> - </target> - - <!-- - These targets all call down to the corresponding target in the - Nutch build.xml file. This way all of the 'ant' build commands - can be executed from this directory and everything should get - built as expected. - --> - <target name="compile" depends="compile-core, compile-plugins, nutch-compile-plugins"> - </target> - - <target name="jar" depends="compile-core"> + + <target name="jar" depends="init"> <ant dir="${nutch.dir}" target="jar" inheritAll="false" /> </target> - <target name="job" depends="compile"> + <target name="job" depends="init"> <ant dir="${nutch.dir}" target="job" inheritAll="false" /> - - <!-- Add our NutchWAX libs to the .job created by Nutch's build. --> - <jar jarfile="${build.dir}/${final.name}.job" update="true"> - <zipfileset dir="lib" prefix="lib" includes="*.jar"/> - </jar> </target> - <target name="war" depends="compile"> + <target name="war" depends="init"> <ant dir="${nutch.dir}" target="war" inheritAll="false" /> </target> - <target name="javadoc" depends="compile"> + <target name="javadoc" depends="init"> <ant dir="${nutch.dir}" target="javadoc" inheritAll="false" /> </target> - <target name="tar" depends="package"> + <target name="tar" depends="init"> <ant dir="${nutch.dir}" target="tar" inheritAll="false" /> </target> @@ -107,24 +78,12 @@ <ant dir="${nutch.dir}" target="clean" inheritAll="false" /> </target> - <!-- This one does a little more after calling down to the relevant - Nutch target. After Nutch has copied everything into the - distribution directory, we add our script, libraries, etc. - --> - <target name="package" depends="jar, job, war, javadoc" > + <target name="package" depends="init"> <ant dir="${nutch.dir}" target="package" inheritAll="false" /> <ant target="onlypack" /> </target> <target name="onlypack"> - <copy todir="${dist.dir}/lib" includeEmptyDirs="false"> - <fileset dir="lib"/> - </copy> - - <copy todir="${dist.dir}/bin"> - <fileset dir="bin"/> - </copy> - <chmod perm="ugo+x" type="file"> <fileset dir="${dist.dir}/bin"/> </chmod> Added: trunk/archive-access/projects/nutchwax/archive/src/nutch/src/plugin/build.xml =================================================================== --- trunk/archive-access/projects/nutchwax/archive/src/nutch/src/plugin/build.xml (rev 0) +++ trunk/archive-access/projects/nutchwax/archive/src/nutch/src/plugin/build.xml 2010-02-20 03:20:59 UTC (rev 2958) @@ -0,0 +1,204 @@ +<?xml version="1.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. +--> +<project name="Nutch" default="deploy-core" basedir="."> + + <target name="deploy-core"> + <ant target="compile-core" inheritall="false" dir="../.."/> + <ant target="deploy"/> + </target> + + <!-- ====================================================== --> + <!-- Build & deploy all the plugin jars. --> + <!-- ====================================================== --> + <target name="deploy"> + <ant dir="clustering-carrot2" target="deploy"/> + <ant dir="creativecommons" target="deploy"/> + <ant dir="feed" target="deploy"/> + <ant dir="index-basic" target="deploy"/> + <ant dir="index-anchor" target="deploy"/> + <ant dir="index-more" target="deploy"/> + <ant dir="field-basic" target="deploy"/> + <ant dir="field-boost" target="deploy"/> + <ant dir="languageidentifier" target="deploy"/> + <ant dir="lib-http" target="deploy"/> + <ant dir="lib-jakarta-poi" target="deploy"/> + <ant dir="lib-lucene-analyzers" target="deploy"/> + <ant dir="lib-nekohtml" target="deploy"/> + <ant dir="lib-parsems" target="deploy"/> + <ant dir="lib-regex-filter" target="deploy"/> + <ant dir="lib-xml" target="deploy"/> + <ant dir="microformats-reltag" target="deploy"/> + <ant dir="nutch-extensionpoints" target="deploy"/> + <ant dir="ontology" target="deploy"/> + <ant dir="protocol-file" target="deploy"/> + <ant dir="protocol-ftp" target="deploy"/> + <ant dir="protocol-http" target="deploy"/> + <ant dir="protocol-httpclient" target="deploy"/> + <ant dir="parse-ext" target="deploy"/> + <ant dir="parse-html" target="deploy"/> + <ant dir="parse-js" target="deploy"/> + <!-- <ant dir="parse-mp3" target="deploy"/> --> + <ant dir="parse-msexcel" target="deploy"/> + <ant dir="parse-mspowerpoint" target="deploy"/> + <ant dir="parse-msword" target="deploy"/> + <ant dir="parse-oo" target="deploy"/> + <ant dir="parse-pdf" target="deploy"/> + <ant dir="parse-rss" target="deploy"/> + <!-- <ant dir="parse-rtf" target="deploy"/> --> + <ant dir="parse-swf" target="deploy"/> + <ant dir="parse-text" target="deploy"/> + <ant dir="parse-zip" target="deploy"/> + <ant dir="query-basic" target="deploy"/> + <ant dir="query-more" target="deploy"/> + <ant dir="query-site" target="deploy"/> + <ant dir="query-custom" target="deploy"/> + <ant dir="query-url" target="deploy"/> + <ant dir="response-json" target="deploy"/> + <ant dir="response-xml" target="deploy"/> + <ant dir="scoring-opic" target="deploy"/> + <ant dir="scoring-link" target="deploy"/> + <ant dir="summary-basic" target="deploy"/> + <ant dir="subcollection" target="deploy"/> + <ant dir="summary-lucene" target="deploy"/> + <ant dir="tld" target="deploy"/> + <ant dir="urlfilter-automaton" target="deploy"/> + <ant dir="urlfilter-domain" target="deploy" /> + <ant dir="urlfilter-prefix" target="deploy"/> + <ant dir="urlfilter-regex" target="deploy"/> + <ant dir="urlfilter-suffix" target="deploy"/> + <ant dir="urlfilter-validator" target="deploy"/> + <ant dir="urlnormalizer-basic" target="deploy"/> + <ant dir="urlnormalizer-pass" target="deploy"/> + <ant dir="urlnormalizer-regex" target="deploy"/> + + <ant dir="index-nutchwax" target="deploy" /> + <ant dir="query-nutchwax" target="deploy" /> + <ant dir="scoring-nutchwax" target="deploy" /> + <ant dir="urlfilter-nutchwax" target="deploy" /> + + </target> + + <!-- ====================================================== --> + <!-- Test all of the plugins. --> + <!-- ====================================================== --> + <target name="test"> + <parallel threadCount="2"> + <ant dir="creativecommons" target="test"/> + <ant dir="index-more" target="test"/> + <ant dir="languageidentifier" target="test"/> + <ant dir="lib-http" target="test"/> + <ant dir="ontology" target="test"/> + <ant dir="protocol-httpclient" target="test"/> + <!--ant dir="parse-ext" target="test"/--> + <ant dir="parse-html" target="test"/> + <!-- <ant dir="parse-mp3" target="test"/> --> + <ant dir="parse-msexcel" target="test"/> + <ant dir="parse-mspowerpoint" target="test"/> + <ant dir="parse-msword" target="test"/> + <ant dir="parse-oo" target="test"/> + <ant dir="parse-pdf" target="test"/> + <ant dir="parse-rss" target="test"/> + <ant dir="feed" target="test"/> + <!-- <ant dir="parse-rtf" target="test"/> --> + <ant dir="parse-swf" target="test"/> + <ant dir="parse-zip" target="test"/> + <ant dir="query-url" target="test"/> + <ant dir="subcollection" target="test"/> + <ant dir="urlfilter-automaton" target="test"/> + <ant dir="urlfilter-domain" target="test" /> + <ant dir="urlfilter-regex" target="test"/> + <ant dir="urlfilter-suffix" target="test"/> + <ant dir="urlnormalizer-basic" target="test"/> + <ant dir="urlnormalizer-pass" target="test"/> + <ant dir="urlnormalizer-regex" target="test"/> + </parallel> + </target> + + <!-- ====================================================== --> + <!-- Clean all of the plugins. --> + <!-- ====================================================== --> + <target name="clean"> + <ant dir="analysis-de" target="clean"/> + <ant dir="analysis-fr" target="clean"/> + <ant dir="clustering-carrot2" target="clean"/> + <ant dir="creativecommons" target="clean"/> + <ant dir="feed" target="clean"/> + <ant dir="index-basic" target="clean"/> + <ant dir="index-anchor" target="clean"/> + <ant dir="index-more" target="clean"/> + <ant dir="field-basic" target="clean"/> + <ant dir="field-boost" target="clean"/> + <ant dir="languageidentifier" target="clean"/> + <ant dir="lib-commons-httpclient" target="clean"/> + <ant dir="lib-http" target="clean"/> + <ant dir="lib-jakarta-poi" target="clean"/> + <ant dir="lib-lucene-analyzers" target="clean"/> + <ant dir="lib-nekohtml" target="clean"/> + <ant dir="lib-parsems" target="clean"/> + <ant dir="lib-regex-filter" target="clean"/> + <ant dir="lib-xml" target="clean"/> + <ant dir="microformats-reltag" target="clean"/> + <ant dir="nutch-extensionpoints" target="clean"/> + <ant dir="ontology" target="clean"/> + <ant dir="protocol-file" target="clean"/> + <ant dir="protocol-ftp" target="clean"/> + <ant dir="protocol-http" target="clean"/> + <ant dir="protocol-httpclient" target="clean"/> + <ant dir="parse-ext" target="clean"/> + <ant dir="parse-html" target="clean"/> + <ant dir="parse-js" target="clean"/> + <ant dir="parse-mp3" target="clean"/> + <ant dir="parse-msexcel" target="clean"/> + <ant dir="parse-mspowerpoint" target="clean"/> + <ant dir="parse-msword" target="clean"/> + <ant dir="parse-oo" target="clean"/> + <ant dir="parse-pdf" target="clean"/> + <ant dir="parse-rss" target="clean"/> + <ant dir="parse-rtf" target="clean"/> + <ant dir="parse-swf" target="clean"/> + <ant dir="parse-text" target="clean"/> + <ant dir="parse-zip" target="clean"/> + <ant dir="query-basic" target="clean"/> + <ant dir="query-more" target="clean"/> + <ant dir="query-site" target="clean"/> + <ant dir="query-url" target="clean"/> + <ant dir="query-custom" target="clean"/> + <ant dir="response-json" target="clean"/> + <ant dir="response-xml" target="clean"/> + <ant dir="scoring-opic" target="clean"/> + <ant dir="scoring-link" target="clean"/> + <ant dir="subcollection" target="clean"/> + <ant dir="summary-basic" target="clean"/> + <ant dir="summary-lucene" target="clean"/> + <ant dir="tld" target="clean"/> + <ant dir="urlfilter-automaton" target="clean"/> + <ant dir="urlfilter-domain" target="clean" /> + <ant dir="urlfilter-prefix" target="clean"/> + <ant dir="urlfilter-regex" target="clean"/> + <ant dir="urlfilter-suffix" target="clean"/> + <ant dir="urlfilter-validator" target="clean"/> + <ant dir="urlnormalizer-basic" target="clean"/> + <ant dir="urlnormalizer-pass" target="clean"/> + <ant dir="urlnormalizer-regex" target="clean"/> + + <ant dir="index-nutchwax" target="clean" /> + <ant dir="query-nutchwax" target="clean" /> + <ant dir="scoring-nutchwax" target="clean" /> + <ant dir="urlfilter-nutchwax" target="clean" /> + </target> +</project> Property changes on: trunk/archive-access/projects/nutchwax/archive/src/nutch/src/plugin/build.xml ___________________________________________________________________ Added: svn:executable + * Deleted: trunk/archive-access/projects/nutchwax/archive/src/plugin/build-plugin.xml =================================================================== --- trunk/archive-access/projects/nutchwax/archive/src/plugin/build-plugin.xml 2010-02-20 03:18:57 UTC (rev 2957) +++ trunk/archive-access/projects/nutchwax/archive/src/plugin/build-plugin.xml 2010-02-20 03:20:59 UTC (rev 2958) @@ -1,216 +0,0 @@ -<?xml version="1.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. ---> -<!-- Imported by plugin build.xml files to define default targets. --> -<project> - - <property name="name" value="${ant.project.name}"/> - <property name="root" value="${basedir}"/> - - <!-- load plugin-specific properties first --> - <property file="${user.home}/${name}.build.properties" /> - <property file="${root}/build.properties" /> - - <property name="nutch.root" location="${root}/../../../../../"/> - - <property name="src.dir" location="${root}/src/java"/> - <property name="src.test" location="${root}/src/test"/> - - <available file="${src.test}" type="dir" property="test.available"/> - - <property name="conf.dir" location="${nutch.root}/conf"/> - - <property name="build.dir" location="${nutch.root}/build/${name}"/> - <property name="build.classes" location="${build.dir}/classes"/> - <property name="build.test" location="${build.dir}/test"/> - - <property name="deploy.dir" location="${nutch.root}/build/plugins/${name}"/> - - <!-- load nutch defaults last so that they can be overridden above --> - <property file="${nutch.root}/default.properties" /> - - <path id="plugin.deps"/> - - <fileset id="lib.jars" dir="${root}" includes="lib/*.jar"/> - - <!-- the normal classpath --> - <path id="classpath"> - <pathelement location="${build.classes}"/> - <fileset refid="lib.jars"/> - <pathelement location="${nutch.root}/build/classes"/> - <fileset dir="${nutch.root}/lib"> - <include name="*.jar" /> - </fileset> - <!-- This is the contrib/archive/lib directory --> - <fileset dir="../../../lib"> - <include name="*.jar" /> - </fileset> - <path refid="plugin.deps"/> - </path> - - <!-- the unit test classpath --> - <path id="test.classpath"> - <pathelement location="${build.test}" /> - <pathelement location="${nutch.root}/build/test/classes"/> - <pathelement location="${nutch.root}/src/test"/> - <pathelement location="${conf.dir}"/> - <pathelement location="${nutch.root}/build"/> - <path refid="classpath"/> - </path> - - <!-- ====================================================== --> - <!-- Stuff needed by all targets --> - <!-- ====================================================== --> - <target name="init"> - <mkdir dir="${build.dir}"/> - <mkdir dir="${build.classes}"/> - <mkdir dir="${build.test}"/> - - <antcall target="init-plugin"/> - </target> - - <!-- to be overridden by sub-projects --> - <target name="init-plugin"/> - - <!-- - ! Used to build plugin compilation dependencies - ! (to be overridden by plugins) - !--> - <target name="deps-jar"/> - - <!-- - ! Used to deploy plugin runtime dependencies - ! (to be overridden by plugins) - !--> - <target name="deps-test"/> - - <!-- ====================================================== --> - <!-- Compile the Java files --> - <!-- ====================================================== --> - <target name="compile" depends="init,deps-jar"> - <echo message="Compiling plugin: ${name}"/> - <javac - encoding="${build.encoding}" - srcdir="${src.dir}" - includes="**/*.java" - destdir="${build.classes}" - debug="${javac.debug}" - optimize="${javac.optimize}" - target="${javac.version}" - source="${javac.version}" - deprecation="${javac.deprecation}"> - <classpath refid="classpath"/> - </javac> - </target> - - <target name="compile-core"> - <ant target="compile-core" inheritall="false" dir="${nutch.root}"/> - <ant target="compile"/> - </target> - - <!-- ================================================================== --> - <!-- Make plugin .jar --> - <!-- ================================================================== --> - <!-- --> - <!-- ================================================================== --> - <target name="jar" depends="compile"> - <jar - jarfile="${build.dir}/${name}.jar" - basedir="${build.classes}" - /> - </target> - - <target name="jar-core" depends="compile-core"> - <jar - jarfile="${build.dir}/${name}.jar" - basedir="${build.classes}" - /> - </target> - - <!-- ================================================================== --> - <!-- Deploy plugin to ${deploy.dir} --> - <!-- ================================================================== --> - <!-- --> - <!-- ================================================================== --> - <target name="deploy" depends="jar, deps-test"> - <mkdir dir="${deploy.dir}"/> - <copy file="plugin.xml" todir="${deploy.dir}" - preservelastmodified="true"/> - <available property="lib-available" - file="${build.dir}/${name}.jar"/> - <antcall target="copy-generated-lib"/> - <copy todir="${deploy.dir}" flatten="true"> - <fileset refid="lib.jars"/> - </copy> - </target> - - <target name="copy-generated-lib" if="lib-available"> - <copy file="${build.dir}/${name}.jar" todir="${deploy.dir}" failonerror="false"/> - </target> - - <!-- ================================================================== --> - <!-- Compile test code --> - <!-- ================================================================== --> - <target name="compile-test" depends="compile" if="test.available"> - <javac - encoding="${build.encoding}" - srcdir="${src.test}" - includes="**/*.java" - destdir="${build.test}" - debug="${javac.debug}" - optimize="${javac.optimize}" - target="${javac.version}" - source="${javac.version}" - deprecation="${javac.deprecation}"> - <classpath refid="test.classpath"/> - </javac> - </target> - - <!-- ================================================================== --> - <!-- Run unit tests --> - <!-- ================================================================== --> - <target name="test" depends="compile-test, deploy" if="test.available"> - <echo message="Testing plugin: ${name}"/> - - <junit printsummary="yes" haltonfailure="no" fork="yes" - errorProperty="tests.failed" failureProperty="tests.failed"> - <sysproperty key="test.data" value="${build.test}/data"/> - <sysproperty key="test.input" value="${root}/data"/> - <classpath refid="test.classpath"/> - <formatter type="plain" /> - <batchtest todir="${build.test}" unless="testcase"> - <fileset dir="${src.test}" - includes="**/Test*.java" excludes="**/${test.exclude}.java" /> - </batchtest> - <batchtest todir="${build.test}" if="testcase"> - <fileset dir="${src.test}" includes="**/${testcase}.java"/> - </batchtest> - </junit> - - <fail if="tests.failed">Tests failed!</fail> - - </target> - - <!-- ================================================================== --> - <!-- Clean. Delete the build files, and their directories --> - <!-- ================================================================== --> - <target name="clean"> - <delete dir="${build.dir}"/> - <delete dir="${deploy.dir}"/> - </target> - -</project> Deleted: trunk/archive-access/projects/nutchwax/archive/src/plugin/build.xml =================================================================== --- trunk/archive-access/projects/nutchwax/archive/src/plugin/build.xml 2010-02-20 03:18:57 UTC (rev 2957) +++ trunk/archive-access/projects/nutchwax/archive/src/plugin/build.xml 2010-02-20 03:20:59 UTC (rev 2958) @@ -1,45 +0,0 @@ -<?xml version="1.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. ---> -<project name="nutchwax" default="deploy-core" basedir="."> - - <target name="deploy-core"> - <ant target="compile-core" inheritall="false" dir="../../../../"/> - <ant target="deploy"/> - </target> - - <!-- ====================================================== --> - <!-- Build & deploy all the plugin jars. --> - <!-- ====================================================== --> - <target name="deploy"> - <ant dir="index-nutchwax" target="deploy"/> - <ant dir="query-nutchwax" target="deploy"/> - <ant dir="urlfilter-nutchwax" target="deploy"/> - <ant dir="scoring-nutchwax" target="deploy"/> - </target> - - <!-- ====================================================== --> - <!-- Clean all of the plugins. --> - <!-- ====================================================== --> - <target name="clean"> - <ant dir="index-nutchwax" target="clean"/> - <ant dir="query-nutchwax" target="clean"/> - <ant dir="urlfilter-nutchwax" target="clean"/> - <ant dir="scoring-nutchwax" target="clean"/> - </target> - -</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |