Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 82233 invoked from network); 5 Nov 2008 17:16:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Nov 2008 17:16:57 -0000 Received: (qmail 31798 invoked by uid 500); 5 Nov 2008 17:16:59 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 31767 invoked by uid 500); 5 Nov 2008 17:16:59 -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 31756 invoked by uid 99); 5 Nov 2008 17:16:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Nov 2008 09:16:59 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of daniele.dml@googlemail.com designates 209.85.162.176 as permitted sender) Received: from [209.85.162.176] (HELO el-out-1112.google.com) (209.85.162.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Nov 2008 17:15:39 +0000 Received: by el-out-1112.google.com with SMTP id z25so75712ele.7 for ; Wed, 05 Nov 2008 09:16:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=iihXMTfJK9pvhzFuFUWykagCOAjOoXJzPd/a6w3ooxY=; b=ZRMsUSQXsLz/fksa57eDViJNKCB2CK6asxIU2aQe6Stx/XO5BKJK0DesL/RJBPwZh5 6jp3+6YgmadUaPtbjWHgzbUsyCEXIJywUvMmfP0WLz70m8UiSJ22nVjaJcPXJdVCOoyF qUGfR9wXAsIdyaKXxARIm1nvbCNUiAGpza/mk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=JPL6QNuXdzPMifcyf5b49Az1wA571v2npCLFhG/MfDvBya7+C6HhZHn5zKx2C/qLSn t4lIUNOZ7k9u5LwmhlW/HJSQ/iKcdh+xZGyjA1fHuknT/6R2U+4I8gnt39Zh5wfA1ama M0IpipQ9cVQPLvl3tT1wgk/yxa8Virv97bkhE= Received: by 10.90.120.14 with SMTP id s14mr891858agc.20.1225905379824; Wed, 05 Nov 2008 09:16:19 -0800 (PST) Received: by 10.90.106.17 with HTTP; Wed, 5 Nov 2008 09:16:19 -0800 (PST) Message-ID: <190e13280811050916g347a3felfeba728ab2dc336f@mail.gmail.com> Date: Wed, 5 Nov 2008 17:16:19 +0000 From: "Daniele Development-ML" To: "Ant Users List" Subject: Using Ant Tasks programmatically - SignJar Tasl MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_27230_3958955.1225905379819" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_27230_3958955.1225905379819 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello everybody: I am trying to use Ant Task programmatically by invoking the API within my Java code. I get an exception, but everything appears to be fine to my eyes - I indeed set all the compulsory attributes of the SignJar task. Probably somebody else here has a good suggestion or the solution. Thanks in advance! Dan ---------------------------- My code is: String sigFile = Paths.SIG_FILE_PATH; SignJar sj = new SignJar(); sj.setAlias("myDep"); sj.setStorepass("aPassword"); sj.setJar(new File(fileName)); sj.setSigfile(sigFile); sj.execute(); The exception I get is: Exception in thread "main" java.lang.NullPointerException at org.apache.tools.ant.types.AbstractFileSet.setupDirectoryScanner(AbstractFileSet.java:477) at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:442) at org.apache.tools.ant.types.FileSet.iterator(FileSet.java:69) at org.apache.tools.ant.types.resources.Union.getCollection(Union.java:110) at org.apache.tools.ant.types.resources.Union.getCollection(Union.java:90) at org.apache.tools.ant.types.resources.BaseResourceCollectionContainer.cacheCollection(BaseResourceCollectionContainer.java:250) at org.apache.tools.ant.types.resources.BaseResourceCollectionContainer.iterator(BaseResourceCollectionContainer.java:126) at org.apache.tools.ant.types.Path.iterator(Path.java:693) at org.apache.tools.ant.taskdefs.SignJar.execute(SignJar.java:321) ------=_Part_27230_3958955.1225905379819--