You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Marilyn Sander -X (marilysa - Digital-X, Inc. at Cisco)" <ma...@cisco.com> on 2006/12/01 01:15:26 UTC

RE: MAVEN_INSTALL_DIR/conf/settings.xml

I tried the suggestion below for invoking Maven and it worked.  I also
defined 
the maven.repo.local property in the ant script for our mixed build,
hoping antlib 
would pick up on it and use the same local repository for the Maven ant
tasks.  No such luck. 

It seems there is no way to pass the location of the local repository to
antlib except through
~/.m2/settings.xml or ~/.m2/ant/settings.xml.  Thus there is no way to
have multiple repositories per user simultaneously.  I will file a JIRA
request for an enhancement.

Meantime, our mixed builds are not scalable at all.  We can do only one
build per user per machine at a time.  I hope the enhancement will come
through fairly quickly.

Thanks,
--Marilyn Sander



> -----Original Message-----
> From: Peter.Pilgrim@ubs.com [mailto:Peter.Pilgrim@ubs.com] 
> Sent: Thursday, November 30, 2006 10:15 AM
> To: users@maven.apache.org
> Subject: RE: MAVEN_INSTALL_DIR/conf/settings.xml
> 
> > -----Original Message-----
> > From: Tom Huybrechts [mailto:tom.huybrechts@gmail.com]
> > Sent: 30 November 2006 13:24
> > To: Maven Users List
> > Subject: Re: MAVEN_INSTALL_DIR/conf/settings.xml
> > 
> > I just tried this on my machine, and it did work.
> > 
> > C:\>mvn clean -Dmaven.repo.local=x:\ -X
> > + Error stacktraces are turned on.
> > Maven version: 2.0.4
> > .....
> > [DEBUG] Exception
> > org.apache.maven.wagon.TransferFailedException: Specified 
> destination 
> > directory cannot be created:
> > x:\org\apache\maven\plugins\maven-clean-plugin
> 
> It works for me too. 
> Ah! The Tilde (~) symbol and the BASH command line
> 
> --
> Peter Pilgrim
> UBS Investment Bank,
> PTS Portal / IT FIRC OPS LDN,
> 100 Liverpool Street, London EC2M 2RH, United Kingdom
> +44 (0) 20 75 75692
> :: Java EE / E-Commerce / Enterprise Integration / Development ::> > 
> 
> Visit our website at http://www.ubs.com
> 
> This message contains confidential information and is 
> intended only for the individual named.  If you are not the 
> named addressee you should not disseminate, distribute or 
> copy this e-mail.  Please notify the sender immediately by 
> e-mail if you have received this e-mail by mistake and delete 
> this e-mail from your system.
> 
> E-mail transmission cannot be guaranteed to be secure or 
> error-free as information could be intercepted, corrupted, 
> lost, destroyed, arrive late or incomplete, or contain 
> viruses.  The sender therefore does not accept liability for 
> any errors or omissions in the contents of this message which 
> arise as a result of e-mail transmission.  If verification is 
> required please request a hard-copy version.  This message is 
> provided for informational purposes and should not be 
> construed as a solicitation or offer to buy or sell any 
> securities or related financial instruments.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

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


RE: MAVEN_INSTALL_DIR/conf/settings.xml

Posted by Pe...@ubs.com.
> -----Original Message-----
> From: Marilyn Sander -X (marilysa - Digital-X, Inc. at Cisco) 
> [mailto:marilysa@cisco.com] 
> Sent: 01 December 2006 00:15
> To: Maven Users List
> Subject: RE: MAVEN_INSTALL_DIR/conf/settings.xml
> 
> I tried the suggestion below for invoking Maven and it 
> worked.  I also defined the maven.repo.local property in the 
> ant script for our mixed build, hoping antlib would pick up 
> on it and use the same local repository for the Maven ant 
> tasks.  No such luck. 
> 
> It seems there is no way to pass the location of the local 
> repository to antlib except through ~/.m2/settings.xml or 
> ~/.m2/ant/settings.xml.  Thus there is no way to have 
> multiple repositories per user simultaneously.  I will file a 
> JIRA request for an enhancement.

Hi Jason et Al

We need to export some important system variables through Maven 2
Ant[Run] 
and Exec similar plugins. Perhaps the developer can devise a way to
create 
or export system variables as environment variables generally through 
Maven core. 

Marilyn

I also worked around this problem by using `sed' on UNIX with a simple
placeholder inside `settings.xml.in'.

I did it in a shell script that called Maven like this

/bin/rm -rf ${XYZ_M2_LOCAL}/settings.xml
sed -e 's,@BUILD_REPO@,'${XYZ_M2_LOCAL_REPO}',g'
src/release-control/settings.xml.in  > ${XYZ_M2_LOCAL}/settings.xml

The settings.xml.in looks like this, of course:

<settings xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <localRepository>@BUILD_REPO@</localRepository>

  <interactiveMode/>
  <usePluginRegistry/>
  ...
</setting>

> 
> Meantime, our mixed builds are not scalable at all.  We can 
> do only one build per user per machine at a time.  I hope the 
> enhancement will come through fairly quickly.
>

 
==////==

--
Peter Pilgrim
UBS Investment Bank, 
PTS Portal / IT FIRC OPS LDN,
100 Liverpool Street, London EC2M 2RH, United Kingdom
+44 (0) 20 75 75692
:: Java EE / E-Commerce / Enterprise Integration / Development ::

Visit our website at http://www.ubs.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


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