Maven 1
  1. Maven 1
  2. MAVEN-383

Repository plugin does not use dynamic delimiter like changelog

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.0-beta-9
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      From Florin Vancea on dev list

      And yet, still.

      The docs for the project.xml structure states very clearly that the
      connection string has to start with "scm" and also states that the next
      character is the delimiter (which is a cool thing to do, btw).
      The changelog implements this, but the org.apache.maven.project.Repository
      class in main Maven sources fail do do so and uses ":" as the hardcoded
      separator. This induces a failure in generated docs, at least in the
      cvs-usage page, when the separator is not ":", as required for Windows CVS
      users.

      Here is a patch against the HEAD for
      src/java/org/apache/maven/project/Repository.java.
      It's the output from cvs diff between the HEAD version (which is 1.1.1.1 in
      my local Maven CVS) and the patched version.
      I'm mentioning this since I have no experience producing usable patch diff
      files on Windows. I hope it's usable.

      ====== Diff starts here =============
      RCS file:
      w:/cvs/osp/maven/src/java/org/apache/maven/project/Repository.java,v
      retrieving revision 1.1.1.1
      diff -r1.1.1.1 Repository.java
      128c128
      < return getConnection().substring( 0, connection.lastIndexOf(
      ":" ) ).substring( 7 );

      >> return getConnection().substring( 0, connection.lastIndexOf(

      getSeparator() ) ).substring( 7 );
      143c143
      < return getConnection().substring( connection.lastIndexOf(
      ":" ) + 1 );

      >> return getConnection().substring( connection.lastIndexOf(

      getSeparator() ) + 1 );
      146a147,164

      >> }
      >>
      >> /**
      >> * Get separator (char after "scm" prefix)
      >> *
      >> * TODO: Check that connection string really starts with "scm", like

      in changelog plugin

      >> * @return separator
      >> */
      >> private String getSeparator()
      >> {
      >> if ( isValid( getConnection() ) )
      >>

      { >> return getConnection().substring( 3, 4 ); >> }

      >> else
      >>

      { >> return ":"; >> }

      ====== Diff ends here =============

      Florin

      ----- Original Message -----
      From: "Florin Vancea" <fvancea@maxiq.ro>
      To: "Maven Developers List" <dev@maven.apache.org>
      Sent: Thursday, April 10, 2003 5:57 PM
      Subject: Re: Changelog plugin and "six tokens"

      >> Oops, sorry for jumping the gun.
      >> I saw the light after reading the source. And after that I found the docs,
      >> too
      >>
      >> Sorry again.
      >>
      >> ----- Original Message -----
      >> From: "Florin Vancea" <fvancea@maxiq.ro>
      >> To: "Maven Developers List" <dev@maven.apache.org>
      >> Sent: Thursday, April 10, 2003 4:41 PM
      >> Subject: Changelog plugin and "six tokens"
      >>
      >>
      >
      >>> > Hello all.
      >>> >
      >>> > The changelog plugin seems to require now that the repository connection
      >>> > string is composed of at most 6 tokens.
      >>> > I am running my CVS server on a Windows machine and the fifth token must
      >
      >> be
      >
      >>> > something like "w:/cvs/repodir".
      >>> > Notice the colon after "w".
      >>> > Of course the plugin complains, but I do not know any way to represent

      the

      >>> > path without the drive letter.
      >>> >
      >>> > As I recall now, the changelog plugin never worked, but I never really
      >>> > bothered to find out why.
      >>> > Now I realize that "w" was interpreted as the fifth token (i.e. the

      path)

      >>> > and "/cvs/repodir" was taken to be the module name.
      >>> > The module itself was blown away, until this check.
      >>> >
      >>> > Anyone using CVS on Windows? Any suggestions? (aside from moving to

      Linux

      >> or
      >
      >>> > the like )
      >>> > Is this solvable within the current architecture of the changelog

      plugin?

      >>> >
      >>> > Thanks,
      >>> > Florin
      >>> >
      >>> >
      >>> >
      >>> > ---------------------------------------------------------------------
      >>> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
      >>> > For additional commands, e-mail: dev-help@maven.apache.org
      >>> >
      >>> >
      >
      >>
      >>
      >>
      >> ---------------------------------------------------------------------
      >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
      >> For additional commands, e-mail: dev-help@maven.apache.org
      >>
      >>

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

        Activity

        Hide
        Ben Walding added a comment -

        Refactoring some of the repository processing back to a common SCM tag lib. Repository should just be a storage bunker for the data, and not be doing any processing.

        Show
        Ben Walding added a comment - Refactoring some of the repository processing back to a common SCM tag lib. Repository should just be a storage bunker for the data, and not be doing any processing.
        Hide
        Brett Porter added a comment -

        no longer relevant

        Show
        Brett Porter added a comment - no longer relevant

          People

          • Assignee:
            Unassigned
            Reporter:
            Ben Walding
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 30 minutes
              30m
              Remaining:
              Remaining Estimate - 30 minutes
              30m
              Logged:
              Time Spent - Not Specified
              Not Specified