You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Holger Hoffstaette <ho...@googlemail.com> on 2010/11/04 12:39:41 UTC

mvn install to a given local repo path - broken with m3?

I'm trying to install a project to a given local repository path instead
of the default ~/.m2, and it just doesn't seem to work with m3 and
install-plugin 2.3.1. No matter which property I specify (all I could
find, with or without settings. or maven. prefixes :) it always installs
to the default.
Can anybody confirm whether this works or is broken with m3?
Note that I'm talking about the regular install goal, not install-file,
which was apparently fixed at some earlier point.

Grateful for any hints.

Holger



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


Re: mvn install to a given local repo path - broken with m3?

Posted by Wendy Smoak <ws...@gmail.com>.
On Thu, Nov 4, 2010 at 10:51 AM, Holger Hoffstaette
<ho...@googlemail.com> wrote:
> It does seem to stick (so the mechanism does work!), but is not really
> what I was looking for, because now the repo location is also populated with all
> dependencies and plugins..which is correct from a Maven POV but not what I
> wanted. :)
> For context - I'm trying to install only the generated artifacts of a
> multi-module build "somewhere else" and was hoping I could do without an
> explicit copy step.

Oh.  As usual, it does help if you tell us what you're trying to do. ;)

You could probably abuse the assembly plugin and set its output
directory "somewhere else".

Really you're best off building a distribution, (.tar.gz, zip) putting
it in the repository, then retrieving it from there and installing it
where you want.

-- 
Wendy

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


Re: mvn install to a given local repo path - broken with m3?

Posted by Jon Paynter <ki...@gmail.com>.
On Thu, Nov 4, 2010 at 7:51 AM, Holger Hoffstaette <
holger.hoffstaette@googlemail.com> wrote:


> For context - I'm trying to install only the generated artifacts of a
> multi-module build "somewhere else" and was hoping I could do without an
> explicit copy step.
>

That sounds like you want to do a deploy instead of an install

Re: mvn install to a given local repo path - broken with m3?

Posted by Holger Hoffstaette <ho...@googlemail.com>.
On Thu, 04 Nov 2010 10:10:21 -0400, Wendy Smoak wrote:

> On Thu, Nov 4, 2010 at 9:54 AM, Holger Hoffstaette
> <ho...@googlemail.com> wrote:
> 
>> To reproduce, take any project and run: mvn install
>> -DlocalRepository=/some/path
> 
> Have you tried -Dmaven.repo.local=... ?

No, since that one is nowhere (I could find..) documented :-)
It does seem to stick (so the mechanism does work!), but is not really
what I was looking for, because now the repo location is also populated with all
dependencies and plugins..which is correct from a Maven POV but not what I
wanted. :)
For context - I'm trying to install only the generated artifacts of a
multi-module build "somewhere else" and was hoping I could do without an
explicit copy step.

thanks!

Holger



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


Re: mvn install to a given local repo path - broken with m3?

Posted by Wendy Smoak <ws...@gmail.com>.
On Thu, Nov 4, 2010 at 9:54 AM, Holger Hoffstaette
<ho...@googlemail.com> wrote:

> To reproduce, take any project and run:
> mvn install -DlocalRepository=/some/path

Have you tried -Dmaven.repo.local=... ?

-- 
Wendy

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


Re: mvn install to a given local repo path - broken with m3?

Posted by Vincent Latombe <vi...@gmail.com>.
I don't know where you read that -DlocalRepository overrided the local
repository path, but I don't think this has ever worked. As Wendy says, use
-Dmaven.repo.local

Vincent


2010/11/4 Holger Hoffstaette <ho...@googlemail.com>

> On Thu, 04 Nov 2010 13:08:41 +0100, Jochen Wiedmann wrote:
>
> > you aren't writing how you do specify the "local repository path". My
> > assumption would be that you need to use the Maven option -s or
> --settings
> > and use the "localRepository" element in the given settings file, as
> > specified by the settings XSD. [1] Is that what you are doing?
>
> No, I'm doing the much more obvious :-) and try to pass the repo path into
> the comand line invocation. Sorry for not being more clear.
>
> To reproduce, take any project and run:
> mvn install -DlocalRepository=/some/path
>
> ..which is happily ignored and the project is installed into the default
> location (or whatever is defined in settings.xml). But changing the
> settings won't work as this is supposed to be part of an automated build.
>
> The -D value never sticks, regardless of position in the command line or
> platform (tested on Windows and Linux). A trace with -X always shows the
> default local repository being used by the install plugin.
>
> thanks
> Holger
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: mvn install to a given local repo path - broken with m3?

Posted by Holger Hoffstaette <ho...@googlemail.com>.
On Thu, 04 Nov 2010 13:08:41 +0100, Jochen Wiedmann wrote:

> you aren't writing how you do specify the "local repository path". My
> assumption would be that you need to use the Maven option -s or --settings
> and use the "localRepository" element in the given settings file, as
> specified by the settings XSD. [1] Is that what you are doing?

No, I'm doing the much more obvious :-) and try to pass the repo path into
the comand line invocation. Sorry for not being more clear.

To reproduce, take any project and run:
mvn install -DlocalRepository=/some/path

..which is happily ignored and the project is installed into the default
location (or whatever is defined in settings.xml). But changing the
settings won't work as this is supposed to be part of an automated build.

The -D value never sticks, regardless of position in the command line or
platform (tested on Windows and Linux). A trace with -X always shows the
default local repository being used by the install plugin.

thanks
Holger



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


Re: mvn install to a given local repo path - broken with m3?

Posted by Jochen Wiedmann <jo...@gmail.com>.
Hi, Holger,

you aren't writing how you do specify the "local repository path". My
assumption would be that you need to use the Maven option -s or
--settings and use the "localRepository" element in the given settings
file, as specified by the settings XSD. [1] Is that what you are
doing?

Jochen

[1] http://maven.apache.org/xsd/settings-1.0.0.xsd

On Thu, Nov 4, 2010 at 12:39 PM, Holger Hoffstaette
<ho...@googlemail.com> wrote:
>
> I'm trying to install a project to a given local repository path instead
> of the default ~/.m2, and it just doesn't seem to work with m3 and
> install-plugin 2.3.1. No matter which property I specify (all I could
> find, with or without settings. or maven. prefixes :) it always installs
> to the default.
> Can anybody confirm whether this works or is broken with m3?
> Note that I'm talking about the regular install goal, not install-file,
> which was apparently fixed at some earlier point.
>
> Grateful for any hints.
>
> Holger
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



-- 
I Am What I Am And That's All What I Yam (Popeye)

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