Bug 46812 - <tarfileset> no longer takes a fileset ref (regression)
Summary: <tarfileset> no longer takes a fileset ref (regression)
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-06 02:15 UTC by Steve Loughran
Modified: 2009-05-07 02:43 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Loughran 2009-03-06 02:15:49 UTC
This used to work:

  <target name="minimal-tar" depends="ready-to-package">
    <tar destFile="${minimal.tar}" longfile="gnu">
      <tarfileset prefix="${prefix}" refid="root.fileset" />
    </tar>
  </target>

Not on Ant SVN_HEAD

minimal-tar:
Class class org.apache.tools.ant.types.FileSet is not a subclass of class org.apache.tools.ant.taskdefs.Tar$TarFileSet

BUILD FAILED
/home/slo/Projects/SmartFrog/Forge/core/antbuild/build.xml:266: root.fileset doesn't denote a Tar$TarFileSet
	at org.apache.tools.ant.types.DataType.getCheckedRef(DataType.java:254)
	at org.apache.tools.ant.types.DataType.getCheckedRef(DataType.java:214)
	at org.apache.tools.ant.types.DataType.getCheckedRef(DataType.java:202)
	at org.apache.tools.ant.types.ArchiveFileSet.isFilesystemOnly(ArchiveFileSet.java:333)
	at org.apache.tools.ant.taskdefs.Tar.isFileFileSet(Tar.java:680)
	at org.apache.tools.ant.taskdefs.Tar.check(Tar.java:554)
	at org.apache.tools.ant.taskdefs.Tar.execute(Tar.java:269)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:386)
	at org.apache.tools.ant.Target.performTasks(Target.java:407)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1361)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1330)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1213)
	at org.apache.tools.ant.Main.runBuild(Main.java:775)
	at org.apache.tools.ant.Main.startAnt(Main.java:217)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Before, it let me tar up an existing fileset. Now I can't. This is a regression.
Comment 1 Steve Loughran 2009-03-09 05:27:30 UTC
<zipfileset> still works as expected -it takes a reference to the base fileset that <tarfileset> rejects, with prefix

    <zip compress="9" destFile="${full.zip}">
      <zipfileset prefix="${prefix}" refid="root.fileset" />
      <zipfileset prefix="${prefix}release" refid="release.fileset"  />
    </zip>
Comment 2 Steve Loughran 2009-03-09 07:46:11 UTC
Fixed this in SVN_HEAD -applied the fix to ArchiveFileSet as Zipfileset would exhibit the same problem -it is only due to differences in how <zip> and <tar> check files for being out of date that the problem shows up in one place and not the other.

added a new test, which now works.