Re: Parse jar:file prefix to Resource

Antoine Levy Lambert <[email protected]>
Newsgroups gmane.comp.jakarta.ant.user
Message-ID <[email protected]>
Hello Matt,

The ZipFileSet type is something that you can use.


if you put in your custom task something like void addZipFileSet(ZipFileSet zfs) {
}

this will match with your custom task looking like 
<mycustomtask>
    <zipfileset src=“some/foo/bar.jar”>
        <include name=“foo/baz/*.class”/>
    </zipfileset>
   <!— possibly add several zip filesets —>
</mycustomtask>
  
You can also download the sources of Ant to see how Ant is written and piggyback on that.


Hope this helps,

Antoine

> 
> 
> ______________________________________________ 
> 
> 
> 
>> Date: Wed, 17 Dec 2014 23:18:21 -0500
>> Subject: Parse jar:file prefix to Resource
>> From: [email protected]
>> To: [email protected]
>> 
>> Hi,
>> 
>> I am writing some custom ant tasks and I want to support files inside of
>> zip/jar files. I have noticed that some ant tasks use the
>> jar:file:/path/to/a.jar!/path/in/jar/file.xml syntax but I can't seem to
>> get it work. How do I use this pattern in my tasks and map them to a
>> Resource object like FileResource, URLResource, etc. Thanks.
>> 
>> Matt Bertolini
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.