You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Florin Vancea <fv...@maxiq.ro> on 2003/04/10 15:41:47 UTC

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


Re: Changelog plugin and "six tokens"

Posted by Ben Walding <de...@walding.com>.
Thanks Florin,

I'm considering rejigging a few parts of the connection parsing to make 
it easier to test and use.  It'll be done in the next day or two.

MAVEN-383 raised to fix this problem

Cheers,


Ben

Florin Vancea wrote:

>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" <fv...@maxiq.ro>
>To: "Maven Developers List" <de...@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" <fv...@maxiq.ro>
>>To: "Maven Developers List" <de...@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
>
>
>  
>



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


Re: Changelog plugin and "six tokens"

Posted by Florin Vancea <fv...@maxiq.ro>.
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" <fv...@maxiq.ro>
To: "Maven Developers List" <de...@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" <fv...@maxiq.ro>
> To: "Maven Developers List" <de...@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


Re: Changelog plugin and "six tokens"

Posted by Florin Vancea <fv...@maxiq.ro>.
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" <fv...@maxiq.ro>
To: "Maven Developers List" <de...@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