Mahout
  1. Mahout
  2. MAHOUT-144

Some maven refactoring and prep for enforcing code style

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.2
    • Fix Version/s: 0.3
    • Component/s: None
    • Labels:
      None

      Description

      The attached does a few things:

      1) sorts out the maven parents: now the modules parent to 'maven', and 'maven' parents to the top-level project.
      2) The release management in the top-level POM is in a profile.
      3) the version of 'maven' is consistent with other version numbers.
      4) the source control URLs are corrected.
      5) a new buildtools module to hold pmd and checkstyle config.
      6) dependencyManagement in the parent, initially just for lucene.
      7) backup to current lucene release. -Dlucene.version is there for those who really want to use 2.9-SNAPSHOT.
      8) a profile, sourcecheck, that turns on checkstyle and pmd. This creates a giant pile of complaints.

      The next step in this process would be to come up with a set of checkstyle and pmd rules consistent with the community's desires.

      1. cs1.diff
        3 kB
        Benson Margulies
      2. miscbuildtools.patch.txt
        75 kB
        Benson Margulies

        Activity

        Hide
        Grant Ingersoll added a comment -

        I'm pretty sure I'm using features of Lucene 2.9-SNAPSHOT, so I doubt it will compile without it. Perhaps, until 2.9 is released, we should just add it to the lib like we do for Hadoop.

        Show
        Grant Ingersoll added a comment - I'm pretty sure I'm using features of Lucene 2.9-SNAPSHOT, so I doubt it will compile without it. Perhaps, until 2.9 is released, we should just add it to the lib like we do for Hadoop.
        Hide
        Benson Margulies added a comment -

        Grant,

        You might want to cherry-pick this patch, or I'll put 2.9-SNAPSHOT back once it works.

        --benson

        Show
        Benson Margulies added a comment - Grant, You might want to cherry-pick this patch, or I'll put 2.9-SNAPSHOT back once it works. --benson
        Hide
        Grant Ingersoll added a comment -

        It seems like the buildtools directory is just redundant of the Maven directory. The maven directory is meant to be a parent POM area that contains useful things across all the modules, which is why it is versioned separately from the other pieces, as it is not expected to change much and because Maven didn't seem to like when the parent is a snapshot.

        I guess I'm not following the first item in the list above.

        Show
        Grant Ingersoll added a comment - It seems like the buildtools directory is just redundant of the Maven directory. The maven directory is meant to be a parent POM area that contains useful things across all the modules, which is why it is versioned separately from the other pieces, as it is not expected to change much and because Maven didn't seem to like when the parent is a snapshot. I guess I'm not following the first item in the list above.
        Hide
        Benson Margulies added a comment -

        The buildtools directory builds a JAR which can be in the classpath of plugins in other projects and in eclipse. The 'parent' project (called 'maven' in mahout) can't build a JAR and so can't supply anything to the classpath.

        See

        http://dssheep.blogspot.com/2008/12/maven-eclipse-checkstyle-pmd-oy-vey.html

        and the page it links to.

        Show
        Benson Margulies added a comment - The buildtools directory builds a JAR which can be in the classpath of plugins in other projects and in eclipse. The 'parent' project (called 'maven' in mahout) can't build a JAR and so can't supply anything to the classpath. See http://dssheep.blogspot.com/2008/12/maven-eclipse-checkstyle-pmd-oy-vey.html and the page it links to.
        Show
        Benson Margulies added a comment - And mostly what it points to: http://cwiki.apache.org/confluence/display/CXF/Connecting+Maven%2C+Eclipse%2C+Checkstyle%2C+and+PMD
        Hide
        Grant Ingersoll added a comment -

        Committed revision 794692.

        I kept 2.9-SNAPSHOT: http://people.apache.org/maven-snapshot-repository/org/apache/lucene/lucene-core/2.9-SNAPSHOT/ as it is required for some of the Lucene code.

        Show
        Grant Ingersoll added a comment - Committed revision 794692. I kept 2.9-SNAPSHOT: http://people.apache.org/maven-snapshot-repository/org/apache/lucene/lucene-core/2.9-SNAPSHOT/ as it is required for some of the Lucene code.
        Hide
        Benson Margulies added a comment -

        Grant,

        I'm still not seeing 2.9.

        Do you have anything clever in your personal settings.xml? Have you tried flushing your local repo and seeing if the 2.9 version shows up?

        --benson

        Show
        Benson Margulies added a comment - Grant, I'm still not seeing 2.9. Do you have anything clever in your personal settings.xml? Have you tried flushing your local repo and seeing if the 2.9 version shows up? --benson
        Hide
        Benson Margulies added a comment -

        A checkstyle config

        Show
        Benson Margulies added a comment - A checkstyle config
        Hide
        Sean Owen added a comment -

        +1 to the checkstyle config and all those related changes. I am a big fan of the 'broken windows' approach to code quality.

        Show
        Sean Owen added a comment - +1 to the checkstyle config and all those related changes. I am a big fan of the 'broken windows' approach to code quality.
        Hide
        Sean Owen added a comment -

        This was completed right?

        Show
        Sean Owen added a comment - This was completed right?

          People

          • Assignee:
            Grant Ingersoll
            Reporter:
            Benson Margulies
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development