[Carrot2-cvs] carrot2/components/carrot2-shared-lib carrot2-shared-lib.dep.xml,NONE,1.1 .classpath,1
Brought to you by:
dawidweiss,
stachoo
From: <daw...@us...> - 2004-02-06 18:19:37
|
Update of /cvsroot/carrot2/carrot2/components/carrot2-shared-lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4867/components/carrot2-shared-lib Modified Files: .classpath build.xml Added Files: carrot2-shared-lib.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: carrot2-shared-lib.dep.xml --- <!-- A dependency descriptor. This has to be updated manually when new JARs are required. --> <component name="carrot2-shared-lib"> <provides file="carrot2-shared-lib.jar" /> <dependency name="dweiss-utils" /> <dependency name="castor" /> <dependency name="jdom" /> <dependency name="put-utils" /> <dependency name="log4j" /> </component> Index: .classpath =================================================================== RCS file: /cvsroot/carrot2/carrot2/components/carrot2-shared-lib/.classpath,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** .classpath 19 Sep 2003 10:14:52 -0000 1.1.1.1 --- .classpath 6 Feb 2004 18:16:14 -0000 1.2 *************** *** 1,11 **** <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src-test"/> <classpathentry kind="src" path="tmp/build/src-xml-binding-generated"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="var" path="CARROT2_CVS/lib/commons-beanutils.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/commons-collections.jar"/> --- 1,8 ---- *************** *** 25,29 **** <classpathentry kind="var" path="CARROT2_CVS/lib/xml-apis.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/junit.jar"/> ! <classpathentry kind="output" path="tmp/build/classes"/> </classpath> --- 22,26 ---- <classpathentry kind="var" path="CARROT2_CVS/lib/xml-apis.jar"/> <classpathentry kind="var" path="CARROT2_CVS/lib/junit.jar"/> ! <classpathentry kind="var" path="ECLIPSE_HOME/plugins/org.apache.ant_1.5.3/ant.jar"/> <classpathentry kind="output" path="tmp/build/classes"/> </classpath> Index: build.xml =================================================================== RCS file: /cvsroot/carrot2/carrot2/components/carrot2-shared-lib/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** build.xml 23 Nov 2003 23:37:53 -0000 1.3 --- build.xml 6 Feb 2004 18:16:14 -0000 1.4 *************** *** 15,32 **** <property name="lib.name" value="carrot2-shared-lib.jar" /> - <!-- ## classpath for compiling classes ## --> - <path id="carrot.shared.libs"> - <!-- all jars runtime/shared/lib --> - <fileset dir="${carrot2.cvs.dir}/lib"> - <include name="**/*.jar"/> - <exclude name="**/${lib.name}" /> - </fileset> - </path> - <!-- ##################################### --> <!-- ### {{{ PREPARE directories ### --> <!-- ##################################### --> ! <target name="prepare" description="Prepare build directories."> <mkdir dir="${build.dir}/classes" /> <mkdir dir="${build.dir}/src-xml-binding-generated" /> --- 15,24 ---- <property name="lib.name" value="carrot2-shared-lib.jar" /> <!-- ##################################### --> <!-- ### {{{ PREPARE directories ### --> <!-- ##################################### --> ! <target name="prepare" description="Prepare build directories." ! depends="compile.ant.tasks, generate.dependency.path"> <mkdir dir="${build.dir}/classes" /> <mkdir dir="${build.dir}/src-xml-binding-generated" /> *************** *** 55,59 **** <java classname="org.exolab.castor.builder.SourceGenerator" ! classpathref="carrot.shared.libs" failonerror="true" fork="true"> <arg value="-i" /><arg file="${carrot2.cvs.dir}/schema/component-descriptor.xsd"/> <arg value="-dest"/><arg file="${build.dir}/src-xml-binding-generated" /> --- 47,51 ---- <java classname="org.exolab.castor.builder.SourceGenerator" ! classpathref="classpath.dependencies" failonerror="true" fork="true"> <arg value="-i" /><arg file="${carrot2.cvs.dir}/schema/component-descriptor.xsd"/> <arg value="-dest"/><arg file="${build.dir}/src-xml-binding-generated" /> *************** *** 63,67 **** <java classname="org.exolab.castor.builder.SourceGenerator" ! classpathref="carrot.shared.libs" failonerror="true" fork="true"> <arg value="-i" /><arg file="${carrot2.cvs.dir}/schema/mime-types/x-carrot-clustering-input-query.xsd"/> <arg value="-dest"/><arg file="${build.dir}/src-xml-binding-generated" /> --- 55,59 ---- <java classname="org.exolab.castor.builder.SourceGenerator" ! classpathref="classpath.dependencies" failonerror="true" fork="true"> <arg value="-i" /><arg file="${carrot2.cvs.dir}/schema/mime-types/x-carrot-clustering-input-query.xsd"/> <arg value="-dest"/><arg file="${build.dir}/src-xml-binding-generated" /> *************** *** 71,75 **** <java classname="org.exolab.castor.builder.SourceGenerator" ! classpathref="carrot.shared.libs" failonerror="true" fork="true"> <arg value="-i" /><arg file="${carrot2.cvs.dir}/schema/process-descriptor.xsd"/> <arg value="-dest"/><arg file="${build.dir}/src-xml-binding-generated" /> --- 63,67 ---- <java classname="org.exolab.castor.builder.SourceGenerator" ! classpathref="classpath.dependencies" failonerror="true" fork="true"> <arg value="-i" /><arg file="${carrot2.cvs.dir}/schema/process-descriptor.xsd"/> <arg value="-dest"/><arg file="${build.dir}/src-xml-binding-generated" /> *************** *** 77,102 **** <arg value="-binding-file"/><arg file="xml-binding/process-descriptor-binding.xml" /> </java> - </target> <!-- }}} --> <!-- ##################################### --> <!-- ### {{{ COMPILE project ### --> <!-- ##################################### --> ! <target name="compile" depends="prepare, xmlbinding" description="Compiles all Java classes."> ! <javac destdir="${build.dir}/classes" failonerror="true" ! includeantruntime="false" includejavaruntime="false" - classpathref="carrot.shared.libs" debug="true" optimize="false" > ! <src path="src" /> ! <src path="${build.dir}/src-xml-binding-generated" /> </javac> ! <!-- copy any non-java files (resources) from the source path. --> <copy toDir="${build.dir}/classes"> --- 69,153 ---- <arg value="-binding-file"/><arg file="xml-binding/process-descriptor-binding.xml" /> </java> </target> <!-- }}} --> <!-- ##################################### --> + <!-- ### {{{ DEPENDENCY analysis ### --> + <!-- ##################################### --> + <property name="component.descriptor" location="carrot2-shared-lib.dep.xml" /> + + <target name="define.dependency.task"> + <taskdef resource="com/dawidweiss/carrot/ant/dependencies.antlib.xml"> + <classpath location="${build.dir}/classes" /> + </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> + <!-- }}} --> + + <!-- ##################################### --> <!-- ### {{{ COMPILE project ### --> <!-- ##################################### --> ! <target name="compile.ant.tasks"> ! <mkdir dir="${build.dir}/classes" /> ! <!-- copy any non-java files (resources) from the source path. --> ! <copy toDir="${build.dir}/classes"> ! <fileset dir="src"> ! <include name="com/dawidweiss/carrot/ant/**/*.*" /> ! <exclude name="**/*.java"/> ! </fileset> ! </copy> ! <!-- Compile ANT tasks first. --> ! <javac destdir="${build.dir}/classes" failonerror="true" ! includeantruntime="true" includejavaruntime="false" debug="true" optimize="false" + srcdir="src" + deprecation="true" > ! <include name="com/dawidweiss/carrot/ant/*.java" /> </javac> ! </target> ! ! <target name="compile" depends="prepare, xmlbinding" description="Compiles all Java classes."> <!-- copy any non-java files (resources) from the source path. --> <copy toDir="${build.dir}/classes"> *************** *** 104,112 **** <exclude name="**/*.java"/> </fileset> - <fileset dir="${build.dir}/classes"> - <include name="**/*.properties" /> - </fileset> </copy> </target> <!-- }}} --> --- 155,177 ---- <exclude name="**/*.java"/> </fileset> </copy> + <javac + destdir="${build.dir}/classes" + failonerror="true" + includeantruntime="false" + includejavaruntime="false" + debug="true" + optimize="false" + > + <classpath refid="classpath.dependencies" /> + <classpath> + <fileset dir="${carrot2.cvs.dir}/lib" includes="compile-time-only/servlet.jar" /> + </classpath> + <src path="src" /> + <src path="${build.dir}/src-xml-binding-generated" /> + <exclude name="com/dawidweiss/carrot/ant/*.java" /> + </javac> + </target> <!-- }}} --> *************** *** 154,158 **** <!-- ##################################### --> ! <target name="javadoc" depends="compile" description="Builds a JAR and copies it to the runtime environment."> <delete dir="${javadoc.dir}" failonerror="false" /> --- 219,223 ---- <!-- ##################################### --> ! <target name="javadoc" depends="prepare" description="Builds a JAR and copies it to the runtime environment."> <delete dir="${javadoc.dir}" failonerror="false" /> *************** *** 161,165 **** <javadoc packagenames = "com.dawidweiss.carrot.*" destdir = "${javadoc.dir}" - classpathref = "carrot.shared.libs" public = "true" version = "false" --- 226,229 ---- *************** *** 172,177 **** stylesheetfile = "${carrot2.cvs.dir}/misc/javadoc/stylesheet.css" > ! <sourcepath path="src"/> <sourcepath path="${build.dir}/src-xml-binding-generated" /> </javadoc> </target> --- 236,246 ---- stylesheetfile = "${carrot2.cvs.dir}/misc/javadoc/stylesheet.css" > ! <classpath refid="classpath.dependencies" /> ! <classpath> ! <fileset dir="${carrot2.cvs.dir}/lib" includes="compile-time-only/servlet.jar" /> ! </classpath> ! <sourcepath path="src" /> <sourcepath path="${build.dir}/src-xml-binding-generated" /> + <excludepackage name="com.dawidweiss.carrot.ant" /> </javadoc> </target> |