Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 7588 invoked from network); 16 May 2006 13:44:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 May 2006 13:44:10 -0000 Received: (qmail 68936 invoked by uid 500); 16 May 2006 13:44:03 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 68896 invoked by uid 500); 16 May 2006 13:44:02 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 68885 invoked by uid 99); 16 May 2006 13:44:02 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 May 2006 06:44:02 -0700 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [203.84.221.139] (HELO web8907.mail.in.yahoo.com) (203.84.221.139) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 16 May 2006 06:44:01 -0700 Received: (qmail 63718 invoked by uid 60001); 16 May 2006 13:43:38 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=4eqJm5e/tOayhvb4KYQC6KP2nYXLgKEAbPoehR+GkH5Cxhx3bYENbr/uylOMOiyie25SNzU1a6tiwZa4WAr9tA6RSkZjVv8Us6X1w/Ypzlh+bOxLP85yUfJSe9o+EBOiPFhaiER17af5Q+F96g8rSzCjSNuDyNPan50lX2JmUVQ= ; Message-ID: <20060516134338.63716.qmail@web8907.mail.in.yahoo.com> Received: from [220.225.82.170] by web8907.mail.in.yahoo.com via HTTP; Tue, 16 May 2006 14:43:38 BST Date: Tue, 16 May 2006 14:43:38 +0100 (BST) From: subir bhaumik Subject: Taskdef To: user@ant.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-69452397-1147787018=:60744" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0-69452397-1147787018=:60744 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi While i am executing the following the method setClasspath of Taskdef getting NullPointerException, But the same method for Javac is O.K. Where i am wrong? My Code String base_dir = Host.getBuildTemp(); Project p = new Project(); p.setName("Building"); p.setDefault("installer") ; p.setBasedir("."); //org.apache.tools.ant.types.Reference compile_class_path = new org.apache.tools.ant.types.Reference(p,"compile_class_path"); org.apache.tools.ant.types.Path class_path = new org.apache.tools.ant.types.Path(p); org.apache.tools.ant.types.FileSet fs = new org.apache.tools.ant.types.FileSet(); File lib = new File(base_dir+"/"+"lib"); fs.setDir(lib); fs.setIncludes("*.jar"); class_path.addFileset(fs); org.apache.tools.ant.taskdefs.Taskdef tinstaller = new org.apache.tools.ant.taskdefs.Taskdef(); tinstaller.setProject(p); tinstaller.setTaskName("izpack"); String cp=class_path.toString(); System.out.println("File Addition"+cp); tinstaller.setClasspath(class_path); //NullPointerException System.out.println("File Test1"); tinstaller.setClassname("com.izforge.izpack.ant.IzPackTask"); System.out.println("File Addition"+cp); IzPackTask izpack = new IzPackTask(); System.out.println("File Test2"); izpack.setInput("D:/subir/install.xml"); izpack.setOutput("D:/subir/out.jar"); System.out.println("Test3"); izpack.setBasedir("."); Target installer = new Target(); installer.setName("installer"); installer.addTask(tinstaller); installer.addTask(izpack); //System.out.println(compile.toString()); p.addTarget(installer); DefaultLogger consoleLogger = new DefaultLogger(); consoleLogger.setErrorPrintStream(System.err); consoleLogger.setOutputPrintStream(System.out); consoleLogger.setMessageOutputLevel(Project.MSG_INFO); p.addBuildListener(consoleLogger); Warm Regards Subir --------------------------------- Why was V. Sehwag warned by the BCCI? Share your knowledge on Yahoo! Answers India Send instant messages to your online friends - NOW --0-69452397-1147787018=:60744--