aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Unable to create the tar file in the dist directory. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Unable to create the tar file in the dist directory." Watch "Unable to create the tar file in the dist directory." New topic
Author

Unable to create the tar file in the dist directory.

Sumit Ranjan
Greenhorn

Joined: Dec 20, 2005
Posts: 24
Hi, I want to use ANT to interact with Subversion(It is the configuration management software we are using). I want to get the latest source files from Subversion and then compile the source code and create a tar file that I want to keep in a folder called dist.

I am able to compile all the code and put the class files in the build directory but when I try to tar the class files and put it into dist folder it says -
compress:
[tar] Nothing to do: D:\PTCS_PRISM\trunk\dist\Prism.tar.gz is up to date.

Now, when I check the dist folder, I cant find any tar file there. So, I am a bit confused as to why it gives this output and why I am not able to create the tar file in the required folder.

The part of my build.xml for performing this task looks like this -

<target name="update"
depends="prepare"
description="update from subversion">
<echo message="update src directory"/>
<svn>
<update dir="${src.dir}"
revision="${svn.revision}"/>
</svn>
</target>

<target name="compile"
depends="prepare"
description="Build all the source files for the Prism Project">
<javac srcdir="${src.dir}"
destdir="${build.dir}"
compiler="modern"
source="1.5"
deprecation="on">
<classpath>
<path refid="ant.classpath"/>
<path refid="project.classpath"/>
</classpath>
</javac>
</target>

<target name="compress"
depends="prepare,compile"
description="Create the project's tar file">
<tar
destfile = "${dist.dir}/Prism.tar.gz"
basedir = "${build.dir}"
includes = "*.class"
compression = "gzip" />
</target>

Can anyone help me in this regard?
Sumit Ranjan
Greenhorn

Joined: Dec 20, 2005
Posts: 24
I just modified the includes attribute of tar as shown below and it worked !!!

<target name="compress"
depends="prepare,compile"
description="Create the project's tar file">
<tar
destfile = "${dist.dir}/Prism.tar.gz"
basedir = "${build.dir}"
includes = "**/*.class"compression = "gzip" />
</target>

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to create the tar file in the dist directory.