Thanks for the quick response, John. Perhaps I should have been a bit more clear in my question.

Setting the maven.repo.remote to include my own repository works just fine for Maven (in a manner just as you suggested). But the ant plug-in does not handle anything but the first repository definition (take a look at the plug-in). So an ant build.xml file is generate by the ant plug-in, i.e., with the maven.repo.remote set to multiple repositories, executing:

maven ant

produces a build.xml file which references all dependencies from the first defined repository; the build.xml does not try to get resources from the other remote repositories.

Question is...what's the best way to handle multiple remote respositories so the build.xml files produced by "maven ant" will work properly?


Thanks,


Jan



John Casey wrote:
try modifying your project.properties and/or ~/build.properties (to make
this a global change):

maven.repo.remote=http://www.ibiblio.org/maven,http://your.local.repo/some/path/to/maven

That should do what you want...

-john

On Mon, 2004-02-02 at 15:41, [EMAIL PROTECTED] wrote:

Hi Mavens!

I'm a newbie...I've only played with the tool for a few days now, but I like what I see.

Attached is a little patch to the ant plug-in which adds proxy support to the generated ant build.xml file. I found the patch useful in my environment, and it appears it'll behave nicely in most other environments as well.

I would like to support the use of multiple remote repositories for the ant plug-in. One way to do that is to parse the configuration property for each remote repository, and do ant "<get/>" for each dependency against each defined repository:

maven.repo.remote

Not very nice. And not correct.

A little background...I generate a slew of propietary dependencies which I do not want to publish to Ibiblio. For these dependencies, I use a local "remote repository", and publish these dependencies to my repository. For these dependencies, the ant plug-in generated build.xml file should, therefore, use my repository instead of Ibiblio...but how do we capture? At first I thought I could include repository information in the dependency definition, but that does not seem to be supported. Is that the right approach? And if I modify Maven to do that would the patch be accepted? :)

Alternatively, I could duplicate the Ibiblio repository locally - and maintain the synchronization - and then redefine the maven.repo.remote to only use my local repository. Is that the "proper" approach, and if so what's the best way to keep a local "complete" repository in-synch with Ibiblio?

Any help is much appreciated.


Thanks,


Jan


______________________________________________________________________
Index: src/plugin-resources/templates/build.jelly
===================================================================
RCS file: /home/cvspublic/maven-plugins/ant/src/plugin-resources/templates/build.jelly,v
retrieving revision 1.5
diff -u -p -r1.5 build.jelly
--- src/plugin-resources/templates/build.jelly 16 Oct 2003 07:56:57 -0000 1.5
+++ src/plugin-resources/templates/build.jelly 2 Feb 2004 20:13:19 -0000
@@ -299,7 +299,13 @@
name="get-deps"
depends="init"
unless="noget">
- +
+ <setproxy
+ proxyhost="${maven.proxy.host}"
+ proxyport="${maven.proxy.port}"
+ proxyuser="${maven.proxy.username}"
+ proxypassword="${maven.proxy.password}"/>
+
<j:forEach var="dep" items="${pom.dependencies}">
<!-- note: this is a valid use of artifactDirectory -->
<get



______________________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to