You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Gene Margolin <gm...@futuresource.com> on 2000/08/29 19:10:12 UTC

delete file

When I  use task <delete file="path/filename"> in my build file I have a
NullPointerException.
The path and file name are correct. If I use <deltree dir="path/filename">, then
it works OK.
Is there some problem in ant?

Gene Margolin.


how to call MS SignCode from ant?

Posted by Gene Margolin <gm...@futuresource.com>.
To finish our building process (WinNT 4 SP5) for our java projects
we need to create and sign jar-files (for Netscape) and cab-files (for MS IE).
I can call Netscape signing tools doing this stuff both from the build file
and from a bat-file without any problem. We have passwords both for
Netscape and IE certificates. This password can be passed to
Netscape signing tools as a parameter in the command line.
Unfortunately, I cannot find the possibility to pass the password
to MS signing tool SignCode (from Win SDK). The only way is
to type that password inside the SignCode dialog window. Of course,
it's impossible (or difficult ) to do it from ant or even from a bat-file.
Anyway, I don't want to use some hack.
Could you give me an advice what should I do?

Thanks.

Gene.



Re: build depending on dependencies

Posted by Peter Donald <do...@mad.scientist.com>.
At 09:04  31/8/00 -0500, you wrote:
>Is it possible in ant to compile only those java-files on which
>some specific file or package depends (e.g. as JBuilder does )?
>Recursive compiling of all packages significantly increases
>the size of products.

umm - well that sorta does happen. The problem is that some compilers are
broken (javac). Even the un-broken compiler jikes on full dependancy checks
doesn't check all dependancies. Code that is optimized out completely 

ie.
if( !Blah.VAR )
{
  ///do something
}

where Blah.VAR is a static final variable defined as false

will not be taken into account for dependancy checks - other than a few
other rare circumstances that should do it.

Make sure you put the following things in build file

  <property name="build.compiler" value="jikes"/>
  <property name="build.compiler.emacs" value="on"/>
  <property name="build.compiler.warnings" value="true"/>
  <property name="build.compiler.pedantic" value="true"/>
  <property name="build.compiler.depend" value="true"/>


Make sure you get jikes =) and also make sure your package structure
matches directory structure.

ie so if your source directory is "src/" and you have a class in package
"com.biz" then it should be in directory "src/com/biz". If you do all of
that and are still having issues - email back and I will see what else
needs doing :P



Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*

build depending on dependencies

Posted by Gene Margolin <gm...@futuresource.com>.
Is it possible in ant to compile only those java-files on which
some specific file or package depends (e.g. as JBuilder does )?
Recursive compiling of all packages significantly increases
the size of products.

Gene.


Re: delete file

Posted by Gene Margolin <gm...@futuresource.com>.
My ant does not understand -version option.
So, I think, It's of a very old version :).
Where can I get the last one?

Conor MacNeill wrote:

> Gene,
>
> What version of ant are you running?
>
> Can you do an ant -version
> and then
> ant -verbose
>
> Cheers
> Conor
>
> > -----Original Message-----
> > From: Gene Margolin [mailto:gmargolin@futuresource.com]
> > Sent: Thursday, 31 August 2000 1:09
> > To: ant-user@jakarta.apache.org
> > Subject: Re: delete file
> >
> >
> > The stack trace:
> > BUILD CONFIG ERROR:
> > Could not create task of type:
> > delete due to java.lang.NullPointerException
> > org.apache.tools.ant.BuildException:
> > Could not create task of type:
> > delete due to java.lang.NullPointerException
> > at org.apache.tools.ant.Project.createTask<Project.java 344>
> >
> > Conor MacNeill wrote:
> >
> > > Gene,
> > >
> > > Works for me with release 1.1 and the latest version of ant.
> > Can you give us
> > > the stack trace from the null pointer exception?
> > >
> > > Conor
> > >
> > > > -----Original Message-----
> > > > From: Gene Margolin [mailto:gmargolin@futuresource.com]
> > > > Sent: Wednesday, 30 August 2000 4:10
> > > > To: ant-user@jakarta.apache.org
> > > > Subject: delete file
> > > >
> > > >
> > > > When I  use task <delete file="path/filename"> in my build
> > file I have a
> > > > NullPointerException.
> > > > The path and file name are correct. If I use <deltree
> > > > dir="path/filename">, then
> > > > it works OK.
> > > > Is there some problem in ant?
> > > >
> > > > Gene Margolin.
> > > >
> >
> >


RE: delete file

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Gene,

What version of ant are you running?

Can you do an ant -version
and then 
ant -verbose

Cheers
Conor


> -----Original Message-----
> From: Gene Margolin [mailto:gmargolin@futuresource.com]
> Sent: Thursday, 31 August 2000 1:09
> To: ant-user@jakarta.apache.org
> Subject: Re: delete file
> 
> 
> The stack trace:
> BUILD CONFIG ERROR:
> Could not create task of type:
> delete due to java.lang.NullPointerException
> org.apache.tools.ant.BuildException:
> Could not create task of type:
> delete due to java.lang.NullPointerException
> at org.apache.tools.ant.Project.createTask<Project.java 344>
> 
> Conor MacNeill wrote:
> 
> > Gene,
> >
> > Works for me with release 1.1 and the latest version of ant. 
> Can you give us
> > the stack trace from the null pointer exception?
> >
> > Conor
> >
> > > -----Original Message-----
> > > From: Gene Margolin [mailto:gmargolin@futuresource.com]
> > > Sent: Wednesday, 30 August 2000 4:10
> > > To: ant-user@jakarta.apache.org
> > > Subject: delete file
> > >
> > >
> > > When I  use task <delete file="path/filename"> in my build 
> file I have a
> > > NullPointerException.
> > > The path and file name are correct. If I use <deltree
> > > dir="path/filename">, then
> > > it works OK.
> > > Is there some problem in ant?
> > >
> > > Gene Margolin.
> > >
> 
> 

Re: delete file

Posted by Gene Margolin <gm...@futuresource.com>.
The stack trace:
BUILD CONFIG ERROR:
Could not create task of type:
delete due to java.lang.NullPointerException
org.apache.tools.ant.BuildException:
Could not create task of type:
delete due to java.lang.NullPointerException
at org.apache.tools.ant.Project.createTask<Project.java 344>

Conor MacNeill wrote:

> Gene,
>
> Works for me with release 1.1 and the latest version of ant. Can you give us
> the stack trace from the null pointer exception?
>
> Conor
>
> > -----Original Message-----
> > From: Gene Margolin [mailto:gmargolin@futuresource.com]
> > Sent: Wednesday, 30 August 2000 4:10
> > To: ant-user@jakarta.apache.org
> > Subject: delete file
> >
> >
> > When I  use task <delete file="path/filename"> in my build file I have a
> > NullPointerException.
> > The path and file name are correct. If I use <deltree
> > dir="path/filename">, then
> > it works OK.
> > Is there some problem in ant?
> >
> > Gene Margolin.
> >


RE: delete file

Posted by Conor MacNeill <co...@m64.com>.
Gene,

Works for me with release 1.1 and the latest version of ant. Can you give us
the stack trace from the null pointer exception?

Conor

> -----Original Message-----
> From: Gene Margolin [mailto:gmargolin@futuresource.com]
> Sent: Wednesday, 30 August 2000 4:10
> To: ant-user@jakarta.apache.org
> Subject: delete file
>
>
> When I  use task <delete file="path/filename"> in my build file I have a
> NullPointerException.
> The path and file name are correct. If I use <deltree
> dir="path/filename">, then
> it works OK.
> Is there some problem in ant?
>
> Gene Margolin.
>