[forge-dev] Forge list command for resources jar/war/ear/zip

Adolfo Jr. adolfojunior at gmail.com
Sun Nov 18 14:19:49 EST 2012


Hi everyone,

I am a new Forge entusiast, it's a great project!
So decided to learn and help, i started to do some code.

I developed a plugin based in issue
https://issues.jboss.org/browse/FORGE-559

The implementation suggest a full list of entries in a zip archive.

[plugin-lszip] plugin-lszip.jar $ ls
META-INF/
META-INF/beans.xml
README.TXT
org/
org/jboss/
org/jboss/forge/
org/jboss/forge/dev/
org/jboss/forge/dev/zip/
org/jboss/forge/dev/zip/LsZipPlugin.class
org/jboss/forge/resources/
org/jboss/forge/resources/ZipEntryResource$ZipEntryInputStream.class
org/jboss/forge/resources/ZipEntryResource.class
org/jboss/forge/resources/ZipResource.class

Then i sent a pull to github: https://github.com/forge/core/pull/239

The code works fine for list command.
But in some other tests with "cat" command to read a ZipEntry content, and
"cd" command to change the current resource, the commands didn't work!

I realised that the name of entries contains slash and the PathspecParser
class split the name and navigate recursively.

I think that implementation like a DirectoryResource hierarquicali could
work fine. But will lose the full list of entries.

Some suggestion to resolve the behavior?

Thank you,
Adolfo Jr.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20121118/28e0bd04/attachment.html 


More information about the forge-dev mailing list