ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36220] New: - <depend> task does not process "classpath"
Date Wed, 17 Aug 2005 10:41:02 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36220>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36220

           Summary: <depend> task does not process "classpath"
           Product: Ant
           Version: 1.6.5
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P1
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: yarick123@123mail.org


It does not process "classpathref" either.

I have 2 source trees - main sources and tests. I compile them to different
locations. So, my test classes depend on built before source classes.

When I touch java files in main tree and rebuild main tree, <depend> task for
test classes does not delete expired files.

One more. I looked at unit tests for <depend> task. Actually, there is no
correct test for testing of using "classpath" either "classpathref". The
existing one uses _the_same_path_ in attributes 'destdir' and 'classpathref' of
<depend> task (depend.xml):

      <path id="path.compile">
          <pathelement location="${classes.dir}"/>
      </path>
  [skipped]
      <depend srcdir="${tempsrc.dir}" destdir="${classes.dir}" 
              closure="yes" dump="yes"
              classpathref="path.compile"/>

So, the test is not correct.


Here it is the main part of my ant script:

	<macrodef name="compile">
		<attribute name="srcdir" />
		<attribute name="destdir"/>
		<attribute name="classpathref"/>
		<sequential>
			<mkdir dir="@{destdir}"/>

			<javac
				debug="true"
				srcdir="@{srcdir}"
				destdir="@{destdir}"
				classpathref="@{classpathref}"
				source="1.4"
				nowarn="on"
			/>
			<copy todir="@{destdir}" verbose="true">
				<fileset dir="@{srcdir}" casesensitive="yes" includes="**/*.properties"/>
			</copy>

		</sequential>
	</macrodef>
	<target name="simple_compile">
		<property name="lib.dir"     location="${basedir}/libs"       />
		<property name="src.dir"     location="${basedir}/src"        />
		<property name="tst.dir"     location="${basedir}/tst"        />
		<property name="out.dir"     location="${basedir}/OUTPUT"     />
		<property name="classes.dir" location="${out.dir}/javac/classes"    />
		<property name="classes.tst" location="${out.dir}/javac/classes.tst"/>

		<path id="compile.classpath">
			<fileset dir="${lib.dir}" includes="*.jar" />
		</path>

		<path id="tst.classpath">
			<path refid="compile.classpath"/>
			<fileset dir="${lib.dir}/tst" includes="*.jar" />
			<path location="${classes.dir}" />
		</path>
		
		<depend
			srcdir="${src.dir}"
			destdir="${classes.dir}"
			closure="yes"
		/>
		
		<compile srcdir="${src.dir}" destdir="${classes.dir}"
classpathref="compile.classpath" />
		
		<depend
			srcdir="${tst.dir}"
			destdir="${classes.tst}"
			closure="yes"
			classpath="${classes.dir}"
		/>
		
		<compile srcdir="${tst.dir}" destdir="${classes.tst}"
classpathref="tst.classpath"/>
	</target>

Regards,
Yaroslav Sokolov.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message