Re: project.createTask() not working with ant-1.8.2

2011-02-17 Thread Mohan
>> If your really really really want to use "new Project()" you should make sure it gets initialized properly by invoking the init() method on your new instance before you call createTask. This suggestion worked for us. Thanks Stefan for the quick response!! -- View this message in context: ht

Re: project.createTask() not working with ant-1.8.2

2011-02-15 Thread Stefan Bodewig
[Pulling together a few responses] On 2011-02-15, Mohan wrote: > I'm not using any wrapper script for ant invocation. I'm invoking the > ant script directly from Ant-1.8.2/bin/ant as shown in the second > update. "the ant script directly from Ant-1.8.2/bin/ant" is the wrapper script I was talkin

Re: project.createTask() not working with ant-1.8.2

2011-02-15 Thread Vimil Saju
> Just to clarify, if I use getProject(), I'm not getting an > error.  But I > would like to create a new Project in the Obfuscate's > execute method where I > want to run my tasks. > > Is there no way to create a new Project and run the tasks > that I want? It s not advisable to create a new p

Re: project.createTask() not working with ant-1.8.2

2011-02-15 Thread Mohan
Just to clarify, if I use getProject(), I'm not getting an error. But I would like to create a new Project in the Obfuscate's execute method where I want to run my tasks. Is there no way to create a new Project and run the tasks that I want? Thanks, Mohan. -- View this message in context: htt

Re: project.createTask() not working with ant-1.8.2

2011-02-15 Thread Mohan
Stefan, Are you able to reproduce the issue using the code snippet provided? Thanks, Mohan. -- View this message in context: http://ant.1045680.n5.nabble.com/project-createTask-not-working-with-ant-1-8-2-tp3385716p3386125.html Sent from the Ant - Users mailing list archive at Nabble.com. ---

Re: project.createTask() not working with ant-1.8.2

2011-02-15 Thread bool
>> You shouldn't create a new Project object Is there any reason? It was working perfectly fine with 1.7.1 version -- View this message in context: http://ant.1045680.n5.nabble.com/project-createTask-not-working-with-ant-1-8-2-tp3385716p3386108.html Sent from the Ant - Users mailing list archiv

Re: project.createTask() not working with ant-1.8.2

2011-02-15 Thread Vimil Saju
>     /** >      * Executes the desObfuscate task. >      */ >     @Override >     public void execute() throws BuildException >     { >         myProject = new Project(); > >         // Create ANT tasks >         Task delete = (Delete) > myProject.createTask(DELETE_TASK); > >     } > } You shou

Re: project.createTask() not working with ant-1.8.2

2011-02-15 Thread Mohan
I'm also attaching the stack trace of the error produced by the "-v" option, if it helps :) $> /prod/tools/infra/apache/ant-1.8.2/bin/ant compile -v Apache Ant(TM) version 1.8.2 compiled on December 20 2010 Trying the default build file: build.xml Buildfile: /u/chittelk/build.xml Detected Java ve

Re: project.createTask() not working with ant-1.8.2

2011-02-15 Thread bool
Also we see failures when we donot have "force" attribute set for overriding read only files. So we should be using 1.8.2 version only right as this feature is present only in this version.??? -- View this message in context: http://ant.1045680.n5.nabble.com/project-createTask-not-working-wi

Re: project.createTask() not working with ant-1.8.2

2011-02-15 Thread Mohan
>> One thing to look out for apart from the obvious CLASSPATH environment variable, ${ANT_HOME}/lib and ~/.ant/lib is the shell script you use to launch Ant (I assume a Unix like system from ant.jar's path in your error message). * I do not have the CLASSPATH variable set. I also do not have th

Re: project.createTask() not working with ant-1.8.2

2011-02-15 Thread Stefan Bodewig
On 2011-02-15, bool wrote: > createTask() method is throwing the following error with ant-1.8.2 while it > works perfectly with Ant 1.7.1. > import org.apache.tools.ant.taskdefs.Delete; > Delete delete = (Delete) myProject.createTask("Delete"); > jar:file:/myant/ant-1.8.2/lib/ant.jar!/org/apache

Re: project.createTask() not working with ant-1.8.2

2011-02-15 Thread Mohan
I'm attaching a sample code to reproduce the issue mentioned above. Could you please suggest a solution for this issue: The build.xml file : Build file ${ant.version} === Java

project.createTask() not working with ant-1.8.2

2011-02-15 Thread bool
createTask() method is throwing the following error with ant-1.8.2 while it works perfectly with Ant 1.7.1. import org.apache.tools.ant.taskdefs.Delete; Delete delete = (Delete) myProject.createTask("Delete"); jar:file:/myant/ant-1.8.2/lib/ant.jar!/org/apache/tools/ant/antlib.xml:37: Problem: