You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Stefan Bodewig <bo...@apache.org> on 2013/12/30 11:17:58 UTC

[compress] 2.0: require Java7?

Hi,

I've started to write a tiny amount of code for 2.0 to get things moving
(more on this later) and have already reached a point where Java7 may
make a difference.

I'm trying to define an API for attributes beyond the set offered by
ArchivEntry so far - many (AR, ARJ, CPIO, ZIP, TAR, DUMP) of our entries
provide POSIX permissions and file attributes, some (ZIP, ARJ and 7z)
technically provide DOS attributes.  Something like the interfaces of
the java.nio.file.attribute package[1] (probably without the attribute
view overhead) might come handy.  OTOH it wouldn't be too complex to
implement the same ideas ourselves.

Compress 1.x is at Java5, personally I don't think Java6 would give us
any benefits.  I don't know about the other improvements in NIO2 but the
java.nio.file package looks useful for compress.  Therefore I'd tend to
go with Java7 as requirement for compress2.

Is this too ambitious?  Should we poll the user list?

Stefan

[1] http://docs.oracle.com/javase/7/docs/api/java/nio/file/attribute/package-summary.html

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


Re: [compress] 2.0: require Java7?

Posted by Damjan Jovanovic <da...@apache.org>.
On Sun, Jan 26, 2014 at 8:13 AM, Stefan Bodewig <bo...@apache.org> wrote:
> On 2014-01-25, Damjan Jovanovic wrote:
>
>> On Fri, Jan 24, 2014 at 6:06 PM, Stefan Bodewig <bo...@apache.org> wrote:
>>> On 2013-12-30, Stefan Bodewig wrote:
>
>>>> Compress 1.x is at Java5, personally I don't think Java6 would give us
>>>> any benefits.  I don't know about the other improvements in NIO2 but the
>>>> java.nio.file package looks useful for compress.
>
>>> In the meantime it has been pointed out to me that Android doesn't
>>> support NIO2.  I can imagine Android apps using Compress so this looks
>>> like a good reason to hold back requiring Java7.
>
>> It's already possible to use most Java 7 language level features and
>> compile to Android (https://github.com/yareally/Java7-on-Android). It
>> would also possible to reimplement the needed classes (which is only
>> SeekableByteChannel?) in nio2 using some kind of wrapper on top of
>> Android's java.nio.
>
> It would also be a part java.nio.file.attribute, but we can re-invent
> that as well, if needed.  What you suggest could work as long as we are
> careful and never assume FileChannel implements SeekableByteChannel but
> use some custom File => SeekableByteChannel code using Java7 if
> available - I'm just afraid we'll forget to be careful.

Or, during compilation to Android, java.nio.channels.FileChannel could
get renamed to wrapper.FileChannel, which will implement
wrapper.SeekableByteChannel, so there's no problem.

>> We could still use Java 7 / nio2 and then make a plan for Android
>> releases.
>
> Thanks for volunteering ;-)

Heh :).

> Stefan
>

Damjan

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


Re: [compress] 2.0: require Java7?

Posted by Stefan Bodewig <bo...@apache.org>.
On 2014-01-25, Damjan Jovanovic wrote:

> On Fri, Jan 24, 2014 at 6:06 PM, Stefan Bodewig <bo...@apache.org> wrote:
>> On 2013-12-30, Stefan Bodewig wrote:

>>> Compress 1.x is at Java5, personally I don't think Java6 would give us
>>> any benefits.  I don't know about the other improvements in NIO2 but the
>>> java.nio.file package looks useful for compress.

>> In the meantime it has been pointed out to me that Android doesn't
>> support NIO2.  I can imagine Android apps using Compress so this looks
>> like a good reason to hold back requiring Java7.

> It's already possible to use most Java 7 language level features and
> compile to Android (https://github.com/yareally/Java7-on-Android). It
> would also possible to reimplement the needed classes (which is only
> SeekableByteChannel?) in nio2 using some kind of wrapper on top of
> Android's java.nio.

It would also be a part java.nio.file.attribute, but we can re-invent
that as well, if needed.  What you suggest could work as long as we are
careful and never assume FileChannel implements SeekableByteChannel but
use some custom File => SeekableByteChannel code using Java7 if
available - I'm just afraid we'll forget to be careful.

> We could still use Java 7 / nio2 and then make a plan for Android
> releases.

Thanks for volunteering ;-)

Stefan

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


Re: [compress] 2.0: require Java7?

Posted by Torsten Curdt <tc...@vafer.org>.
And the old 1.x releases are not going magically away with a 2.x release ;)

+1 for not having Android influence the decision


On Sat, Jan 25, 2014 at 9:58 AM, Benedikt Ritter <br...@apache.org> wrote:
> 2014/1/25 Damjan Jovanovic <da...@apache.org>
>
>> On Fri, Jan 24, 2014 at 6:06 PM, Stefan Bodewig <bo...@apache.org>
>> wrote:
>> > On 2013-12-30, Stefan Bodewig wrote:
>> >
>> >> Compress 1.x is at Java5, personally I don't think Java6 would give us
>> >> any benefits.  I don't know about the other improvements in NIO2 but the
>> >> java.nio.file package looks useful for compress.
>> >
>> > In the meantime it has been pointed out to me that Android doesn't
>> > support NIO2.  I can imagine Android apps using Compress so this looks
>> > like a good reason to hold back requiring Java7.
>> >
>> > Stefan
>> >
>>
>> It's already possible to use most Java 7 language level features and
>> compile to Android (https://github.com/yareally/Java7-on-Android). It
>> would also possible to reimplement the needed classes (which is only
>> SeekableByteChannel?) in nio2 using some kind of wrapper on top of
>> Android's java.nio.
>>
>> We could still use Java 7 / nio2 and then make a plan for Android releases.
>>
>
> +1
>
>
>>
>> Damjan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> --
> http://people.apache.org/~britter/
> http://www.systemoutprintln.de/
> http://twitter.com/BenediktRitter
> http://github.com/britter

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


Re: [compress] 2.0: require Java7?

Posted by Benedikt Ritter <br...@apache.org>.
2014/1/25 Damjan Jovanovic <da...@apache.org>

> On Fri, Jan 24, 2014 at 6:06 PM, Stefan Bodewig <bo...@apache.org>
> wrote:
> > On 2013-12-30, Stefan Bodewig wrote:
> >
> >> Compress 1.x is at Java5, personally I don't think Java6 would give us
> >> any benefits.  I don't know about the other improvements in NIO2 but the
> >> java.nio.file package looks useful for compress.
> >
> > In the meantime it has been pointed out to me that Android doesn't
> > support NIO2.  I can imagine Android apps using Compress so this looks
> > like a good reason to hold back requiring Java7.
> >
> > Stefan
> >
>
> It's already possible to use most Java 7 language level features and
> compile to Android (https://github.com/yareally/Java7-on-Android). It
> would also possible to reimplement the needed classes (which is only
> SeekableByteChannel?) in nio2 using some kind of wrapper on top of
> Android's java.nio.
>
> We could still use Java 7 / nio2 and then make a plan for Android releases.
>

+1


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


-- 
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter

Re: [compress] 2.0: require Java7?

Posted by Damjan Jovanovic <da...@apache.org>.
On Fri, Jan 24, 2014 at 6:06 PM, Stefan Bodewig <bo...@apache.org> wrote:
> On 2013-12-30, Stefan Bodewig wrote:
>
>> Compress 1.x is at Java5, personally I don't think Java6 would give us
>> any benefits.  I don't know about the other improvements in NIO2 but the
>> java.nio.file package looks useful for compress.
>
> In the meantime it has been pointed out to me that Android doesn't
> support NIO2.  I can imagine Android apps using Compress so this looks
> like a good reason to hold back requiring Java7.
>
> Stefan
>

It's already possible to use most Java 7 language level features and
compile to Android (https://github.com/yareally/Java7-on-Android). It
would also possible to reimplement the needed classes (which is only
SeekableByteChannel?) in nio2 using some kind of wrapper on top of
Android's java.nio.

We could still use Java 7 / nio2 and then make a plan for Android releases.

Damjan

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


Re: [compress] 2.0: require Java7?

Posted by sebb <se...@gmail.com>.
On 24 January 2014 16:57, Gary Gregory <ga...@gmail.com> wrote:
> On Fri, Jan 24, 2014 at 11:06 AM, Stefan Bodewig <bo...@apache.org> wrote:
>
>> On 2013-12-30, Stefan Bodewig wrote:
>>
>> > Compress 1.x is at Java5, personally I don't think Java6 would give us
>> > any benefits.  I don't know about the other improvements in NIO2 but the
>> > java.nio.file package looks useful for compress.
>>
>> In the meantime it has been pointed out to me that Android doesn't
>> support NIO2.  I can imagine Android apps using Compress so this looks
>> like a good reason to hold back requiring Java7.
>>
>
> But for how long? Java 6 is dead on not-Android.

Just as there are still users on WinXP there will be users who are
restricted to earlier versions of Java.

Once the advantages of requiring a later version of Java outweigh the
disadvantages, then it would be worth considering.

> Gary
>
>
>>
>> Stefan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory

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


Re: [compress] 2.0: require Java7?

Posted by Gary Gregory <ga...@gmail.com>.
On Fri, Jan 24, 2014 at 11:06 AM, Stefan Bodewig <bo...@apache.org> wrote:

> On 2013-12-30, Stefan Bodewig wrote:
>
> > Compress 1.x is at Java5, personally I don't think Java6 would give us
> > any benefits.  I don't know about the other improvements in NIO2 but the
> > java.nio.file package looks useful for compress.
>
> In the meantime it has been pointed out to me that Android doesn't
> support NIO2.  I can imagine Android apps using Compress so this looks
> like a good reason to hold back requiring Java7.
>

But for how long? Java 6 is dead on not-Android.

Gary


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


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [compress] 2.0: require Java7?

Posted by Stefan Bodewig <bo...@apache.org>.
On 2013-12-30, Stefan Bodewig wrote:

> Compress 1.x is at Java5, personally I don't think Java6 would give us
> any benefits.  I don't know about the other improvements in NIO2 but the
> java.nio.file package looks useful for compress.

In the meantime it has been pointed out to me that Android doesn't
support NIO2.  I can imagine Android apps using Compress so this looks
like a good reason to hold back requiring Java7.

Stefan

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


Re: [compress] 2.0: require Java7?

Posted by Stefan Bodewig <bo...@apache.org>.
On 2014-01-02, Emmanuel Bourg wrote:

> Le 01/01/2014 23:09, Stefan Bodewig a écrit :

>> AFAIK maven uses some Plexus component which is yet another fork of the
>> codebase originating from Ant - must have been created at about the same
>> time as Compress.

> The forked code has been replaced in plexus-archiver 2.4 with a
> dependency on Commons Compress:

> https://github.com/sonatype/plexus-archiver/commit/ce4bf4c5212188692850f06ee6874196104646e9

Well, not really, plexus-archiver still forks the tar and zip packages,
their choice.  But I get your point.

>> Also we are talking about compress2 which won't be compatible with
>> compress 1.x anyway.

> Sure, but if we stop maintaining compress 1.x that might lead them to
> fork the code again to fix important issues.

TBH I don't expect us to stop maintaining 1.x for bug fixes soon, but
one never knows.

Do you want to ping the Maven folks to see how they feel about it?

Stefan

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


Re: [compress] 2.0: require Java7?

Posted by Emmanuel Bourg <eb...@apache.org>.
Le 01/01/2014 23:09, Stefan Bodewig a écrit :

> AFAIK maven uses some Plexus component which is yet another fork of the
> codebase originating from Ant - must have been created at about the same
> time as Compress.

The forked code has been replaced in plexus-archiver 2.4 with a
dependency on Commons Compress:

https://github.com/sonatype/plexus-archiver/commit/ce4bf4c5212188692850f06ee6874196104646e9


> Also we are talking about compress2 which won't be compatible with
> compress 1.x anyway.

Sure, but if we stop maintaining compress 1.x that might lead them to
fork the code again to fix important issues.

Emmanuel Bourg

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


Re: [compress] 2.0: require Java7?

Posted by Stefan Bodewig <bo...@apache.org>.
On 2014-01-01, Emmanuel Bourg wrote:

> Le 30/12/2013 11:17, Stefan Bodewig a écrit :

>> Is this too ambitious?  Should we poll the user list?

> I believe Commons Compress is a core dependency of the Maven ecosystem.
> I don't know what is the minimum version of Java expected there, but we
> should probably try to play nice with them.

AFAIK maven uses some Plexus component which is yet another fork of the
codebase originating from Ant - must have been created at about the same
time as Compress.

Also we are talking about compress2 which won't be compatible with
compress 1.x anyway.

Stefan

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


Re: [compress] 2.0: require Java7?

Posted by Emmanuel Bourg <eb...@apache.org>.
Le 30/12/2013 11:17, Stefan Bodewig a écrit :

> Is this too ambitious?  Should we poll the user list?

I believe Commons Compress is a core dependency of the Maven ecosystem.
I don't know what is the minimum version of Java expected there, but we
should probably try to play nice with them.

Emmanuel Bourg

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


Re: [compress] 2.0: require Java7?

Posted by Jörg Schaible <jo...@gmx.de>.
Hi Stefan,

Stefan Bodewig wrote:

> Hi,
> 
> I've started to write a tiny amount of code for 2.0 to get things moving
> (more on this later) and have already reached a point where Java7 may
> make a difference.
> 
> I'm trying to define an API for attributes beyond the set offered by
> ArchivEntry so far - many (AR, ARJ, CPIO, ZIP, TAR, DUMP) of our entries
> provide POSIX permissions and file attributes, some (ZIP, ARJ and 7z)
> technically provide DOS attributes.  Something like the interfaces of
> the java.nio.file.attribute package[1] (probably without the attribute
> view overhead) might come handy.  OTOH it wouldn't be too complex to
> implement the same ideas ourselves.
> 
> Compress 1.x is at Java5, personally I don't think Java6 would give us
> any benefits.  I don't know about the other improvements in NIO2 but the
> java.nio.file package looks useful for compress.  Therefore I'd tend to
> go with Java7 as requirement for compress2.
> 
> Is this too ambitious?  Should we poll the user list?

If we maintain binary compatibility, we should not break JDK level 
compatibility without good reason. However, if compress2 is *not* meant to 
be binary compatible, I'd start with Java 7 right away.

- Jörg


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


Re: [compress] 2.0: require Java7?

Posted by Gary Gregory <ga...@gmail.com>.
On Mon, Dec 30, 2013 at 5:25 AM, Benedikt Ritter <br...@apache.org> wrote:

> Hi Stefan
>
>
> 2013/12/30 Stefan Bodewig <bo...@apache.org>
>
> > Hi,
> >
> > I've started to write a tiny amount of code for 2.0 to get things moving
> > (more on this later) and have already reached a point where Java7 may
> > make a difference.
> >
> > I'm trying to define an API for attributes beyond the set offered by
> > ArchivEntry so far - many (AR, ARJ, CPIO, ZIP, TAR, DUMP) of our entries
> > provide POSIX permissions and file attributes, some (ZIP, ARJ and 7z)
> > technically provide DOS attributes.  Something like the interfaces of
> > the java.nio.file.attribute package[1] (probably without the attribute
> > view overhead) might come handy.  OTOH it wouldn't be too complex to
> > implement the same ideas ourselves.
> >
>
> If all we need is already present in Java 7, then we shouldn't reinvent the
> wheel.
>

+1


>
>
> >
> > Compress 1.x is at Java5, personally I don't think Java6 would give us
> > any benefits.  I don't know about the other improvements in NIO2 but the
> > java.nio.file package looks useful for compress.  Therefore I'd tend to
> > go with Java7 as requirement for compress2.
> >
> > Is this too ambitious?  Should we poll the user list?
> >
>
> Java 6 has already reached EOL [1]. Compress 2.0 is a good opportunity make
> this step und move things forward. If anybody really needs a but fixed or a
> feature implemented with compatibility to Java 1.5, it can be implemented
> in the old codebase (like it has happened for example with [configuration]
> 1.10 a while ago).
>
> I'd say: go for it! :-)
>

+1

Gary


>
> Benedikt
>
> [1] http://www.oracle.com/technetwork/java/eol-135779.html
>
>
> >
> > Stefan
> >
> > [1]
> >
> http://docs.oracle.com/javase/7/docs/api/java/nio/file/attribute/package-summary.html
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>
>
> --
> http://people.apache.org/~britter/
> http://www.systemoutprintln.de/
> http://twitter.com/BenediktRitter
> http://github.com/britter
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: [compress] 2.0: require Java7?

Posted by Benedikt Ritter <br...@apache.org>.
Hi Stefan


2013/12/30 Stefan Bodewig <bo...@apache.org>

> Hi,
>
> I've started to write a tiny amount of code for 2.0 to get things moving
> (more on this later) and have already reached a point where Java7 may
> make a difference.
>
> I'm trying to define an API for attributes beyond the set offered by
> ArchivEntry so far - many (AR, ARJ, CPIO, ZIP, TAR, DUMP) of our entries
> provide POSIX permissions and file attributes, some (ZIP, ARJ and 7z)
> technically provide DOS attributes.  Something like the interfaces of
> the java.nio.file.attribute package[1] (probably without the attribute
> view overhead) might come handy.  OTOH it wouldn't be too complex to
> implement the same ideas ourselves.
>

If all we need is already present in Java 7, then we shouldn't reinvent the
wheel.


>
> Compress 1.x is at Java5, personally I don't think Java6 would give us
> any benefits.  I don't know about the other improvements in NIO2 but the
> java.nio.file package looks useful for compress.  Therefore I'd tend to
> go with Java7 as requirement for compress2.
>
> Is this too ambitious?  Should we poll the user list?
>

Java 6 has already reached EOL [1]. Compress 2.0 is a good opportunity make
this step und move things forward. If anybody really needs a but fixed or a
feature implemented with compatibility to Java 1.5, it can be implemented
in the old codebase (like it has happened for example with [configuration]
1.10 a while ago).

I'd say: go for it! :-)

Benedikt

[1] http://www.oracle.com/technetwork/java/eol-135779.html


>
> Stefan
>
> [1]
> http://docs.oracle.com/javase/7/docs/api/java/nio/file/attribute/package-summary.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter