Re: Using ant and alternative local repositories with Maven

2006-11-29 Thread Christian Goetze



If we were not using the Maven ant tasks, there are several ways to
address this matter.  There 
is the -s parameter to Maven, there is the $M2_HOME/conf/settings.xml,
where we could vary 
the value of $M2_HOME according to which build we are doing.  These

mechanisms do not work for
the Maven ant tasks, as those tasks ignore $M2_HOME/conf and have no
access to a -s argument.

Can anyone suggest what to do?  Someone here suggested filing a JIRA
request for enhancement 
to Maven Antlib.  That will take quite awhile, so I'm hoping there
actually is already a way 
to do this and I just haven't found it yet.



 

The way I solve the repository problem is to generate a settings.xml 
file to my taste, then invoke maven with  
-Dorg.apache.maven.global-settings=path-to-my-settings.xml-file

--
cg


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



RE: Using ant and alternative local repositories with Maven

2006-11-29 Thread Marilyn Sander -X \(marilysa - Digital-X, Inc. at Cisco\)
Thanks, Christian,   I tried to adapt your suggestion for my situation,
but that solution does not seem to apply in this case.

I thought maybe properties might get passed thru ant to the Maven ant
task. In the ant script, I set org.apache.maven.global-settings to the
path to my settings file.  The settings file did not get used by the
Maven ant task. So I guess the properties don't get passed down.
Unfortunately, there is no access to the mvn command line when you use
antlib, so I can't pass the property that way.   It all happens under
the covers.

Also, I can't find any specific documentation about the  copy task in
antlib.  I do find on http://maven.apache.org/ant-tasks.html a section
titled Type Reference.  I can't tell whether this is just advisory
about the contents of a settings file or whether it means there is some
way to specify a localRepository as a type somewhere in the invocation
of an ant task. Can someone advise?

Does anyone have another idea?  

Thanks,
--Marilyn

 -Original Message-
 From: Christian Goetze [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, November 29, 2006 3:25 PM
 To: Maven Users List
 Subject: Re: Using ant and alternative local repositories with Maven
 
 
 
 If we were not using the Maven ant tasks, there are several ways to 
 address this matter.  There is the -s parameter to Maven, 
 there is the 
 $M2_HOME/conf/settings.xml, where we could vary the value of 
 $M2_HOME 
 according to which build we are doing.  These mechanisms do not work 
 for the Maven ant tasks, as those tasks ignore $M2_HOME/conf 
 and have 
 no access to a -s argument.
 
 Can anyone suggest what to do?  Someone here suggested filing a JIRA 
 request for enhancement to Maven Antlib.  That will take 
 quite awhile, 
 so I'm hoping there actually is already a way to do this and I just 
 haven't found it yet.
 
 
   
 
 The way I solve the repository problem is to generate a 
 settings.xml file to my taste, then invoke maven with 
 -Dorg.apache.maven.global-settings=path-to-my-settings.xml-file
 --
 cg
 
 
 -
 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]