You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Asankha C. Perera" <as...@wso2.com> on 2007/08/24 06:06:04 UTC

[VFS] Writing to Jar, Zip, Tar..

I am a committer of the Apache Synapse project and we are using VFS to 
build a file transport through Apache Axis2. However, it seems like we 
cannot 'write' to or create new Jar, Zip files through VFS.. is this a 
current limitation?

If so, is anyone currently working on this to provide write support as 
well? In the ZipFileSystem class, some lines are commented and I was 
wondering if someone already has done some work on this - but haven't 
yet exposed this over the public API?

public ZipFileSystem(final FileName rootName,
                         final FileObject parentLayer,
                         final FileSystemOptions fileSystemOptions)
        throws FileSystemException
    {
        super(rootName, parentLayer, fileSystemOptions);
        ...
*        //zipFile = createZipFile(this.file);*
    }


I am not familiar with the VFS code, but if its not a too difficult task 
I would like to see if I can be of any help here if no one is working on 
this support right now

thanks
asankha

Re: [VFS] Writing to Jar, Zip, Tar..

Posted by Torsten Curdt <tc...@apache.org>.
On 25.08.2007, at 15:21, Chr. Grobmeier wrote:

>>> In fact, i compared the TrueZip implementation to Compress  
>>> yesterday.
>>> We have quite less features and on some points in the code we depend
>>> on java.util.zip packages.
>>
>> Why is using java.uil.zip bad?
>
> In some discussion in here people said that they wanted implementation
> which is independent from java.util.zip. If that isn't the goal, than
> things will be easier.

Ideally we could have two providers.

>> API design should be the first concern at this stage IMO. Everything
>> else will follow - I am sure.
>
> OK. We had lots of discussions in the past about this. I made lots  
> of proposals
> and thought about lots of comments in here. Now i feel a bit like at
> the beginning.
> I will digg into the code again and try to draw something or similar
> so yo can get
> an overview about whats going on with compress without diving deep
> into the code.
> That will make discussions  easier.

I'll try to look into that again, too

cheers
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [VFS] Writing to Jar, Zip, Tar..

Posted by "Chr. Grobmeier" <gr...@possessed.de>.
> > In fact, i compared the TrueZip implementation to Compress yesterday.
> > We have quite less features and on some points in the code we depend
> > on java.util.zip packages.
>
> Why is using java.uil.zip bad?

In some discussion in here people said that they wanted implementation
which is independent from java.util.zip. If that isn't the goal, than
things will be easier.

> API design should be the first concern at this stage IMO. Everything
> else will follow - I am sure.

OK. We had lots of discussions in the past about this. I made lots of proposals
and thought about lots of comments in here. Now i feel a bit like at
the beginning.
I will digg into the code again and try to draw something or similar
so yo can get
an overview about whats going on with compress without diving deep
into the code.
That will make discussions  easier.

Chris

>
> cheers
> --
> Torsten
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [VFS] Writing to Jar, Zip, Tar..

Posted by Torsten Curdt <tc...@apache.org>.
>> ...but it would be still a bit of work. When I was
>> trying to add a new archiver implementation I was frustrated with
>> some of the details of the current API
>
> I remember. Can you be more concrete? Maybe i can add some  
> improvements here.

Uff ...would love to help but this has already been a while. I'll try  
to look into it again.

> In fact, i compared the TrueZip implementation to Compress yesterday.
> We have quite less features and on some points in the code we depend
> on java.util.zip packages.

Why is using java.uil.zip bad?

> Additionally i really don't like the coding style in f.e. the
> zip-implementation. I would like to simplify that and make it more
> readable.
>
> Assuming we can realize your comments to the API, improving codestyle
> and documentation, would this be enough to release this component?

API design should be the first concern at this stage IMO. Everything  
else will follow - I am sure.

cheers
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [VFS] Writing to Jar, Zip, Tar..

Posted by "Chr. Grobmeier" <gr...@possessed.de>.
> That's not true :)

hehe ok sorry then :-)

>...but it would be still a bit of work. When I was
> trying to add a new archiver implementation I was frustrated with
> some of the details of the current API

I remember. Can you be more concrete? Maybe i can add some improvements here.

In fact, i compared the TrueZip implementation to Compress yesterday.
We have quite less features and on some points in the code we depend
on java.util.zip packages.
Additionally i really don't like the coding style in f.e. the
zip-implementation. I would like to simplify that and make it more
readable.

Assuming we can realize your comments to the API, improving codestyle
and documentation, would this be enough to release this component?

Chris




> cheers
> --
> Torsten
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [VFS] Writing to Jar, Zip, Tar..

Posted by Torsten Curdt <tc...@apache.org>.
> Problem is that not too much people are interested in seeing compress
> out of the sandbox.

That's not true :) ...but it would be still a bit of work. When I was  
trying to add a new archiver implementation I was frustrated with  
some of the details of the current API

cheers
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [VFS] Writing to Jar, Zip, Tar..

Posted by "Chr. Grobmeier" <gr...@possessed.de>.
> I am not sure I totally agree here. Last time I looked it was pretty
> much a one-man show from the original author. I wanted to provide a
> patch for some feature. It did not fit into his vision of truezip. So
> I left. (Did I hear someone say fork?) IMO extending java.io.File is
> also a very questionable design approach. But anyway - the problem
> with this is that with truezip being available there are even less
> people eager to work on compress ...as for the most simple things
> there is truezip available.

hm ok. sounds all very reasonable. I just saw that thing with extending
java.io.File... don't like this either, but didn't see it when
skimming bout the code.

How about implementing the delete feature into compress, your comments
and some housekeeping stuff and doing a 0.1 release? When compress
is in a maven repository once people will get used to it and the component
may get more attention. Maybe we can borrow one or two features from
TrueZip (i really
love ASF license :-)) to make it more attractive.

When i am thinking about it, there are four people always talking
about compress: Mario and you as Apache committers, Will and me as
contributers. Guess thats enough for this component. :-)

Best,
Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [VFS] Writing to Jar, Zip, Tar..

Posted by Torsten Curdt <tc...@apache.org>.
On 25.08.2007, at 14:31, Chr. Grobmeier wrote:

> ah very well-
> i checked out truezip yesterday and found it quite good.
> Its time to ask again if compress should go to dormancy
> when such a good component is available with ASF license.

I am not sure I totally agree here. Last time I looked it was pretty  
much a one-man show from the original author. I wanted to provide a  
patch for some feature. It did not fit into his vision of truezip. So  
I left. (Did I hear someone say fork?) IMO extending java.io.File is  
also a very questionable design approach. But anyway - the problem  
with this is that with truezip being available there are even less  
people eager to work on compress ...as for the most simple things  
there is truezip available.

My 2 cents

cheers
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [VFS] Writing to Jar, Zip, Tar..

Posted by "Chr. Grobmeier" <gr...@possessed.de>.
ah very well-
i checked out truezip yesterday and found it quite good.
Its time to ask again if compress should go to dormancy
when such a good component is available with ASF license.

Regards,
Chris

On 8/25/07, Asankha C. Perera <as...@wso2.com> wrote:
> Hi Chris
> > It may be more effective with that open TrueZip issue.
> >
> Yes, I have checked with Christian Schlichtherle on getting TrueZip into
> Maven repos already and he is supportive of the effort. Also I have made
> good progress on http://issues.apache.org/jira/browse/VFS-106 patch by
> Filip Defoort, and solved most of the issues pointed out by Mario
> including test cases. So I am hopeful I can get this into VFS quite soon
> in the next few days.
>
> thanks
> asankha
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [VFS] Writing to Jar, Zip, Tar..

Posted by "Asankha C. Perera" <as...@wso2.com>.
Hi Chris
> It may be more effective with that open TrueZip issue.
>   
Yes, I have checked with Christian Schlichtherle on getting TrueZip into 
Maven repos already and he is supportive of the effort. Also I have made 
good progress on http://issues.apache.org/jira/browse/VFS-106 patch by 
Filip Defoort, and solved most of the issues pointed out by Mario 
including test cases. So I am hopeful I can get this into VFS quite soon 
in the next few days.

thanks
asankha

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [VFS] Writing to Jar, Zip, Tar..

Posted by "Chr. Grobmeier" <gr...@possessed.de>.
hi asankha,
the point is, that VFS depends on Compress which is a Sandbox component.
Cause of this Mario copied the compress code into VFS. It was planned that
whenever compress leaves the sandbox VFS will have an dependency on it.

Will wrote code for compress like i did. When it is submitted we have to
release compress first and depend VFS to it. It may be more effective
with that open TrueZip issue.
Problem is that not too much people are interested in seeing compress
out of the sandbox.

Best,
Chris

On 8/25/07, Asankha C. Perera <as...@wso2.com> wrote:
> Hi Will
>
> I haven't yet got a chance to look at this in detail.. but your patch
> seems to be only for compress? and not for the VFS provider? If so its
> not clear to me how can one use it for VFS
>
> thanks
> asankha
>
> Will Pugh wrote:
> > I wrote some zip writing code for compress that can modify the actual
> > zip files.  I submitted it and then fell off the face of the earth.
> > In July, I came back an fixed up some of the concerns, but I think the
> > pause ended up losing some of the interest in this.
> >
> > http://issues.apache.org/jira/browse/SANDBOX-183
> >
> >
> >    --Will
> >
> > Chr. Grobmeier wrote:
> >> Hi,
> >>
> >>
> >>> I would be interested to see write support for files such as Jar, Tar
> >>> and Zip etc in VFS. If you already have some code that works, thats
> >>> great
> >>>
> >>
> >> ok, i didn't finish all the code necessary, but i remember there are
> >> only smaller chunks left to write.
> >>
> >>
> >>> I am a Jakarta HttpCore committer as well, and also the lead developer
> >>> of Apache Synapse. So maybe I could try to be of help to get your code
> >>> into the SVN with the help of a VFS committer?
> >>>
> >>
> >> I think this would work; i contributed a few lines code before with
> >> the help of the commons people in here. I think Mario (VFS) may also
> >> be interested in this.
> >>
> >>
> >>> Cant you rely on java.util.zip and java.util.jar packages instead of
> >>> compress?
> >>>
> >>
> >> Yes, we could, but as far as i understood people didn't want to use
> >> this sun-specific packages and implemented these classes themself
> >> under Apache License. However, its possible to extend compress with
> >> own packages, so one can rely on those you mentioned with writing some
> >> kind of plugin.
> >>
> >> Best,
> >> Chris
> >>
> >>
> >>> thanks
> >>> asankha
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >>> For additional commands, e-mail: dev-help@commons.apache.org
> >>>
> >>>
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >> For additional commands, e-mail: dev-help@commons.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [VFS] Writing to Jar, Zip, Tar..

Posted by "Asankha C. Perera" <as...@wso2.com>.
Hi Will

I haven't yet got a chance to look at this in detail.. but your patch 
seems to be only for compress? and not for the VFS provider? If so its 
not clear to me how can one use it for VFS

thanks
asankha

Will Pugh wrote:
> I wrote some zip writing code for compress that can modify the actual 
> zip files.  I submitted it and then fell off the face of the earth.  
> In July, I came back an fixed up some of the concerns, but I think the 
> pause ended up losing some of the interest in this.
>
> http://issues.apache.org/jira/browse/SANDBOX-183
>
>
>    --Will
>
> Chr. Grobmeier wrote:
>> Hi,
>>
>>  
>>> I would be interested to see write support for files such as Jar, Tar
>>> and Zip etc in VFS. If you already have some code that works, thats 
>>> great
>>>     
>>
>> ok, i didn't finish all the code necessary, but i remember there are
>> only smaller chunks left to write.
>>
>>  
>>> I am a Jakarta HttpCore committer as well, and also the lead developer
>>> of Apache Synapse. So maybe I could try to be of help to get your code
>>> into the SVN with the help of a VFS committer?
>>>     
>>
>> I think this would work; i contributed a few lines code before with
>> the help of the commons people in here. I think Mario (VFS) may also
>> be interested in this.
>>
>>  
>>> Cant you rely on java.util.zip and java.util.jar packages instead of
>>> compress?
>>>     
>>
>> Yes, we could, but as far as i understood people didn't want to use
>> this sun-specific packages and implemented these classes themself
>> under Apache License. However, its possible to extend compress with
>> own packages, so one can rely on those you mentioned with writing some
>> kind of plugin.
>>
>> Best,
>> Chris
>>
>>  
>>> thanks
>>> asankha
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>>     
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>   
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [VFS] Writing to Jar, Zip, Tar..

Posted by Will Pugh <wi...@sourcelabs.com>.
I wrote some zip writing code for compress that can modify the actual 
zip files.  I submitted it and then fell off the face of the earth.  In 
July, I came back an fixed up some of the concerns, but I think the 
pause ended up losing some of the interest in this.

http://issues.apache.org/jira/browse/SANDBOX-183


    --Will

Chr. Grobmeier wrote:
> Hi,
>
>   
>> I would be interested to see write support for files such as Jar, Tar
>> and Zip etc in VFS. If you already have some code that works, thats great
>>     
>
> ok, i didn't finish all the code necessary, but i remember there are
> only smaller chunks left to write.
>
>   
>> I am a Jakarta HttpCore committer as well, and also the lead developer
>> of Apache Synapse. So maybe I could try to be of help to get your code
>> into the SVN with the help of a VFS committer?
>>     
>
> I think this would work; i contributed a few lines code before with
> the help of the commons people in here. I think Mario (VFS) may also
> be interested in this.
>
>   
>> Cant you rely on java.util.zip and java.util.jar packages instead of
>> compress?
>>     
>
> Yes, we could, but as far as i understood people didn't want to use
> this sun-specific packages and implemented these classes themself
> under Apache License. However, its possible to extend compress with
> own packages, so one can rely on those you mentioned with writing some
> kind of plugin.
>
> Best,
> Chris
>
>   
>> thanks
>> asankha
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [VFS] Writing to Jar, Zip, Tar..

Posted by "Chr. Grobmeier" <gr...@possessed.de>.
Hi,

> I would be interested to see write support for files such as Jar, Tar
> and Zip etc in VFS. If you already have some code that works, thats great

ok, i didn't finish all the code necessary, but i remember there are
only smaller chunks left to write.

> I am a Jakarta HttpCore committer as well, and also the lead developer
> of Apache Synapse. So maybe I could try to be of help to get your code
> into the SVN with the help of a VFS committer?

I think this would work; i contributed a few lines code before with
the help of the commons people in here. I think Mario (VFS) may also
be interested in this.

> Cant you rely on java.util.zip and java.util.jar packages instead of
> compress?

Yes, we could, but as far as i understood people didn't want to use
this sun-specific packages and implemented these classes themself
under Apache License. However, its possible to extend compress with
own packages, so one can rely on those you mentioned with writing some
kind of plugin.

Best,
Chris

>
> thanks
> asankha
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [VFS] Writing to Jar, Zip, Tar..

Posted by "Asankha C. Perera" <as...@wso2.com>.
Hi Chris

I would be interested to see write support for files such as Jar, Tar 
and Zip etc in VFS. If you already have some code that works, thats great
> Since i am not a comitter i found it very difficult to contribute and my
> interest dissappeard too.
>   
I am a Jakarta HttpCore committer as well, and also the lead developer 
of Apache Synapse. So maybe I could try to be of help to get your code 
into the SVN with the help of a VFS committer?
> Well, if there is any interest again in doing this i could finish
> that. But in fact there have been also discussion to put compress from
> sandbox to dormant; one of the commons comitter complained that the
> compress lib is very difficult to understand.
>   
Cant you rely on java.util.zip and java.util.jar packages instead of 
compress?

thanks
asankha

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [VFS] Writing to Jar, Zip, Tar..

Posted by "Chr. Grobmeier" <gr...@possessed.de>.
Hi Asankha,

there was efford before months to improve the underlying component,
commons compress. Compress was one of the showstoppers for VFS. After
it was clear that compress needs more time than VFS to be released,
the VFS team copied the compress classes into VFS and released that
component. Since then compress was developed independent. Unfortunatly
the interest in releasing compress was quite less from this point of
time and we didn't finish the read/write support. I have the basics of
read/write access on my local harddrive, but its not ready yet. Since
i am not a comitter i found it very difficult to contribute and my
interest dissappeard too.
Well, if there is any interest again in doing this i could finish
that. But in fact there have been also discussion to put compress from
sandbox to dormant; one of the commons comitter complained that the
compress lib is very difficult to understand.

Best,
Chris


On 8/24/07, Asankha C. Perera <as...@wso2.com> wrote:
> I am a committer of the Apache Synapse project and we are using VFS to
> build a file transport through Apache Axis2. However, it seems like we
> cannot 'write' to or create new Jar, Zip files through VFS.. is this a
> current limitation?
>
> If so, is anyone currently working on this to provide write support as
> well? In the ZipFileSystem class, some lines are commented and I was
> wondering if someone already has done some work on this - but haven't
> yet exposed this over the public API?
>
> public ZipFileSystem(final FileName rootName,
>                          final FileObject parentLayer,
>                          final FileSystemOptions fileSystemOptions)
>         throws FileSystemException
>     {
>         super(rootName, parentLayer, fileSystemOptions);
>         ...
> *        //zipFile = createZipFile(this.file);*
>     }
>
>
> I am not familiar with the VFS code, but if its not a too difficult task
> I would like to see if I can be of any help here if no one is working on
> this support right now
>
> thanks
> asankha
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org