You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Benjamin Bentmann <be...@udo.edu> on 2009/05/05 18:49:05 UTC

Re: svn commit: r771907 - in /maven/ant-tasks/branches/maven-ant-tasks-2.0.x/src: main/java/org/apache/maven/artifact/ant/AbstractArtifactWithRepositoryTask.java site/apt/reference.apt test/java/org/apache/maven/artifact/ant/PomTestCase.java

Hi Paul,

> Author: pgier
> Date: Tue May  5 16:34:00 2009
> New Revision: 771907
> 
> URL: http://svn.apache.org/viewvc?rev=771907&view=rev
> Log:
> [MANTTASKS-142] Improve default remote repository id.
> 
> Added:
>     maven/ant-tasks/branches/maven-ant-tasks-2.0.x/src/test/java/org/apache/maven/artifact/ant/PomTestCase.java   (with props)
> Modified:
>     maven/ant-tasks/branches/maven-ant-tasks-2.0.x/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactWithRepositoryTask.java
>     maven/ant-tasks/branches/maven-ant-tasks-2.0.x/src/site/apt/reference.apt
> [...]
> +        if ( remoteRepository.getId() == null || remoteRepository.getId().equals( remoteRepository.getUrl() ) )
> +        {
> +            log( "Each remote repository should specify a unique id.", Project.MSG_WARN );

Just a cosmetic thing: The mere "should" is maybe a little bit too weak. 
  I suggest to clearly state that

Each remote repository must specify a unique id. For 
backward-compatibility, a default id will be used. In future releases, a 
missing repository id will raise an error.

so that users really update their scripts now.

> +        {
> +            MessageDigest md = MessageDigest.getInstance( MD5_ALGO_NAME );
> +            md.update( repository.getUrl().getBytes() );

For reproducibility, better use a fixed encoding like UTF-8 when 
converting the string into a byte sequence.

Thanks for fixing this,


Benjamin


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


Re: svn commit: r771907 - in /maven/ant-tasks/branches/maven-ant-tasks-2.0.x/src: main/java/org/apache/maven/artifact/ant/AbstractArtifactWithRepositoryTask.java site/apt/reference.apt test/java/org/apache/maven/artifact/ant/PomTestCase.java

Posted by Paul Gier <pg...@redhat.com>.
Ok, it's done.
Thanks for the suggestions!

Benjamin Bentmann wrote:
> Hi Paul,
> 
>> Author: pgier
>> Date: Tue May  5 16:34:00 2009
>> New Revision: 771907
>>
>> URL: http://svn.apache.org/viewvc?rev=771907&view=rev
>> Log:
>> [MANTTASKS-142] Improve default remote repository id.
>>
>> Added:
>>     
>> maven/ant-tasks/branches/maven-ant-tasks-2.0.x/src/test/java/org/apache/maven/artifact/ant/PomTestCase.java   
>> (with props)
>> Modified:
>>     
>> maven/ant-tasks/branches/maven-ant-tasks-2.0.x/src/main/java/org/apache/maven/artifact/ant/AbstractArtifactWithRepositoryTask.java 
>>
>>     
>> maven/ant-tasks/branches/maven-ant-tasks-2.0.x/src/site/apt/reference.apt
>> [...]
>> +        if ( remoteRepository.getId() == null || 
>> remoteRepository.getId().equals( remoteRepository.getUrl() ) )
>> +        {
>> +            log( "Each remote repository should specify a unique 
>> id.", Project.MSG_WARN );
> 
> Just a cosmetic thing: The mere "should" is maybe a little bit too weak. 
>  I suggest to clearly state that
> 
> Each remote repository must specify a unique id. For 
> backward-compatibility, a default id will be used. In future releases, a 
> missing repository id will raise an error.
> 
> so that users really update their scripts now.
> 
>> +        {
>> +            MessageDigest md = MessageDigest.getInstance( 
>> MD5_ALGO_NAME );
>> +            md.update( repository.getUrl().getBytes() );
> 
> For reproducibility, better use a fixed encoding like UTF-8 when 
> converting the string into a byte sequence.
> 
> Thanks for fixing this,
> 
> 
> Benjamin
> 
> 
> ---------------------------------------------------------------------
> 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