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: [email protected]
For additional commands, e-mail: [email protected]