Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Build successful but nothing produced

Build successful but nothing produced

2006-10-20       - By EJ Ciramella
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

You have this entry in the dist target:

<property name="dist"  location="classes"/>

and

<jar jarfile="${dist}/MyProject.jar" basedir="${build}"/>

Typically, the jar should only contain the resources it needs.  What
you're doing here is putting the jar (the result from the dist target)
into the classes directory.  You can't jar/tar/war/ear/zip a directory
AND have the resulting archive created in that same location.

Most builds have a build directory associated with them.  So src would
get compiled into classes (so src/com/package/foo.java would wind up in
classes/com/package/foo.class).  Similarly, the "build" directory would
contain the results of the artifact build up (your jar and maybe a tar
containing scripts needed to run your classes in their jarred format).

-----Original Message-----
From: Tom Corcoran [mailto:Tom.Corcoran@(protected)]
Sent: Friday, October 20, 2006 1:19 PM
To: Ant Users List
Subject: RE: Build successful but nothing produced

Thanks, really appreciate the help. The only user is myself. After your
previous mail I had just seen the dist option. Perhaps the help on the
project tag could be expanded to included the compile/dist options. "the
default target to use when no target is supplied. " does not mean a lot
to the likes of this newbie.

Using the dist option is does create the jar! Conversely to before when
it set build successful it now says build failed :-) Build.xml:27 A zip
file cannot include itself.

http://ant.apache.org/manual/tasksoverview.html#file does not tell me
about saving to a file but I'll keep at it.

-----Original Message-----
From: EJ Ciramella [mailto:ejciramella@(protected)]
Sent: 20 October 2006 18:08
To: Ant Users List
Subject: RE: Build successful but nothing produced

If you wanted to have the jar built up, you'd need to run the "dist"
target (looking at your build file).

In my experience, this should be the default target, if your users want
to do anything less, they can run the individual targets.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.