jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x Sandbox
  • MSANDBOX-51

Rewrite Plexus Utils classes at the ASF from scratch

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Component/s: None
  • Labels:
    None

Description

plexus-utils are 85% written by ASF committers, but we still don't have a IP cleared history.
For cleaning this up we aim to rewrite those classes from scratch in ASF maven sandbox.

The strategy is the following:

1. create unit tests for the existing plexus classes
2. create a new implementation from scratch
3. the new implementation must be a binary API compatible drop-in replacement

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    diff.txt
    08/Oct/11 1:02 PM
    3 kB
    James Saunders
  2. Text File
    plexus-utils-tck.patch
    18/Oct/11 9:21 AM
    3 kB
    Michael Nitschke
  3. Text File
    plexus-utils-tck.patch
    08/Oct/11 2:00 PM
    3 kB
    James Saunders

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Mark Struberg added a comment - 10/Aug/11 5:39 PM

It seems that a big part of the plexus code is actually coming from the Apache Avalon project and only got copied over.
Some classes, like Os.java are almost 1:1 copies of ASF originated sources!.

To reduce the amount of work, it is suggested to take the ASF original code, copy it over to our new sandbox project and apply the maven codestyle.

The code needs proper testing of course to ensure that there has no incompatibility been introduced.

Show
Mark Struberg added a comment - 10/Aug/11 5:39 PM It seems that a big part of the plexus code is actually coming from the Apache Avalon project and only got copied over. Some classes, like Os.java are almost 1:1 copies of ASF originated sources!. To reduce the amount of work, it is suggested to take the ASF original code, copy it over to our new sandbox project and apply the maven codestyle. The code needs proper testing of course to ensure that there has no incompatibility been introduced.
Hide
Permalink
Mark Struberg added a comment - 11/Aug/11 3:49 AM

After talking with Stefan Bodewig (which shows up as @author in lots of the sources) and other commons guys I found out that a good part of the plexus-utils sources originally did came from ant. They then got pulled over to Avalon and plexus took them either from there or directly from Ant.

Show
Mark Struberg added a comment - 11/Aug/11 3:49 AM After talking with Stefan Bodewig (which shows up as @author in lots of the sources) and other commons guys I found out that a good part of the plexus-utils sources originally did came from ant. They then got pulled over to Avalon and plexus took them either from there or directly from Ant.
Hide
Permalink
Brett Porter added a comment - 11/Aug/11 7:16 PM

I thought it was largely delegating to commons? In most cases, they also have the same ancestry but have been improved more significantly since.

Show
Brett Porter added a comment - 11/Aug/11 7:16 PM I thought it was largely delegating to commons? In most cases, they also have the same ancestry but have been improved more significantly since.
Hide
Permalink
Mark Struberg added a comment - 12/Aug/11 2:01 AM

Yes, there are classes which are currently in Ant and in commons and mostly maintained by the same committers.

What I wanted to make clear is that quite a lot of the plexus-utils project is just a copy (+singular modifications) of ASF internal projects. So there is not much IP issue with those classes.

Show
Mark Struberg added a comment - 12/Aug/11 2:01 AM Yes, there are classes which are currently in Ant and in commons and mostly maintained by the same committers. What I wanted to make clear is that quite a lot of the plexus-utils project is just a copy (+singular modifications) of ASF internal projects. So there is not much IP issue with those classes.
Hide
Permalink
Brett Porter added a comment - 15/Aug/11 12:38 AM

I think it is important to avoid forking anything, unless we expect to maintain it going forward. In the case of this class, it might be better to bridge to commons-exec: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/OS.java?revision=672325&view=markup, or Ant itself (we can use shade to reduce the impact of the dependency tree).

Show
Brett Porter added a comment - 15/Aug/11 12:38 AM I think it is important to avoid forking anything, unless we expect to maintain it going forward. In the case of this class, it might be better to bridge to commons-exec: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/OS.java?revision=672325&view=markup, or Ant itself (we can use shade to reduce the impact of the dependency tree).
Hide
Permalink
Mark Struberg added a comment - 15/Aug/11 2:37 AM - edited

The problem with Os.java is that plexus-utils got forked off a very old version of ant. The Ant version has much improved yet and got the fields made private, etc. So it's not really easy to just bridge.

If possible, then we should use commons projects and bridge over to them. I'll try to look at the Os.java from commons.

My main 'aha-effect' was that most of the plexus-utils classes are only wrongly declared (C) The Codehaus. This really got only very lately replaced the original '(c) Apache Software Foundation' as most classes are forks from:

  • Ant
  • commons
  • Velocity
  • Anakia
  • maven-utils-1.x

And as such it's legally and also politically no problem to just take the sources back to the ASF SVN and we are not forced to rewrite everything from scratch without looking at the original sources.

edit: I'm not blaming Codehaus for anything, they just provided the hosting and have nothing to do with changing the license headers.

Show
Mark Struberg added a comment - 15/Aug/11 2:37 AM - edited The problem with Os.java is that plexus-utils got forked off a very old version of ant. The Ant version has much improved yet and got the fields made private, etc. So it's not really easy to just bridge. If possible, then we should use commons projects and bridge over to them. I'll try to look at the Os.java from commons. My main 'aha-effect' was that most of the plexus-utils classes are only wrongly declared (C) The Codehaus. This really got only very lately replaced the original '(c) Apache Software Foundation' as most classes are forks from:
  • Ant
  • commons
  • Velocity
  • Anakia
  • maven-utils-1.x
And as such it's legally and also politically no problem to just take the sources back to the ASF SVN and we are not forced to rewrite everything from scratch without looking at the original sources. edit: I'm not blaming Codehaus for anything, they just provided the hosting and have nothing to do with changing the license headers.
Hide
Permalink
Brett Porter added a comment - 15/Aug/11 2:53 AM

right, if there are originals in the ASF SVN we can certainly copy that across (probably with history) - but I'm suggesting it should be an exceptional case. I don't think Maven wants to take on maintaining any of this code unless we've exhausted any other options.

Are there any other cases at the moment that are copied / rewritten instead of bridged to existing code?

Show
Brett Porter added a comment - 15/Aug/11 2:53 AM right, if there are originals in the ASF SVN we can certainly copy that across (probably with history) - but I'm suggesting it should be an exceptional case. I don't think Maven wants to take on maintaining any of this code unless we've exhausted any other options. Are there any other cases at the moment that are copied / rewritten instead of bridged to existing code?
Hide
Permalink
Mark Struberg added a comment - 15/Aug/11 3:08 AM

I think I've touched 5 classes yet and 4 of them are clearly forked from ASF projects and still 90% of that code remaining.

Check this locations for obvious hits:

  • http://maven.apache.org/maven-1.x/xref/org/apache/maven/util/
  • http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/
  • http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/
  • http://svn.apache.org/repos/asf/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/

Of coure, sometimes you also have to grab back into the CVS archive. A good indicator is the @author tag. Commons dropped that around 2004, but plexus-utils most times still have them. An example: All classes with @author Stefan Bodewig are most certainly 1:1 forks from Ant.

Show
Mark Struberg added a comment - 15/Aug/11 3:08 AM I think I've touched 5 classes yet and 4 of them are clearly forked from ASF projects and still 90% of that code remaining. Check this locations for obvious hits:
  • http://maven.apache.org/maven-1.x/xref/org/apache/maven/util/
  • http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/
  • http://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/
  • http://svn.apache.org/repos/asf/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/
Of coure, sometimes you also have to grab back into the CVS archive. A good indicator is the @author tag. Commons dropped that around 2004, but plexus-utils most times still have them. An example: All classes with @author Stefan Bodewig are most certainly 1:1 forks from Ant.
Hide
Permalink
James Saunders added a comment - 08/Oct/11 1:01 PM - edited

Hi Mark,

I have created a test for the SelectorUtils class.
I enclose the svn diff as requested.
Also enclosed as patch created in eclipse.

Show
James Saunders added a comment - 08/Oct/11 1:01 PM - edited Hi Mark, I have created a test for the SelectorUtils class. I enclose the svn diff as requested. Also enclosed as patch created in eclipse.
Hide
Permalink
Michael Nitschke added a comment - 18/Oct/11 9:21 AM - edited

I agree
with the submitted patch.

Mike/Michael

Show
Michael Nitschke added a comment - 18/Oct/11 9:21 AM - edited I agree with the submitted patch. Mike/Michael
Hide
Permalink
Mark Struberg added a comment - 01/Nov/11 8:09 AM

patch applied, thanks James and Michael!

Show
Mark Struberg added a comment - 01/Nov/11 8:09 AM patch applied, thanks James and Michael!

People

  • Assignee:
    Unassigned
    Reporter:
    Mark Struberg
Vote (0)
Watch (0)

Dates

  • Created:
    05/Aug/11 1:31 PM
    Updated:
    01/Nov/11 8:09 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.