[Carrot2-cvs] carrot2/components/inputs/adapter-nutch adapter-nutch.dep.xml,NONE,1.1 .classpath,1.1,
Brought to you by:
dawidweiss,
stachoo
From: <daw...@us...> - 2004-02-06 18:19:43
|
Update of /cvsroot/carrot2/carrot2/components/inputs/adapter-nutch In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4867/components/inputs/adapter-nutch Modified Files: .classpath build.xml Added Files: adapter-nutch.dep.xml Log Message: [new], component: global Added a new ANT task to manage JAR interdependencies in the project. Now you can easily collect all JARs that a component requires, plus only these JARs are use d at compile-time. Try using these targets on build files of components: 'ant show.dependencies' (shows all required components and JAR files), 'ant collect.dependencies' (copies the required JARs to the distribution.dir folder). [refactoring], component: global Build files have changed, so ANT1.6 is now a requirement. --- NEW FILE: adapter-nutch.dep.xml --- <!-- A dependency descriptor. This has to be updated manually when new JARs are required. --> <component name="adapter-nutch"> <dependency name="carrot2-shared-lib-only" /> </component> Index: .classpath =================================================================== RCS file: /cvsroot/carrot2/carrot2/components/inputs/adapter-nutch/.classpath,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .classpath 4 Feb 2004 20:32:14 -0000 1.1 --- .classpath 6 Feb 2004 18:16:25 -0000 1.2 *************** *** 5,8 **** --- 5,9 ---- <classpathentry kind="var" path="CARROT2_CVS/lib/compile-time-only/servlet.jar"/> <classpathentry kind="lib" path="lib/nutch-2003-11-17.jar"/> + <classpathentry kind="var" path="CARROT2_CVS/lib/carrot2-shared-lib.jar"/> <classpathentry kind="output" path="tmp/build/"/> </classpath> Index: build.xml =================================================================== RCS file: /cvsroot/carrot2/carrot2/components/inputs/adapter-nutch/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** build.xml 4 Feb 2004 20:32:14 -0000 1.1 --- build.xml 6 Feb 2004 18:16:25 -0000 1.2 *************** *** 21,38 **** <property name="javac.debug" value="on" /> - <!-- ## classpath for compiling classes ## --> - - <path id="carrot.shared.libs"> - <!-- all jars runtime/shared/lib --> - <fileset dir="${carrot2.cvs.dir}/lib"> - <include name="**/*.jar"/> - </fileset> - </path> - - <!-- ## project classpath ### --> - <path id="compile.classpath"> - <path refid="carrot.shared.libs" /> - </path> - <!-- ##################################### --> <!-- ### {{{ CLEAN ### --> --- 21,24 ---- *************** *** 63,67 **** </target> ! <target name="prepare" depends="check-nutch-available" if="cond:nutch.available"> <mkdir dir="${distribution.dir}" /> <mkdir dir="${build.dir}" /> --- 49,53 ---- </target> ! <target name="prepare" depends="check-nutch-available, generate.dependency.path" if="cond:nutch.available"> <mkdir dir="${distribution.dir}" /> <mkdir dir="${build.dir}" /> *************** *** 69,72 **** --- 55,106 ---- <!-- }}} --> + <!-- ##################################### --> + <!-- ### {{{ DEPENDENCY analysis ### --> + <!-- ##################################### --> + <property name="component.descriptor" location="adapter-nutch.dep.xml" /> + + <target name="define.dependency.task"> + <taskdef resource="com/dawidweiss/carrot/ant/dependencies.antlib.xml"> + <classpath location="${carrot2.cvs.dir}/lib/carrot2-shared-lib.jar" /> + </taskdef> + </target> + + <target name="generate.dependency.path" depends="define.dependency.task"> + <dependencylist + property="component.dep" + fileListId="component.dep.flist" + componentDescriptor="${component.descriptor}" + verbose="false" + > + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + <path id="classpath.dependencies"> + <filelist refid="component.dep.flist" /> + </path> + </target> + + <target name="show.dependencies" depends="define.dependency.task"> + <dependencylist componentDescriptor="${component.descriptor}" verbose="on"> + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + </target> + + <target name="collect.dependencies" depends="prepare"> + <dependencylist componentDescriptor="${component.descriptor}" verbose="on" + fileListId="component.dep.flist"> + <dependencies dir="${carrot2.cvs.dir}/lib"> + <include name="*.dep.xml" /> + </dependencies> + </dependencylist> + + <copyfilelist todir="${distribution.dir}"> + <filelist refid="component.dep.flist" /> + </copyfilelist> + </target> + <!-- }}} --> <!-- ##################################### --> *************** *** 85,89 **** <src path="${src.path}" /> <exclude name="**/*Test.java"/> ! <classpath refid="compile.classpath" /> <classpath> <fileset dir="lib" includes="**/*.jar" /> --- 119,124 ---- <src path="${src.path}" /> <exclude name="**/*Test.java"/> ! <classpath refid="classpath.dependencies" /> ! <classpath location="${carrot2.cvs.dir}/lib/compile-time-only/servlet.jar" /> <classpath> <fileset dir="lib" includes="**/*.jar" /> |