You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Hanasaki JiJi <ha...@hanaden.com> on 2002/06/30 17:49:52 UTC
Howto build a jar if the .class files exist and not fail if they
dont
Ok.. I know this may be a bit odd but, here is what I am trying to do.
Any help is appreciated
- if the jar file exists and there are no .class or .java files
- continue with the build
- if there are .class files and no .java files
- build/update the .jar if it needs to be built/updated
- continue with the build
- if there are .java files
- build/update the .class files
- build/update the .jar if it needs to be built/updated
- continue with the build
Thank you.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Howto build a jar if the .class files exist and not fail if they dont
Posted by Diane Holt <ho...@yahoo.com>.
--- Hanasaki JiJi <ha...@hanaden.com> wrote:
> - if the jar file exists and there are no .class or .java files
> - continue with the build
I believe the 'whenempty' attribute of <jar> will do just this.
> - if there are .class files and no .java files
> - build/update the .jar if it needs to be built/updated
> - continue with the build
>
> - if there are .java files
> - build/update the .class files
> - build/update the .jar if it needs to be built/updated
> - continue with the build
Have your "jar" target depend on your "compile" target.
Diane
=====
(holtdl@yahoo.com)
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>