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/11/29 23:20:08 UTC
Using ant and alternative local repositories with Maven
Hello, Maven experts.
First, let me say I have attempted to search the documentation and the
mailing list archives for the answer to this question. The
documentation seems to say I can't do what I'm trying to do, and there
seems to be no search facility for the mailing list archives.
The requirement:
1. We have a build that uses Maven, and uses the Maven ant
tasks in antlib.
2. One of the tasks copies things out of the local repository
into a release area.
2. We have huge build machines that are capable of running
several builds at a time. We
want to make use of that capacity.
3. We have one generic user account for doing daily/nightly
builds, and want that user
be the one that does all the daily/nightly builds.
4. We want each build to use its own local repository, so that
builds run in parallel
will not interfere with one another.
The problem:
1. The ant tasks in antlib look only in the settings.xml file
at ~/.m2/settings.xml
for settings. That's where you specify the location of the
local repository.
2. There is no other place besides the settings.xml file to
specify the location of a
<localRepository/> (at least, not that I have found, and I
have searched diligently).
3. The localRepository is not one of the things that can be
specified in a <profile/>.
4. The <property/> tag is not permitted in <settings/>.
4. Therefore, as far as I can determine, all builds by a given
user have to use the same
local repository on the same machine, either taking the
default repository location or
the location specified in ~/.m2/settings.xml.
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.
Thanks,
--Marilyn Sander
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Using ant and alternative local repositories with Maven
Posted by Christian Goetze <ch...@sensage.com>.
>
>
>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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org