evenisse 2003/10/27 07:58:04
Modified: src/java/org/apache/maven/verifier DependencyVerifier.java
Log:
Fix file url support for dependencies downloading.
We can now use a remote repository on filesystem
maven.remote.repo=file://[hostname]/path_to_repo
Revision Changes Path
1.34 +12 -9 maven/src/java/org/apache/maven/verifier/DependencyVerifier.java
Index: DependencyVerifier.java
===================================================================
RCS file:
/home/cvs/maven/src/java/org/apache/maven/verifier/DependencyVerifier.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- DependencyVerifier.java 27 Oct 2003 13:31:05 -0000 1.33
+++ DependencyVerifier.java 27 Oct 2003 15:58:04 -0000 1.34
@@ -336,15 +336,18 @@
// The username and password parameters are not being
// used here. Those are the "" parameters you see below.
String url = remoteRepo + "/" + artifact.getUrlPath();
- url = StringUtils.replace( url, "//", "/" );
- if ( url.indexOf( "https" ) > 0 )
+ if ( !url.startsWith( "file" ) )
{
- url = StringUtils.replace( url, "https:/", "https://" );
- }
- else
- {
- url = StringUtils.replace( url, "http:/", "http://" );
+ url = StringUtils.replace( url, "//", "/" );
+ if ( url.startsWith( "https" ) )
+ {
+ url = StringUtils.replace( url, "https:/", "https://" );
+ }
+ else
+ {
+ url = StringUtils.replace( url, "http:/", "http://" );
+ }
}
// Attempt to retrieve the artifact and set the checksum if retrieval
@@ -438,4 +441,4 @@
this.ignoreErrors = ignoreErrors;
}
-}
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]