You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Pepe Perez <pp...@yahoo.com> on 2010/08/11 19:55:50 UTC

fetch target from remote repo

Hello,

The regular way of operation for maven is to build an artifact and install or 
deploy it into the repo. Is there any way to specify a target to be fetched from 
the remote repo into the local repo instead of building it, since I know that 
it's already deployed?

Another way to look at it, I'm looking for something similar to 
mvn install:install-file -Dfile=your-artifact-1.0.jar
[-DpomFile=your-pom.xml] \
[-DgroupId=org.some.group] \
[-DartifactId=your-artifact] \
[-Dversion=1.0] 

though 
your-artifact-1.0.jar 
is already present in the remote repo so maven would go and fetch it bringing it 
to the local repo

Or yet in other words... when building a target maven downloads all dependencies 
from the remote repo. Is there any way to direct maven to do the same thing with 
the target, fetch vs build?

Thanks!



      


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


Re: fetch target from remote repo

Posted by Ron Wheeler <rw...@artifact-software.com>.
  On 13/08/2010 10:56 AM, Pepe Perez wrote:
> Thanks Ron.
>
> I already have what I was looking for: mvn dependency:resolve (Thanks Paul)
>
>
Great. I wish you the best of luck with your Maven trial.
There is a great bunch of guys here who are very helpful.

Ron

>
> ----- Original Message ----
> From: Ron Wheeler<rw...@artifact-software.com>
> To: users@maven.apache.org
> Sent: Thu, August 12, 2010 10:27:17 PM
> Subject: Re: fetch target from remote repo
>
>    On 12/08/2010 5:50 PM, Pepe Perez wrote:
>> At this first stage I'm using mvn as a repo manager, not as a build tool...
>> so an operation on a target is not building it, but download it from the
> remote
>> repo. Specifically, my targets are tgz files; when running mvn I'd want my
>> target to be downloaded from the remote repo along with all its dependencies,
>> so
>> I can extract contents on my machine (i.e, install it on my machine along with
>> all pre-required pkgs). This is similar to what yum or rpm does, though mvn is
>> more convenient at this point because it will also build my targets when "we
>> use
>> it properly"
>>
> All you need is an assembly. It will make an archive (tar,tgz,zip) from
> its dependencies.
> http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html
>
> Set up a repo - I recommend nexus but you will find supporters for other
> solutions.
>
> Set up your deployment plug-ins in a parent pom that every module
> references so you don't have to duplicate this in each module.
>
> Set up your repo mirrors in each programmer's settings.xml to point to
> your repo so you manage all of your dependency sources in one place -
> the repo configuration.
>
> Set up your project and module POMs to build what you need - jars, wars,
> tgz, zips, etc. from source code and dependencies.
>
> In a day or two, you are ready to fly.
>
> Maven really does everything that a "normal" software development team
> needs.
> Don't try too hard to find the hard way to do things.
> When asking questions, if you are more focused about what you actually
> want to accomplish rather than asking about technical details, you will
> get better answers much faster.
>
>
> Ron
>> ----- Original Message ----
>> From: Ron Wheeler<rw...@artifact-software.com>
>> To: users@maven.apache.org
>> Sent: Thu, August 12, 2010 2:38:14 PM
>> Subject: Re: fetch target from remote repo
>>
>>     On 12/08/2010 3:45 PM, Pepe Perez wrote:
>>> To show how maven can do out-of-the-box what our custom app does I'm starting
>>> my
>>> prototype by showing how maven can upload and download to/from both a remote
>>> repo and a local repo, though in this first stage I won't build my targets.
>> So,
>>> I deploy my target and dependencies using deploy:deploy-file. Now I want to
>>> retrieve these pkgs from the remote repo into my local repo; by running "mvn
>>> install" maven will download my dependencies (good, this is what I want) but
>>> will try to build the target. I don't want to build the target, the target is
>>> already in the remote repo and I just want to fetch it into my local repo,
>> this
>>> is my issue. I agree that you normally don't do this, you want to use maven
>> for
>>> building, not for repository management. We'll eventually do this, but like I
>>> said, in this first stage I'll just show that for repo management mvn can
>>> easily
>>> replace our complex custom app .
>>>
>>>
>> I agree with you approach. Does your IDE support Maven so you don't have
>> to use mvn commands?
>> We use Eclipse and never mvn anything. It is all done for us automatically.
>>
>> If your "target" is already built and in your main repo and you don't
>> need to use it, why do you want to download it to your PC?
>>
>> Why not just have it downloaded naturally when someone needs it to build
>> something (another artifact, a distribution, etc.)? When maven needs
>> something to build something it will find it and download it only once.
>>
>> If you can be more specific about what targets you are working with and
>> how you currently organize your workflow, you might get some better help
>> from more experience people than me. If you are building something that
>> runs on a computer, somebody here has built something just like it.
>>
>> You are in good hands here.
>>
>> Ron
>>> ----- Original Message ----
>>> From: Ron Wheeler<rw...@artifact-software.com>
>>> To: Maven Users List<us...@maven.apache.org>
>>> Cc: Pepe Perez<pp...@yahoo.com>
>>> Sent: Thu, August 12, 2010 12:14:33 PM
>>> Subject: Re: fetch target from remote repo
>>>
>>>      On 12/08/2010 2:57 PM, Pepe Perez wrote:
>>>> Yes, we need both.
>>>>
>>>> Our current app deploys to a distribution repo, I'll get this behavior with
>>>> maven using mvn deploy:deploy-file as you also suggest
>>>> It also installs (fetch) to the local machine. I'll get this behavior with
>>>> maven
>>>> using maven-install-plugin:copy (which will fetch my target from the
>>> deployment
>>>> repo into a convenient location) + maven-install-plugin:install-file (which
>>>> will
>>>> store it in the local repo along with the pom)
>>>>
>>>>
>>> It is still not clear why the standard Maven behaviour is not exactly
>>> what you need.
>>> Maven will deploy releases and SNAPSHOTS to your main repository
>>> automatically (with access controls, of course) and will automatically
>>> download what a developer needs to build up a local cache on his/her
>>> workstation.
>>>
>>> This is all default activity "out of the box" and works very well and
>>> for the most part completely transparently from the developer's point of
>>> view.
>>>
>>> You merely set up the Repo (Nexus works well - see their www site and
>>> forums for details), define it as a mirror for all repositories in the
>>> maven settings that each user has (with user names and passwords for
>>> their accounts).
>>> For each application, define the repo's deployment characteristics in
>>> the parent pom which is refered to by each module's pom and your
>>> developers are set to go.
>>>
>>> What more do you need?
>>>
>>> Ron
>>>
>>>
>>>> ----- Original Message ----
>>>> From: Anders Hammar<an...@hammar.net>
>>>> To: Maven Users List<us...@maven.apache.org>
>>>> Sent: Thu, August 12, 2010 11:44:24 AM
>>>> Subject: Re: fetch target from remote repo
>>>>
>>>> Whatever works for you. However, the maven-install-plugin only works on the
>>>> local repo. Wouldn't you want to deploy to a real repo such as one in a repo
>>>> manager (maven-deploy-plugin)?
>>>>
>>>> /Anders
>>>> On Thu, Aug 12, 2010 at 20:26, Pepe Perez<pp...@yahoo.com>     wrote:
>>>>
>>>>> Thanks Anders.
>>>>>
>>>>> I wanted more something ready-to-use. I finally went for using plugins
>>>>> maven-install-plugin:copy + maven-install-plugin:install-file. It's not
>>>>> optimally clean, but will do the trick for now.
>>>>>
>>>>> Thanks!
>>>>>
>>>>>
>>>>>
>>>>> ----- Original Message ----
>>>>> From: Anders Hammar<an...@hammar.net>
>>>>> To: Maven Users List<us...@maven.apache.org>
>>>>> Sent: Wed, August 11, 2010 12:01:26 PM
>>>>> Subject: Re: fetch target from remote repo
>>>>>
>>>>> Ah, I believe this is a good use case for Aether. Read more here:
>>>>> http://www.sonatype.com/people/category/aether/
>>>>>
>>>>> /Anders
>>>>>
>>>>> On Wed, Aug 11, 2010 at 20:56, Pepe Perez<pp...@yahoo.com>     wrote:
>>>>>
>>>>>> We have a big complex custom application that does similar things to what
>>>>>> maven
>>>>>> does out-of-the-box, I'm evaluating if we could use maven instead. One of
>>>>>> the
>>>>>> things our custom app does is to manage a distribution repo in which you
>>>>>> can
>>>>>> request a pkg to be fetched into your machine along with its
>>>>> dependencies.
>>>>>> I was
>>>>>> thinking of using maven to do this, I know managing a repo is not at all
>>>>>> the
>>>>>> main purpose of maven, but for the purpose of building maven does manage
>>>>>> repos
>>>>>> so I wanted to take advantage of this to build the replacement of our app
>>>>>> starting from here.
>>>>>>
>>>>>> This works very nicely with dependencies, trying to build a target will
>>>>>> fetch
>>>>>> dependencies from the repo and set them into the local repo, this is
>>>>>> equivalent
>>>>>> to the request we do through our app. But in the case of the target
>>>>> itself
>>>>>> maven
>>>>>> will try to build it, though what I'd need is it to be fetched from the
>>>>>> repo
>>>>>> too.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ----- Original Message ----
>>>>>> From: Anders Hammar<an...@hammar.net>
>>>>>> To: Maven Users List<us...@maven.apache.org>
>>>>>> Sent: Wed, August 11, 2010 11:42:29 AM
>>>>>> Subject: Re: fetch target from remote repo
>>>>>>
>>>>>> I don't quite follow. What is it that you want to achieve? Surely the
>>>>> main
>>>>>> purpose is not only to have the artifact installed in the local repo, but
>>>>>> you want to do what? Maybe: Use it from some other project? Use it in
>>>>> some
>>>>>> IDE? Have a look in the jar? Telling us this will help you on the right
>>>>>> track as your current question doesn't make sense (to me at least).
>>>>>>
>>>>>> /Anders
>>>>>>
>>>>>> On Wed, Aug 11, 2010 at 19:55, Pepe Perez<pp...@yahoo.com>     wrote:
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> The regular way of operation for maven is to build an artifact and
>>>>>> install
>>>>>>> or
>>>>>>> deploy it into the repo. Is there any way to specify a target to be
>>>>>> fetched
>>>>>>> from
>>>>>>> the remote repo into the local repo instead of building it, since I
>>>>> know
>>>>>>> that
>>>>>>> it's already deployed?
>>>>>>>
>>>>>>> Another way to look at it, I'm looking for something similar to
>>>>>>> mvn install:install-file -Dfile=your-artifact-1.0.jar
>>>>>>> [-DpomFile=your-pom.xml] \
>>>>>>> [-DgroupId=org.some.group] \
>>>>>>> [-DartifactId=your-artifact] \
>>>>>>> [-Dversion=1.0]
>>>>>>>
>>>>>>> though
>>>>>>> your-artifact-1.0.jar
>>>>>>> is already present in the remote repo so maven would go and fetch it
>>>>>>> bringing it
>>>>>>> to the local repo
>>>>>>>
>>>>>>> Or yet in other words... when building a target maven downloads all
>>>>>>> dependencies
>>>>>>> from the remote repo. Is there any way to direct maven to do the same
>>>>>> thing
>>>>>>> with
>>>>>>> the target, fetch vs build?
>>>>>>>
>>>>>>> Thanks!
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> 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
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> 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
>>>
>>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>
> ---------------------------------------------------------------------
> 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
>
>


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


Re: fetch target from remote repo

Posted by Pepe Perez <pp...@yahoo.com>.
Thanks Ron.

I already have what I was looking for: mvn dependency:resolve (Thanks Paul)




----- Original Message ----
From: Ron Wheeler <rw...@artifact-software.com>
To: users@maven.apache.org
Sent: Thu, August 12, 2010 10:27:17 PM
Subject: Re: fetch target from remote repo

  On 12/08/2010 5:50 PM, Pepe Perez wrote:
> At this first stage I'm using mvn as a repo manager, not as a build tool...
> so an operation on a target is not building it, but download it from the 
remote
> repo. Specifically, my targets are tgz files; when running mvn I'd want my
> target to be downloaded from the remote repo along with all its dependencies, 
>so
> I can extract contents on my machine (i.e, install it on my machine along with
> all pre-required pkgs). This is similar to what yum or rpm does, though mvn is
> more convenient at this point because it will also build my targets when "we 
>use
> it properly"
>
All you need is an assembly. It will make an archive (tar,tgz,zip) from 
its dependencies.
http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html

Set up a repo - I recommend nexus but you will find supporters for other 
solutions.

Set up your deployment plug-ins in a parent pom that every module 
references so you don't have to duplicate this in each module.

Set up your repo mirrors in each programmer's settings.xml to point to 
your repo so you manage all of your dependency sources in one place - 
the repo configuration.

Set up your project and module POMs to build what you need - jars, wars, 
tgz, zips, etc. from source code and dependencies.

In a day or two, you are ready to fly.

Maven really does everything that a "normal" software development team 
needs.
Don't try too hard to find the hard way to do things.
When asking questions, if you are more focused about what you actually 
want to accomplish rather than asking about technical details, you will 
get better answers much faster.


Ron
>
> ----- Original Message ----
> From: Ron Wheeler<rw...@artifact-software.com>
> To: users@maven.apache.org
> Sent: Thu, August 12, 2010 2:38:14 PM
> Subject: Re: fetch target from remote repo
>
>    On 12/08/2010 3:45 PM, Pepe Perez wrote:
>> To show how maven can do out-of-the-box what our custom app does I'm starting
>> my
>> prototype by showing how maven can upload and download to/from both a remote
>> repo and a local repo, though in this first stage I won't build my targets.
> So,
>> I deploy my target and dependencies using deploy:deploy-file. Now I want to
>> retrieve these pkgs from the remote repo into my local repo; by running "mvn
>> install" maven will download my dependencies (good, this is what I want) but
>> will try to build the target. I don't want to build the target, the target is
>> already in the remote repo and I just want to fetch it into my local repo,
> this
>> is my issue. I agree that you normally don't do this, you want to use maven
> for
>> building, not for repository management. We'll eventually do this, but like I
>> said, in this first stage I'll just show that for repo management mvn can
>> easily
>> replace our complex custom app .
>>
>>
> I agree with you approach. Does your IDE support Maven so you don't have
> to use mvn commands?
> We use Eclipse and never mvn anything. It is all done for us automatically.
>
> If your "target" is already built and in your main repo and you don't
> need to use it, why do you want to download it to your PC?
>
> Why not just have it downloaded naturally when someone needs it to build
> something (another artifact, a distribution, etc.)? When maven needs
> something to build something it will find it and download it only once.
>
> If you can be more specific about what targets you are working with and
> how you currently organize your workflow, you might get some better help
> from more experience people than me. If you are building something that
> runs on a computer, somebody here has built something just like it.
>
> You are in good hands here.
>
> Ron
>> ----- Original Message ----
>> From: Ron Wheeler<rw...@artifact-software.com>
>> To: Maven Users List<us...@maven.apache.org>
>> Cc: Pepe Perez<pp...@yahoo.com>
>> Sent: Thu, August 12, 2010 12:14:33 PM
>> Subject: Re: fetch target from remote repo
>>
>>     On 12/08/2010 2:57 PM, Pepe Perez wrote:
>>> Yes, we need both.
>>>
>>> Our current app deploys to a distribution repo, I'll get this behavior with
>>> maven using mvn deploy:deploy-file as you also suggest
>>> It also installs (fetch) to the local machine. I'll get this behavior with
>>> maven
>>> using maven-install-plugin:copy (which will fetch my target from the
>> deployment
>>> repo into a convenient location) + maven-install-plugin:install-file (which
>>> will
>>> store it in the local repo along with the pom)
>>>
>>>
>> It is still not clear why the standard Maven behaviour is not exactly
>> what you need.
>> Maven will deploy releases and SNAPSHOTS to your main repository
>> automatically (with access controls, of course) and will automatically
>> download what a developer needs to build up a local cache on his/her
>> workstation.
>>
>> This is all default activity "out of the box" and works very well and
>> for the most part completely transparently from the developer's point of
>> view.
>>
>> You merely set up the Repo (Nexus works well - see their www site and
>> forums for details), define it as a mirror for all repositories in the
>> maven settings that each user has (with user names and passwords for
>> their accounts).
>> For each application, define the repo's deployment characteristics in
>> the parent pom which is refered to by each module's pom and your
>> developers are set to go.
>>
>> What more do you need?
>>
>> Ron
>>
>>
>>> ----- Original Message ----
>>> From: Anders Hammar<an...@hammar.net>
>>> To: Maven Users List<us...@maven.apache.org>
>>> Sent: Thu, August 12, 2010 11:44:24 AM
>>> Subject: Re: fetch target from remote repo
>>>
>>> Whatever works for you. However, the maven-install-plugin only works on the
>>> local repo. Wouldn't you want to deploy to a real repo such as one in a repo
>>> manager (maven-deploy-plugin)?
>>>
>>> /Anders
>>> On Thu, Aug 12, 2010 at 20:26, Pepe Perez<pp...@yahoo.com>    wrote:
>>>
>>>> Thanks Anders.
>>>>
>>>> I wanted more something ready-to-use. I finally went for using plugins
>>>> maven-install-plugin:copy + maven-install-plugin:install-file. It's not
>>>> optimally clean, but will do the trick for now.
>>>>
>>>> Thanks!
>>>>
>>>>
>>>>
>>>> ----- Original Message ----
>>>> From: Anders Hammar<an...@hammar.net>
>>>> To: Maven Users List<us...@maven.apache.org>
>>>> Sent: Wed, August 11, 2010 12:01:26 PM
>>>> Subject: Re: fetch target from remote repo
>>>>
>>>> Ah, I believe this is a good use case for Aether. Read more here:
>>>> http://www.sonatype.com/people/category/aether/
>>>>
>>>> /Anders
>>>>
>>>> On Wed, Aug 11, 2010 at 20:56, Pepe Perez<pp...@yahoo.com>    wrote:
>>>>
>>>>> We have a big complex custom application that does similar things to what
>>>>> maven
>>>>> does out-of-the-box, I'm evaluating if we could use maven instead. One of
>>>>> the
>>>>> things our custom app does is to manage a distribution repo in which you
>>>>> can
>>>>> request a pkg to be fetched into your machine along with its
>>>> dependencies.
>>>>> I was
>>>>> thinking of using maven to do this, I know managing a repo is not at all
>>>>> the
>>>>> main purpose of maven, but for the purpose of building maven does manage
>>>>> repos
>>>>> so I wanted to take advantage of this to build the replacement of our app
>>>>> starting from here.
>>>>>
>>>>> This works very nicely with dependencies, trying to build a target will
>>>>> fetch
>>>>> dependencies from the repo and set them into the local repo, this is
>>>>> equivalent
>>>>> to the request we do through our app. But in the case of the target
>>>> itself
>>>>> maven
>>>>> will try to build it, though what I'd need is it to be fetched from the
>>>>> repo
>>>>> too.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ----- Original Message ----
>>>>> From: Anders Hammar<an...@hammar.net>
>>>>> To: Maven Users List<us...@maven.apache.org>
>>>>> Sent: Wed, August 11, 2010 11:42:29 AM
>>>>> Subject: Re: fetch target from remote repo
>>>>>
>>>>> I don't quite follow. What is it that you want to achieve? Surely the
>>>> main
>>>>> purpose is not only to have the artifact installed in the local repo, but
>>>>> you want to do what? Maybe: Use it from some other project? Use it in
>>>> some
>>>>> IDE? Have a look in the jar? Telling us this will help you on the right
>>>>> track as your current question doesn't make sense (to me at least).
>>>>>
>>>>> /Anders
>>>>>
>>>>> On Wed, Aug 11, 2010 at 19:55, Pepe Perez<pp...@yahoo.com>    wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> The regular way of operation for maven is to build an artifact and
>>>>> install
>>>>>> or
>>>>>> deploy it into the repo. Is there any way to specify a target to be
>>>>> fetched
>>>>>> from
>>>>>> the remote repo into the local repo instead of building it, since I
>>>> know
>>>>>> that
>>>>>> it's already deployed?
>>>>>>
>>>>>> Another way to look at it, I'm looking for something similar to
>>>>>> mvn install:install-file -Dfile=your-artifact-1.0.jar
>>>>>> [-DpomFile=your-pom.xml] \
>>>>>> [-DgroupId=org.some.group] \
>>>>>> [-DartifactId=your-artifact] \
>>>>>> [-Dversion=1.0]
>>>>>>
>>>>>> though
>>>>>> your-artifact-1.0.jar
>>>>>> is already present in the remote repo so maven would go and fetch it
>>>>>> bringing it
>>>>>> to the local repo
>>>>>>
>>>>>> Or yet in other words... when building a target maven downloads all
>>>>>> dependencies
>>>>>> from the remote repo. Is there any way to direct maven to do the same
>>>>> thing
>>>>>> with
>>>>>> the target, fetch vs build?
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> 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
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>
> ---------------------------------------------------------------------
> 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
>
>


---------------------------------------------------------------------
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: fetch target from remote repo

Posted by Ron Wheeler <rw...@artifact-software.com>.
  On 12/08/2010 5:50 PM, Pepe Perez wrote:
> At this first stage I'm using mvn as a repo manager, not as a build tool...
> so an operation on a target is not building it, but download it from the remote
> repo. Specifically, my targets are tgz files; when running mvn I'd want my
> target to be downloaded from the remote repo along with all its dependencies, so
> I can extract contents on my machine (i.e, install it on my machine along with
> all pre-required pkgs). This is similar to what yum or rpm does, though mvn is
> more convenient at this point because it will also build my targets when "we use
> it properly"
>
All you need is an assembly. It will make an archive (tar,tgz,zip) from 
its dependencies.
http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html

Set up a repo - I recommend nexus but you will find supporters for other 
solutions.

Set up your deployment plug-ins in a parent pom that every module 
references so you don't have to duplicate this in each module.

Set up your repo mirrors in each programmer's settings.xml to point to 
your repo so you manage all of your dependency sources in one place - 
the repo configuration.

Set up your project and module POMs to build what you need - jars, wars, 
tgz, zips, etc. from source code and dependencies.

In a day or two, you are ready to fly.

Maven really does everything that a "normal" software development team 
needs.
Don't try too hard to find the hard way to do things.
When asking questions, if you are more focused about what you actually 
want to accomplish rather than asking about technical details, you will 
get better answers much faster.


Ron
>
> ----- Original Message ----
> From: Ron Wheeler<rw...@artifact-software.com>
> To: users@maven.apache.org
> Sent: Thu, August 12, 2010 2:38:14 PM
> Subject: Re: fetch target from remote repo
>
>    On 12/08/2010 3:45 PM, Pepe Perez wrote:
>> To show how maven can do out-of-the-box what our custom app does I'm starting
>> my
>> prototype by showing how maven can upload and download to/from both a remote
>> repo and a local repo, though in this first stage I won't build my targets.
> So,
>> I deploy my target and dependencies using deploy:deploy-file. Now I want to
>> retrieve these pkgs from the remote repo into my local repo; by running "mvn
>> install" maven will download my dependencies (good, this is what I want) but
>> will try to build the target. I don't want to build the target, the target is
>> already in the remote repo and I just want to fetch it into my local repo,
> this
>> is my issue. I agree that you normally don't do this, you want to use maven
> for
>> building, not for repository management. We'll eventually do this, but like I
>> said, in this first stage I'll just show that for repo management mvn can
>> easily
>> replace our complex custom app .
>>
>>
> I agree with you approach. Does your IDE support Maven so you don't have
> to use mvn commands?
> We use Eclipse and never mvn anything. It is all done for us automatically.
>
> If your "target" is already built and in your main repo and you don't
> need to use it, why do you want to download it to your PC?
>
> Why not just have it downloaded naturally when someone needs it to build
> something (another artifact, a distribution, etc.)? When maven needs
> something to build something it will find it and download it only once.
>
> If you can be more specific about what targets you are working with and
> how you currently organize your workflow, you might get some better help
> from more experience people than me. If you are building something that
> runs on a computer, somebody here has built something just like it.
>
> You are in good hands here.
>
> Ron
>> ----- Original Message ----
>> From: Ron Wheeler<rw...@artifact-software.com>
>> To: Maven Users List<us...@maven.apache.org>
>> Cc: Pepe Perez<pp...@yahoo.com>
>> Sent: Thu, August 12, 2010 12:14:33 PM
>> Subject: Re: fetch target from remote repo
>>
>>     On 12/08/2010 2:57 PM, Pepe Perez wrote:
>>> Yes, we need both.
>>>
>>> Our current app deploys to a distribution repo, I'll get this behavior with
>>> maven using mvn deploy:deploy-file as you also suggest
>>> It also installs (fetch) to the local machine. I'll get this behavior with
>>> maven
>>> using maven-install-plugin:copy (which will fetch my target from the
>> deployment
>>> repo into a convenient location) + maven-install-plugin:install-file (which
>>> will
>>> store it in the local repo along with the pom)
>>>
>>>
>> It is still not clear why the standard Maven behaviour is not exactly
>> what you need.
>> Maven will deploy releases and SNAPSHOTS to your main repository
>> automatically (with access controls, of course) and will automatically
>> download what a developer needs to build up a local cache on his/her
>> workstation.
>>
>> This is all default activity "out of the box" and works very well and
>> for the most part completely transparently from the developer's point of
>> view.
>>
>> You merely set up the Repo (Nexus works well - see their www site and
>> forums for details), define it as a mirror for all repositories in the
>> maven settings that each user has (with user names and passwords for
>> their accounts).
>> For each application, define the repo's deployment characteristics in
>> the parent pom which is refered to by each module's pom and your
>> developers are set to go.
>>
>> What more do you need?
>>
>> Ron
>>
>>
>>> ----- Original Message ----
>>> From: Anders Hammar<an...@hammar.net>
>>> To: Maven Users List<us...@maven.apache.org>
>>> Sent: Thu, August 12, 2010 11:44:24 AM
>>> Subject: Re: fetch target from remote repo
>>>
>>> Whatever works for you. However, the maven-install-plugin only works on the
>>> local repo. Wouldn't you want to deploy to a real repo such as one in a repo
>>> manager (maven-deploy-plugin)?
>>>
>>> /Anders
>>> On Thu, Aug 12, 2010 at 20:26, Pepe Perez<pp...@yahoo.com>    wrote:
>>>
>>>> Thanks Anders.
>>>>
>>>> I wanted more something ready-to-use. I finally went for using plugins
>>>> maven-install-plugin:copy + maven-install-plugin:install-file. It's not
>>>> optimally clean, but will do the trick for now.
>>>>
>>>> Thanks!
>>>>
>>>>
>>>>
>>>> ----- Original Message ----
>>>> From: Anders Hammar<an...@hammar.net>
>>>> To: Maven Users List<us...@maven.apache.org>
>>>> Sent: Wed, August 11, 2010 12:01:26 PM
>>>> Subject: Re: fetch target from remote repo
>>>>
>>>> Ah, I believe this is a good use case for Aether. Read more here:
>>>> http://www.sonatype.com/people/category/aether/
>>>>
>>>> /Anders
>>>>
>>>> On Wed, Aug 11, 2010 at 20:56, Pepe Perez<pp...@yahoo.com>    wrote:
>>>>
>>>>> We have a big complex custom application that does similar things to what
>>>>> maven
>>>>> does out-of-the-box, I'm evaluating if we could use maven instead. One of
>>>>> the
>>>>> things our custom app does is to manage a distribution repo in which you
>>>>> can
>>>>> request a pkg to be fetched into your machine along with its
>>>> dependencies.
>>>>> I was
>>>>> thinking of using maven to do this, I know managing a repo is not at all
>>>>> the
>>>>> main purpose of maven, but for the purpose of building maven does manage
>>>>> repos
>>>>> so I wanted to take advantage of this to build the replacement of our app
>>>>> starting from here.
>>>>>
>>>>> This works very nicely with dependencies, trying to build a target will
>>>>> fetch
>>>>> dependencies from the repo and set them into the local repo, this is
>>>>> equivalent
>>>>> to the request we do through our app. But in the case of the target
>>>> itself
>>>>> maven
>>>>> will try to build it, though what I'd need is it to be fetched from the
>>>>> repo
>>>>> too.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ----- Original Message ----
>>>>> From: Anders Hammar<an...@hammar.net>
>>>>> To: Maven Users List<us...@maven.apache.org>
>>>>> Sent: Wed, August 11, 2010 11:42:29 AM
>>>>> Subject: Re: fetch target from remote repo
>>>>>
>>>>> I don't quite follow. What is it that you want to achieve? Surely the
>>>> main
>>>>> purpose is not only to have the artifact installed in the local repo, but
>>>>> you want to do what? Maybe: Use it from some other project? Use it in
>>>> some
>>>>> IDE? Have a look in the jar? Telling us this will help you on the right
>>>>> track as your current question doesn't make sense (to me at least).
>>>>>
>>>>> /Anders
>>>>>
>>>>> On Wed, Aug 11, 2010 at 19:55, Pepe Perez<pp...@yahoo.com>    wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> The regular way of operation for maven is to build an artifact and
>>>>> install
>>>>>> or
>>>>>> deploy it into the repo. Is there any way to specify a target to be
>>>>> fetched
>>>>>> from
>>>>>> the remote repo into the local repo instead of building it, since I
>>>> know
>>>>>> that
>>>>>> it's already deployed?
>>>>>>
>>>>>> Another way to look at it, I'm looking for something similar to
>>>>>> mvn install:install-file -Dfile=your-artifact-1.0.jar
>>>>>> [-DpomFile=your-pom.xml] \
>>>>>> [-DgroupId=org.some.group] \
>>>>>> [-DartifactId=your-artifact] \
>>>>>> [-Dversion=1.0]
>>>>>>
>>>>>> though
>>>>>> your-artifact-1.0.jar
>>>>>> is already present in the remote repo so maven would go and fetch it
>>>>>> bringing it
>>>>>> to the local repo
>>>>>>
>>>>>> Or yet in other words... when building a target maven downloads all
>>>>>> dependencies
>>>>>> from the remote repo. Is there any way to direct maven to do the same
>>>>> thing
>>>>>> with
>>>>>> the target, fetch vs build?
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> 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
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>
> ---------------------------------------------------------------------
> 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
>
>


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


Re: fetch target from remote repo

Posted by Pepe Perez <pp...@yahoo.com>.
At this first stage I'm using mvn as a repo manager, not as a build tool...
so an operation on a target is not building it, but download it from the remote 
repo. Specifically, my targets are tgz files; when running mvn I'd want my 
target to be downloaded from the remote repo along with all its dependencies, so 
I can extract contents on my machine (i.e, install it on my machine along with 
all pre-required pkgs). This is similar to what yum or rpm does, though mvn is 
more convenient at this point because it will also build my targets when "we use 
it properly"



----- Original Message ----
From: Ron Wheeler <rw...@artifact-software.com>
To: users@maven.apache.org
Sent: Thu, August 12, 2010 2:38:14 PM
Subject: Re: fetch target from remote repo

  On 12/08/2010 3:45 PM, Pepe Perez wrote:
> To show how maven can do out-of-the-box what our custom app does I'm starting 
>my
> prototype by showing how maven can upload and download to/from both a remote
> repo and a local repo, though in this first stage I won't build my targets. 
So,
> I deploy my target and dependencies using deploy:deploy-file. Now I want to
> retrieve these pkgs from the remote repo into my local repo; by running "mvn
> install" maven will download my dependencies (good, this is what I want) but
> will try to build the target. I don't want to build the target, the target is
> already in the remote repo and I just want to fetch it into my local repo, 
this
> is my issue. I agree that you normally don't do this, you want to use maven 
for
> building, not for repository management. We'll eventually do this, but like I
> said, in this first stage I'll just show that for repo management mvn can 
>easily
> replace our complex custom app .
>
>
I agree with you approach. Does your IDE support Maven so you don't have 
to use mvn commands?
We use Eclipse and never mvn anything. It is all done for us automatically.

If your "target" is already built and in your main repo and you don't 
need to use it, why do you want to download it to your PC?

Why not just have it downloaded naturally when someone needs it to build 
something (another artifact, a distribution, etc.)? When maven needs 
something to build something it will find it and download it only once.

If you can be more specific about what targets you are working with and 
how you currently organize your workflow, you might get some better help 
from more experience people than me. If you are building something that  
runs on a computer, somebody here has built something just like it.

You are in good hands here.

Ron
> ----- Original Message ----
> From: Ron Wheeler<rw...@artifact-software.com>
> To: Maven Users List<us...@maven.apache.org>
> Cc: Pepe Perez<pp...@yahoo.com>
> Sent: Thu, August 12, 2010 12:14:33 PM
> Subject: Re: fetch target from remote repo
>
>    On 12/08/2010 2:57 PM, Pepe Perez wrote:
>> Yes, we need both.
>>
>> Our current app deploys to a distribution repo, I'll get this behavior with
>> maven using mvn deploy:deploy-file as you also suggest
>> It also installs (fetch) to the local machine. I'll get this behavior with
>> maven
>> using maven-install-plugin:copy (which will fetch my target from the
> deployment
>> repo into a convenient location) + maven-install-plugin:install-file (which
>> will
>> store it in the local repo along with the pom)
>>
>>
> It is still not clear why the standard Maven behaviour is not exactly
> what you need.
> Maven will deploy releases and SNAPSHOTS to your main repository
> automatically (with access controls, of course) and will automatically
> download what a developer needs to build up a local cache on his/her
> workstation.
>
> This is all default activity "out of the box" and works very well and
> for the most part completely transparently from the developer's point of
> view.
>
> You merely set up the Repo (Nexus works well - see their www site and
> forums for details), define it as a mirror for all repositories in the
> maven settings that each user has (with user names and passwords for
> their accounts).
> For each application, define the repo's deployment characteristics in
> the parent pom which is refered to by each module's pom and your
> developers are set to go.
>
> What more do you need?
>
> Ron
>
>
>> ----- Original Message ----
>> From: Anders Hammar<an...@hammar.net>
>> To: Maven Users List<us...@maven.apache.org>
>> Sent: Thu, August 12, 2010 11:44:24 AM
>> Subject: Re: fetch target from remote repo
>>
>> Whatever works for you. However, the maven-install-plugin only works on the
>> local repo. Wouldn't you want to deploy to a real repo such as one in a repo
>> manager (maven-deploy-plugin)?
>>
>> /Anders
>> On Thu, Aug 12, 2010 at 20:26, Pepe Perez<pp...@yahoo.com>   wrote:
>>
>>> Thanks Anders.
>>>
>>> I wanted more something ready-to-use. I finally went for using plugins
>>> maven-install-plugin:copy + maven-install-plugin:install-file. It's not
>>> optimally clean, but will do the trick for now.
>>>
>>> Thanks!
>>>
>>>
>>>
>>> ----- Original Message ----
>>> From: Anders Hammar<an...@hammar.net>
>>> To: Maven Users List<us...@maven.apache.org>
>>> Sent: Wed, August 11, 2010 12:01:26 PM
>>> Subject: Re: fetch target from remote repo
>>>
>>> Ah, I believe this is a good use case for Aether. Read more here:
>>> http://www.sonatype.com/people/category/aether/
>>>
>>> /Anders
>>>
>>> On Wed, Aug 11, 2010 at 20:56, Pepe Perez<pp...@yahoo.com>   wrote:
>>>
>>>> We have a big complex custom application that does similar things to what
>>>> maven
>>>> does out-of-the-box, I'm evaluating if we could use maven instead. One of
>>>> the
>>>> things our custom app does is to manage a distribution repo in which you
>>>> can
>>>> request a pkg to be fetched into your machine along with its
>>> dependencies.
>>>> I was
>>>> thinking of using maven to do this, I know managing a repo is not at all
>>>> the
>>>> main purpose of maven, but for the purpose of building maven does manage
>>>> repos
>>>> so I wanted to take advantage of this to build the replacement of our app
>>>> starting from here.
>>>>
>>>> This works very nicely with dependencies, trying to build a target will
>>>> fetch
>>>> dependencies from the repo and set them into the local repo, this is
>>>> equivalent
>>>> to the request we do through our app. But in the case of the target
>>> itself
>>>> maven
>>>> will try to build it, though what I'd need is it to be fetched from the
>>>> repo
>>>> too.
>>>>
>>>>
>>>>
>>>>
>>>> ----- Original Message ----
>>>> From: Anders Hammar<an...@hammar.net>
>>>> To: Maven Users List<us...@maven.apache.org>
>>>> Sent: Wed, August 11, 2010 11:42:29 AM
>>>> Subject: Re: fetch target from remote repo
>>>>
>>>> I don't quite follow. What is it that you want to achieve? Surely the
>>> main
>>>> purpose is not only to have the artifact installed in the local repo, but
>>>> you want to do what? Maybe: Use it from some other project? Use it in
>>> some
>>>> IDE? Have a look in the jar? Telling us this will help you on the right
>>>> track as your current question doesn't make sense (to me at least).
>>>>
>>>> /Anders
>>>>
>>>> On Wed, Aug 11, 2010 at 19:55, Pepe Perez<pp...@yahoo.com>   wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> The regular way of operation for maven is to build an artifact and
>>>> install
>>>>> or
>>>>> deploy it into the repo. Is there any way to specify a target to be
>>>> fetched
>>>>> from
>>>>> the remote repo into the local repo instead of building it, since I
>>> know
>>>>> that
>>>>> it's already deployed?
>>>>>
>>>>> Another way to look at it, I'm looking for something similar to
>>>>> mvn install:install-file -Dfile=your-artifact-1.0.jar
>>>>> [-DpomFile=your-pom.xml] \
>>>>> [-DgroupId=org.some.group] \
>>>>> [-DartifactId=your-artifact] \
>>>>> [-Dversion=1.0]
>>>>>
>>>>> though
>>>>> your-artifact-1.0.jar
>>>>> is already present in the remote repo so maven would go and fetch it
>>>>> bringing it
>>>>> to the local repo
>>>>>
>>>>> Or yet in other words... when building a target maven downloads all
>>>>> dependencies
>>>>> from the remote repo. Is there any way to direct maven to do the same
>>>> thing
>>>>> with
>>>>> the target, fetch vs build?
>>>>>
>>>>> Thanks!
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
> ---------------------------------------------------------------------
> 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
>
>


---------------------------------------------------------------------
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: fetch target from remote repo

Posted by Ron Wheeler <rw...@artifact-software.com>.
  On 12/08/2010 3:45 PM, Pepe Perez wrote:
> To show how maven can do out-of-the-box what our custom app does I'm starting my
> prototype by showing how maven can upload and download to/from both a remote
> repo and a local repo, though in this first stage I won't build my targets. So,
> I deploy my target and dependencies using deploy:deploy-file. Now I want to
> retrieve these pkgs from the remote repo into my local repo; by running "mvn
> install" maven will download my dependencies (good, this is what I want) but
> will try to build the target. I don't want to build the target, the target is
> already in the remote repo and I just want to fetch it into my local repo, this
> is my issue. I agree that you normally don't do this, you want to use maven for
> building, not for repository management. We'll eventually do this, but like I
> said, in this first stage I'll just show that for repo management mvn can easily
> replace our complex custom app .
>
>
I agree with you approach. Does your IDE support Maven so you don't have 
to use mvn commands?
We use Eclipse and never mvn anything. It is all done for us automatically.

If your "target" is already built and in your main repo and you don't 
need to use it, why do you want to download it to your PC?

Why not just have it downloaded naturally when someone needs it to build 
something (another artifact, a distribution, etc.)? When maven needs 
something to build something it will find it and download it only once.

If you can be more specific about what targets you are working with and 
how you currently organize your workflow, you might get some better help 
from more experience people than me. If you are building something that  
runs on a computer, somebody here has built something just like it.

You are in good hands here.

Ron
> ----- Original Message ----
> From: Ron Wheeler<rw...@artifact-software.com>
> To: Maven Users List<us...@maven.apache.org>
> Cc: Pepe Perez<pp...@yahoo.com>
> Sent: Thu, August 12, 2010 12:14:33 PM
> Subject: Re: fetch target from remote repo
>
>    On 12/08/2010 2:57 PM, Pepe Perez wrote:
>> Yes, we need both.
>>
>> Our current app deploys to a distribution repo, I'll get this behavior with
>> maven using mvn deploy:deploy-file as you also suggest
>> It also installs (fetch) to the local machine. I'll get this behavior with
>> maven
>> using maven-install-plugin:copy (which will fetch my target from the
> deployment
>> repo into a convenient location) + maven-install-plugin:install-file (which
>> will
>> store it in the local repo along with the pom)
>>
>>
> It is still not clear why the standard Maven behaviour is not exactly
> what you need.
> Maven will deploy releases and SNAPSHOTS to your main repository
> automatically (with access controls, of course) and will automatically
> download what a developer needs to build up a local cache on his/her
> workstation.
>
> This is all default activity "out of the box" and works very well and
> for the most part completely transparently from the developer's point of
> view.
>
> You merely set up the Repo (Nexus works well - see their www site and
> forums for details), define it as a mirror for all repositories in the
> maven settings that each user has (with user names and passwords for
> their accounts).
> For each application, define the repo's deployment characteristics in
> the parent pom which is refered to by each module's pom and your
> developers are set to go.
>
> What more do you need?
>
> Ron
>
>
>> ----- Original Message ----
>> From: Anders Hammar<an...@hammar.net>
>> To: Maven Users List<us...@maven.apache.org>
>> Sent: Thu, August 12, 2010 11:44:24 AM
>> Subject: Re: fetch target from remote repo
>>
>> Whatever works for you. However, the maven-install-plugin only works on the
>> local repo. Wouldn't you want to deploy to a real repo such as one in a repo
>> manager (maven-deploy-plugin)?
>>
>> /Anders
>> On Thu, Aug 12, 2010 at 20:26, Pepe Perez<pp...@yahoo.com>   wrote:
>>
>>> Thanks Anders.
>>>
>>> I wanted more something ready-to-use. I finally went for using plugins
>>> maven-install-plugin:copy + maven-install-plugin:install-file. It's not
>>> optimally clean, but will do the trick for now.
>>>
>>> Thanks!
>>>
>>>
>>>
>>> ----- Original Message ----
>>> From: Anders Hammar<an...@hammar.net>
>>> To: Maven Users List<us...@maven.apache.org>
>>> Sent: Wed, August 11, 2010 12:01:26 PM
>>> Subject: Re: fetch target from remote repo
>>>
>>> Ah, I believe this is a good use case for Aether. Read more here:
>>> http://www.sonatype.com/people/category/aether/
>>>
>>> /Anders
>>>
>>> On Wed, Aug 11, 2010 at 20:56, Pepe Perez<pp...@yahoo.com>   wrote:
>>>
>>>> We have a big complex custom application that does similar things to what
>>>> maven
>>>> does out-of-the-box, I'm evaluating if we could use maven instead. One of
>>>> the
>>>> things our custom app does is to manage a distribution repo in which you
>>>> can
>>>> request a pkg to be fetched into your machine along with its
>>> dependencies.
>>>> I was
>>>> thinking of using maven to do this, I know managing a repo is not at all
>>>> the
>>>> main purpose of maven, but for the purpose of building maven does manage
>>>> repos
>>>> so I wanted to take advantage of this to build the replacement of our app
>>>> starting from here.
>>>>
>>>> This works very nicely with dependencies, trying to build a target will
>>>> fetch
>>>> dependencies from the repo and set them into the local repo, this is
>>>> equivalent
>>>> to the request we do through our app. But in the case of the target
>>> itself
>>>> maven
>>>> will try to build it, though what I'd need is it to be fetched from the
>>>> repo
>>>> too.
>>>>
>>>>
>>>>
>>>>
>>>> ----- Original Message ----
>>>> From: Anders Hammar<an...@hammar.net>
>>>> To: Maven Users List<us...@maven.apache.org>
>>>> Sent: Wed, August 11, 2010 11:42:29 AM
>>>> Subject: Re: fetch target from remote repo
>>>>
>>>> I don't quite follow. What is it that you want to achieve? Surely the
>>> main
>>>> purpose is not only to have the artifact installed in the local repo, but
>>>> you want to do what? Maybe: Use it from some other project? Use it in
>>> some
>>>> IDE? Have a look in the jar? Telling us this will help you on the right
>>>> track as your current question doesn't make sense (to me at least).
>>>>
>>>> /Anders
>>>>
>>>> On Wed, Aug 11, 2010 at 19:55, Pepe Perez<pp...@yahoo.com>   wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> The regular way of operation for maven is to build an artifact and
>>>> install
>>>>> or
>>>>> deploy it into the repo. Is there any way to specify a target to be
>>>> fetched
>>>>> from
>>>>> the remote repo into the local repo instead of building it, since I
>>> know
>>>>> that
>>>>> it's already deployed?
>>>>>
>>>>> Another way to look at it, I'm looking for something similar to
>>>>> mvn install:install-file -Dfile=your-artifact-1.0.jar
>>>>> [-DpomFile=your-pom.xml] \
>>>>> [-DgroupId=org.some.group] \
>>>>> [-DartifactId=your-artifact] \
>>>>> [-Dversion=1.0]
>>>>>
>>>>> though
>>>>> your-artifact-1.0.jar
>>>>> is already present in the remote repo so maven would go and fetch it
>>>>> bringing it
>>>>> to the local repo
>>>>>
>>>>> Or yet in other words... when building a target maven downloads all
>>>>> dependencies
>>>>> from the remote repo. Is there any way to direct maven to do the same
>>>> thing
>>>>> with
>>>>> the target, fetch vs build?
>>>>>
>>>>> Thanks!
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
> ---------------------------------------------------------------------
> 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
>
>


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


Re: fetch target from remote repo

Posted by Pepe Perez <pp...@yahoo.com>.
To show how maven can do out-of-the-box what our custom app does I'm starting my 
prototype by showing how maven can upload and download to/from both a remote 
repo and a local repo, though in this first stage I won't build my targets. So, 
I deploy my target and dependencies using deploy:deploy-file. Now I want to 
retrieve these pkgs from the remote repo into my local repo; by running "mvn 
install" maven will download my dependencies (good, this is what I want) but 
will try to build the target. I don't want to build the target, the target is 
already in the remote repo and I just want to fetch it into my local repo, this 
is my issue. I agree that you normally don't do this, you want to use maven for 
building, not for repository management. We'll eventually do this, but like I 
said, in this first stage I'll just show that for repo management mvn can easily 
replace our complex custom app .



----- Original Message ----
From: Ron Wheeler <rw...@artifact-software.com>
To: Maven Users List <us...@maven.apache.org>
Cc: Pepe Perez <pp...@yahoo.com>
Sent: Thu, August 12, 2010 12:14:33 PM
Subject: Re: fetch target from remote repo

  On 12/08/2010 2:57 PM, Pepe Perez wrote:
> Yes, we need both.
>
> Our current app deploys to a distribution repo, I'll get this behavior with
> maven using mvn deploy:deploy-file as you also suggest
> It also installs (fetch) to the local machine. I'll get this behavior with 
>maven
> using maven-install-plugin:copy (which will fetch my target from the 
deployment
> repo into a convenient location) + maven-install-plugin:install-file (which 
>will
> store it in the local repo along with the pom)
>
>
It is still not clear why the standard Maven behaviour is not exactly 
what you need.
Maven will deploy releases and SNAPSHOTS to your main repository 
automatically (with access controls, of course) and will automatically 
download what a developer needs to build up a local cache on his/her 
workstation.

This is all default activity "out of the box" and works very well and 
for the most part completely transparently from the developer's point of 
view.

You merely set up the Repo (Nexus works well - see their www site and 
forums for details), define it as a mirror for all repositories in the 
maven settings that each user has (with user names and passwords for 
their accounts).
For each application, define the repo's deployment characteristics in 
the parent pom which is refered to by each module's pom and your 
developers are set to go.

What more do you need?

Ron


>
> ----- Original Message ----
> From: Anders Hammar<an...@hammar.net>
> To: Maven Users List<us...@maven.apache.org>
> Sent: Thu, August 12, 2010 11:44:24 AM
> Subject: Re: fetch target from remote repo
>
> Whatever works for you. However, the maven-install-plugin only works on the
> local repo. Wouldn't you want to deploy to a real repo such as one in a repo
> manager (maven-deploy-plugin)?
>
> /Anders
> On Thu, Aug 12, 2010 at 20:26, Pepe Perez<pp...@yahoo.com>  wrote:
>
>> Thanks Anders.
>>
>> I wanted more something ready-to-use. I finally went for using plugins
>> maven-install-plugin:copy + maven-install-plugin:install-file. It's not
>> optimally clean, but will do the trick for now.
>>
>> Thanks!
>>
>>
>>
>> ----- Original Message ----
>> From: Anders Hammar<an...@hammar.net>
>> To: Maven Users List<us...@maven.apache.org>
>> Sent: Wed, August 11, 2010 12:01:26 PM
>> Subject: Re: fetch target from remote repo
>>
>> Ah, I believe this is a good use case for Aether. Read more here:
>> http://www.sonatype.com/people/category/aether/
>>
>> /Anders
>>
>> On Wed, Aug 11, 2010 at 20:56, Pepe Perez<pp...@yahoo.com>  wrote:
>>
>>> We have a big complex custom application that does similar things to what
>>> maven
>>> does out-of-the-box, I'm evaluating if we could use maven instead. One of
>>> the
>>> things our custom app does is to manage a distribution repo in which you
>>> can
>>> request a pkg to be fetched into your machine along with its
>> dependencies.
>>> I was
>>> thinking of using maven to do this, I know managing a repo is not at all
>>> the
>>> main purpose of maven, but for the purpose of building maven does manage
>>> repos
>>> so I wanted to take advantage of this to build the replacement of our app
>>> starting from here.
>>>
>>> This works very nicely with dependencies, trying to build a target will
>>> fetch
>>> dependencies from the repo and set them into the local repo, this is
>>> equivalent
>>> to the request we do through our app. But in the case of the target
>> itself
>>> maven
>>> will try to build it, though what I'd need is it to be fetched from the
>>> repo
>>> too.
>>>
>>>
>>>
>>>
>>> ----- Original Message ----
>>> From: Anders Hammar<an...@hammar.net>
>>> To: Maven Users List<us...@maven.apache.org>
>>> Sent: Wed, August 11, 2010 11:42:29 AM
>>> Subject: Re: fetch target from remote repo
>>>
>>> I don't quite follow. What is it that you want to achieve? Surely the
>> main
>>> purpose is not only to have the artifact installed in the local repo, but
>>> you want to do what? Maybe: Use it from some other project? Use it in
>> some
>>> IDE? Have a look in the jar? Telling us this will help you on the right
>>> track as your current question doesn't make sense (to me at least).
>>>
>>> /Anders
>>>
>>> On Wed, Aug 11, 2010 at 19:55, Pepe Perez<pp...@yahoo.com>  wrote:
>>>
>>>> Hello,
>>>>
>>>> The regular way of operation for maven is to build an artifact and
>>> install
>>>> or
>>>> deploy it into the repo. Is there any way to specify a target to be
>>> fetched
>>>> from
>>>> the remote repo into the local repo instead of building it, since I
>> know
>>>> that
>>>> it's already deployed?
>>>>
>>>> Another way to look at it, I'm looking for something similar to
>>>> mvn install:install-file -Dfile=your-artifact-1.0.jar
>>>> [-DpomFile=your-pom.xml] \
>>>> [-DgroupId=org.some.group] \
>>>> [-DartifactId=your-artifact] \
>>>> [-Dversion=1.0]
>>>>
>>>> though
>>>> your-artifact-1.0.jar
>>>> is already present in the remote repo so maven would go and fetch it
>>>> bringing it
>>>> to the local repo
>>>>
>>>> Or yet in other words... when building a target maven downloads all
>>>> dependencies
>>>> from the remote repo. Is there any way to direct maven to do the same
>>> thing
>>>> with
>>>> the target, fetch vs build?
>>>>
>>>> Thanks!
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>


---------------------------------------------------------------------
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: fetch target from remote repo

Posted by Ron Wheeler <rw...@artifact-software.com>.
  On 12/08/2010 2:57 PM, Pepe Perez wrote:
> Yes, we need both.
>
> Our current app deploys to a distribution repo, I'll get this behavior with
> maven using mvn deploy:deploy-file as you also suggest
> It also installs (fetch) to the local machine. I'll get this behavior with maven
> using maven-install-plugin:copy (which will fetch my target from the deployment
> repo into a convenient location) + maven-install-plugin:install-file (which will
> store it in the local repo along with the pom)
>
>
It is still not clear why the standard Maven behaviour is not exactly 
what you need.
Maven will deploy releases and SNAPSHOTS to your main repository 
automatically (with access controls, of course) and will automatically 
download what a developer needs to build up a local cache on his/her 
workstation.

This is all default activity "out of the box" and works very well and 
for the most part completely transparently from the developer's point of 
view.

You merely set up the Repo (Nexus works well - see their www site and 
forums for details), define it as a mirror for all repositories in the 
maven settings that each user has (with user names and passwords for 
their accounts).
For each application, define the repo's deployment characteristics in 
the parent pom which is refered to by each module's pom and your 
developers are set to go.

What more do you need?

Ron


>
> ----- Original Message ----
> From: Anders Hammar<an...@hammar.net>
> To: Maven Users List<us...@maven.apache.org>
> Sent: Thu, August 12, 2010 11:44:24 AM
> Subject: Re: fetch target from remote repo
>
> Whatever works for you. However, the maven-install-plugin only works on the
> local repo. Wouldn't you want to deploy to a real repo such as one in a repo
> manager (maven-deploy-plugin)?
>
> /Anders
> On Thu, Aug 12, 2010 at 20:26, Pepe Perez<pp...@yahoo.com>  wrote:
>
>> Thanks Anders.
>>
>> I wanted more something ready-to-use. I finally went for using plugins
>> maven-install-plugin:copy + maven-install-plugin:install-file. It's not
>> optimally clean, but will do the trick for now.
>>
>> Thanks!
>>
>>
>>
>> ----- Original Message ----
>> From: Anders Hammar<an...@hammar.net>
>> To: Maven Users List<us...@maven.apache.org>
>> Sent: Wed, August 11, 2010 12:01:26 PM
>> Subject: Re: fetch target from remote repo
>>
>> Ah, I believe this is a good use case for Aether. Read more here:
>> http://www.sonatype.com/people/category/aether/
>>
>> /Anders
>>
>> On Wed, Aug 11, 2010 at 20:56, Pepe Perez<pp...@yahoo.com>  wrote:
>>
>>> We have a big complex custom application that does similar things to what
>>> maven
>>> does out-of-the-box, I'm evaluating if we could use maven instead. One of
>>> the
>>> things our custom app does is to manage a distribution repo in which you
>>> can
>>> request a pkg to be fetched into your machine along with its
>> dependencies.
>>> I was
>>> thinking of using maven to do this, I know managing a repo is not at all
>>> the
>>> main purpose of maven, but for the purpose of building maven does manage
>>> repos
>>> so I wanted to take advantage of this to build the replacement of our app
>>> starting from here.
>>>
>>> This works very nicely with dependencies, trying to build a target will
>>> fetch
>>> dependencies from the repo and set them into the local repo, this is
>>> equivalent
>>> to the request we do through our app. But in the case of the target
>> itself
>>> maven
>>> will try to build it, though what I'd need is it to be fetched from the
>>> repo
>>> too.
>>>
>>>
>>>
>>>
>>> ----- Original Message ----
>>> From: Anders Hammar<an...@hammar.net>
>>> To: Maven Users List<us...@maven.apache.org>
>>> Sent: Wed, August 11, 2010 11:42:29 AM
>>> Subject: Re: fetch target from remote repo
>>>
>>> I don't quite follow. What is it that you want to achieve? Surely the
>> main
>>> purpose is not only to have the artifact installed in the local repo, but
>>> you want to do what? Maybe: Use it from some other project? Use it in
>> some
>>> IDE? Have a look in the jar? Telling us this will help you on the right
>>> track as your current question doesn't make sense (to me at least).
>>>
>>> /Anders
>>>
>>> On Wed, Aug 11, 2010 at 19:55, Pepe Perez<pp...@yahoo.com>  wrote:
>>>
>>>> Hello,
>>>>
>>>> The regular way of operation for maven is to build an artifact and
>>> install
>>>> or
>>>> deploy it into the repo. Is there any way to specify a target to be
>>> fetched
>>>> from
>>>> the remote repo into the local repo instead of building it, since I
>> know
>>>> that
>>>> it's already deployed?
>>>>
>>>> Another way to look at it, I'm looking for something similar to
>>>> mvn install:install-file -Dfile=your-artifact-1.0.jar
>>>> [-DpomFile=your-pom.xml] \
>>>> [-DgroupId=org.some.group] \
>>>> [-DartifactId=your-artifact] \
>>>> [-Dversion=1.0]
>>>>
>>>> though
>>>> your-artifact-1.0.jar
>>>> is already present in the remote repo so maven would go and fetch it
>>>> bringing it
>>>> to the local repo
>>>>
>>>> Or yet in other words... when building a target maven downloads all
>>>> dependencies
>>>> from the remote repo. Is there any way to direct maven to do the same
>>> thing
>>>> with
>>>> the target, fetch vs build?
>>>>
>>>> Thanks!
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>


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


Re: fetch target from remote repo

Posted by Pepe Perez <pp...@yahoo.com>.
Yes, we need both. 

Our current app deploys to a distribution repo, I'll get this behavior with 
maven using mvn deploy:deploy-file as you also suggest
It also installs (fetch) to the local machine. I'll get this behavior with maven 
using maven-install-plugin:copy (which will fetch my target from the deployment 
repo into a convenient location) + maven-install-plugin:install-file (which will 
store it in the local repo along with the pom)




----- Original Message ----
From: Anders Hammar <an...@hammar.net>
To: Maven Users List <us...@maven.apache.org>
Sent: Thu, August 12, 2010 11:44:24 AM
Subject: Re: fetch target from remote repo

Whatever works for you. However, the maven-install-plugin only works on the
local repo. Wouldn't you want to deploy to a real repo such as one in a repo
manager (maven-deploy-plugin)?

/Anders
On Thu, Aug 12, 2010 at 20:26, Pepe Perez <pp...@yahoo.com> wrote:

> Thanks Anders.
>
> I wanted more something ready-to-use. I finally went for using plugins
> maven-install-plugin:copy + maven-install-plugin:install-file. It's not
> optimally clean, but will do the trick for now.
>
> Thanks!
>
>
>
> ----- Original Message ----
> From: Anders Hammar <an...@hammar.net>
> To: Maven Users List <us...@maven.apache.org>
> Sent: Wed, August 11, 2010 12:01:26 PM
> Subject: Re: fetch target from remote repo
>
> Ah, I believe this is a good use case for Aether. Read more here:
> http://www.sonatype.com/people/category/aether/
>
> /Anders
>
> On Wed, Aug 11, 2010 at 20:56, Pepe Perez <pp...@yahoo.com> wrote:
>
> > We have a big complex custom application that does similar things to what
> > maven
> > does out-of-the-box, I'm evaluating if we could use maven instead. One of
> > the
> > things our custom app does is to manage a distribution repo in which you
> > can
> > request a pkg to be fetched into your machine along with its
> dependencies.
> > I was
> > thinking of using maven to do this, I know managing a repo is not at all
> > the
> > main purpose of maven, but for the purpose of building maven does manage
> > repos
> > so I wanted to take advantage of this to build the replacement of our app
> > starting from here.
> >
> > This works very nicely with dependencies, trying to build a target will
> > fetch
> > dependencies from the repo and set them into the local repo, this is
> > equivalent
> > to the request we do through our app. But in the case of the target
> itself
> > maven
> > will try to build it, though what I'd need is it to be fetched from the
> > repo
> > too.
> >
> >
> >
> >
> > ----- Original Message ----
> > From: Anders Hammar <an...@hammar.net>
> > To: Maven Users List <us...@maven.apache.org>
> > Sent: Wed, August 11, 2010 11:42:29 AM
> > Subject: Re: fetch target from remote repo
> >
> > I don't quite follow. What is it that you want to achieve? Surely the
> main
> > purpose is not only to have the artifact installed in the local repo, but
> > you want to do what? Maybe: Use it from some other project? Use it in
> some
> > IDE? Have a look in the jar? Telling us this will help you on the right
> > track as your current question doesn't make sense (to me at least).
> >
> > /Anders
> >
> > On Wed, Aug 11, 2010 at 19:55, Pepe Perez <pp...@yahoo.com> wrote:
> >
> > > Hello,
> > >
> > > The regular way of operation for maven is to build an artifact and
> > install
> > > or
> > > deploy it into the repo. Is there any way to specify a target to be
> > fetched
> > > from
> > > the remote repo into the local repo instead of building it, since I
> know
> > > that
> > > it's already deployed?
> > >
> > > Another way to look at it, I'm looking for something similar to
> > > mvn install:install-file -Dfile=your-artifact-1.0.jar
> > > [-DpomFile=your-pom.xml] \
> > > [-DgroupId=org.some.group] \
> > > [-DartifactId=your-artifact] \
> > > [-Dversion=1.0]
> > >
> > > though
> > > your-artifact-1.0.jar
> > > is already present in the remote repo so maven would go and fetch it
> > > bringing it
> > > to the local repo
> > >
> > > Or yet in other words... when building a target maven downloads all
> > > dependencies
> > > from the remote repo. Is there any way to direct maven to do the same
> > thing
> > > with
> > > the target, fetch vs build?
> > >
> > > Thanks!
> > >
> > >
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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: fetch target from remote repo

Posted by Anders Hammar <an...@hammar.net>.
Whatever works for you. However, the maven-install-plugin only works on the
local repo. Wouldn't you want to deploy to a real repo such as one in a repo
manager (maven-deploy-plugin)?

/Anders
On Thu, Aug 12, 2010 at 20:26, Pepe Perez <pp...@yahoo.com> wrote:

> Thanks Anders.
>
> I wanted more something ready-to-use. I finally went for using plugins
> maven-install-plugin:copy + maven-install-plugin:install-file. It's not
> optimally clean, but will do the trick for now.
>
> Thanks!
>
>
>
> ----- Original Message ----
> From: Anders Hammar <an...@hammar.net>
> To: Maven Users List <us...@maven.apache.org>
> Sent: Wed, August 11, 2010 12:01:26 PM
> Subject: Re: fetch target from remote repo
>
> Ah, I believe this is a good use case for Aether. Read more here:
> http://www.sonatype.com/people/category/aether/
>
> /Anders
>
> On Wed, Aug 11, 2010 at 20:56, Pepe Perez <pp...@yahoo.com> wrote:
>
> > We have a big complex custom application that does similar things to what
> > maven
> > does out-of-the-box, I'm evaluating if we could use maven instead. One of
> > the
> > things our custom app does is to manage a distribution repo in which you
> > can
> > request a pkg to be fetched into your machine along with its
> dependencies.
> > I was
> > thinking of using maven to do this, I know managing a repo is not at all
> > the
> > main purpose of maven, but for the purpose of building maven does manage
> > repos
> > so I wanted to take advantage of this to build the replacement of our app
> > starting from here.
> >
> > This works very nicely with dependencies, trying to build a target will
> > fetch
> > dependencies from the repo and set them into the local repo, this is
> > equivalent
> > to the request we do through our app. But in the case of the target
> itself
> > maven
> > will try to build it, though what I'd need is it to be fetched from the
> > repo
> > too.
> >
> >
> >
> >
> > ----- Original Message ----
> > From: Anders Hammar <an...@hammar.net>
> > To: Maven Users List <us...@maven.apache.org>
> > Sent: Wed, August 11, 2010 11:42:29 AM
> > Subject: Re: fetch target from remote repo
> >
> > I don't quite follow. What is it that you want to achieve? Surely the
> main
> > purpose is not only to have the artifact installed in the local repo, but
> > you want to do what? Maybe: Use it from some other project? Use it in
> some
> > IDE? Have a look in the jar? Telling us this will help you on the right
> > track as your current question doesn't make sense (to me at least).
> >
> > /Anders
> >
> > On Wed, Aug 11, 2010 at 19:55, Pepe Perez <pp...@yahoo.com> wrote:
> >
> > > Hello,
> > >
> > > The regular way of operation for maven is to build an artifact and
> > install
> > > or
> > > deploy it into the repo. Is there any way to specify a target to be
> > fetched
> > > from
> > > the remote repo into the local repo instead of building it, since I
> know
> > > that
> > > it's already deployed?
> > >
> > > Another way to look at it, I'm looking for something similar to
> > > mvn install:install-file -Dfile=your-artifact-1.0.jar
> > > [-DpomFile=your-pom.xml] \
> > > [-DgroupId=org.some.group] \
> > > [-DartifactId=your-artifact] \
> > > [-Dversion=1.0]
> > >
> > > though
> > > your-artifact-1.0.jar
> > > is already present in the remote repo so maven would go and fetch it
> > > bringing it
> > > to the local repo
> > >
> > > Or yet in other words... when building a target maven downloads all
> > > dependencies
> > > from the remote repo. Is there any way to direct maven to do the same
> > thing
> > > with
> > > the target, fetch vs build?
> > >
> > > Thanks!
> > >
> > >
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: fetch target from remote repo

Posted by Pepe Perez <pp...@yahoo.com>.
Thanks Anders.

I wanted more something ready-to-use. I finally went for using plugins 
maven-install-plugin:copy + maven-install-plugin:install-file. It's not 
optimally clean, but will do the trick for now.

Thanks!



----- Original Message ----
From: Anders Hammar <an...@hammar.net>
To: Maven Users List <us...@maven.apache.org>
Sent: Wed, August 11, 2010 12:01:26 PM
Subject: Re: fetch target from remote repo

Ah, I believe this is a good use case for Aether. Read more here:
http://www.sonatype.com/people/category/aether/

/Anders

On Wed, Aug 11, 2010 at 20:56, Pepe Perez <pp...@yahoo.com> wrote:

> We have a big complex custom application that does similar things to what
> maven
> does out-of-the-box, I'm evaluating if we could use maven instead. One of
> the
> things our custom app does is to manage a distribution repo in which you
> can
> request a pkg to be fetched into your machine along with its dependencies.
> I was
> thinking of using maven to do this, I know managing a repo is not at all
> the
> main purpose of maven, but for the purpose of building maven does manage
> repos
> so I wanted to take advantage of this to build the replacement of our app
> starting from here.
>
> This works very nicely with dependencies, trying to build a target will
> fetch
> dependencies from the repo and set them into the local repo, this is
> equivalent
> to the request we do through our app. But in the case of the target itself
> maven
> will try to build it, though what I'd need is it to be fetched from the
> repo
> too.
>
>
>
>
> ----- Original Message ----
> From: Anders Hammar <an...@hammar.net>
> To: Maven Users List <us...@maven.apache.org>
> Sent: Wed, August 11, 2010 11:42:29 AM
> Subject: Re: fetch target from remote repo
>
> I don't quite follow. What is it that you want to achieve? Surely the main
> purpose is not only to have the artifact installed in the local repo, but
> you want to do what? Maybe: Use it from some other project? Use it in some
> IDE? Have a look in the jar? Telling us this will help you on the right
> track as your current question doesn't make sense (to me at least).
>
> /Anders
>
> On Wed, Aug 11, 2010 at 19:55, Pepe Perez <pp...@yahoo.com> wrote:
>
> > Hello,
> >
> > The regular way of operation for maven is to build an artifact and
> install
> > or
> > deploy it into the repo. Is there any way to specify a target to be
> fetched
> > from
> > the remote repo into the local repo instead of building it, since I know
> > that
> > it's already deployed?
> >
> > Another way to look at it, I'm looking for something similar to
> > mvn install:install-file -Dfile=your-artifact-1.0.jar
> > [-DpomFile=your-pom.xml] \
> > [-DgroupId=org.some.group] \
> > [-DartifactId=your-artifact] \
> > [-Dversion=1.0]
> >
> > though
> > your-artifact-1.0.jar
> > is already present in the remote repo so maven would go and fetch it
> > bringing it
> > to the local repo
> >
> > Or yet in other words... when building a target maven downloads all
> > dependencies
> > from the remote repo. Is there any way to direct maven to do the same
> thing
> > with
> > the target, fetch vs build?
> >
> > Thanks!
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>



      


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


Re: fetch target from remote repo

Posted by Anders Hammar <an...@hammar.net>.
Ah, I believe this is a good use case for Aether. Read more here:
http://www.sonatype.com/people/category/aether/

/Anders

On Wed, Aug 11, 2010 at 20:56, Pepe Perez <pp...@yahoo.com> wrote:

> We have a big complex custom application that does similar things to what
> maven
> does out-of-the-box, I'm evaluating if we could use maven instead. One of
> the
> things our custom app does is to manage a distribution repo in which you
> can
> request a pkg to be fetched into your machine along with its dependencies.
> I was
> thinking of using maven to do this, I know managing a repo is not at all
> the
> main purpose of maven, but for the purpose of building maven does manage
> repos
> so I wanted to take advantage of this to build the replacement of our app
> starting from here.
>
> This works very nicely with dependencies, trying to build a target will
> fetch
> dependencies from the repo and set them into the local repo, this is
> equivalent
> to the request we do through our app. But in the case of the target itself
> maven
> will try to build it, though what I'd need is it to be fetched from the
> repo
> too.
>
>
>
>
> ----- Original Message ----
> From: Anders Hammar <an...@hammar.net>
> To: Maven Users List <us...@maven.apache.org>
> Sent: Wed, August 11, 2010 11:42:29 AM
> Subject: Re: fetch target from remote repo
>
> I don't quite follow. What is it that you want to achieve? Surely the main
> purpose is not only to have the artifact installed in the local repo, but
> you want to do what? Maybe: Use it from some other project? Use it in some
> IDE? Have a look in the jar? Telling us this will help you on the right
> track as your current question doesn't make sense (to me at least).
>
> /Anders
>
> On Wed, Aug 11, 2010 at 19:55, Pepe Perez <pp...@yahoo.com> wrote:
>
> > Hello,
> >
> > The regular way of operation for maven is to build an artifact and
> install
> > or
> > deploy it into the repo. Is there any way to specify a target to be
> fetched
> > from
> > the remote repo into the local repo instead of building it, since I know
> > that
> > it's already deployed?
> >
> > Another way to look at it, I'm looking for something similar to
> > mvn install:install-file -Dfile=your-artifact-1.0.jar
> > [-DpomFile=your-pom.xml] \
> > [-DgroupId=org.some.group] \
> > [-DartifactId=your-artifact] \
> > [-Dversion=1.0]
> >
> > though
> > your-artifact-1.0.jar
> > is already present in the remote repo so maven would go and fetch it
> > bringing it
> > to the local repo
> >
> > Or yet in other words... when building a target maven downloads all
> > dependencies
> > from the remote repo. Is there any way to direct maven to do the same
> thing
> > with
> > the target, fetch vs build?
> >
> > Thanks!
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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: fetch target from remote repo

Posted by Pepe Perez <pp...@yahoo.com>.
We have a big complex custom application that does similar things to what maven 
does out-of-the-box, I'm evaluating if we could use maven instead. One of the 
things our custom app does is to manage a distribution repo in which you can 
request a pkg to be fetched into your machine along with its dependencies. I was 
thinking of using maven to do this, I know managing a repo is not at all the 
main purpose of maven, but for the purpose of building maven does manage repos 
so I wanted to take advantage of this to build the replacement of our app 
starting from here.

This works very nicely with dependencies, trying to build a target will fetch 
dependencies from the repo and set them into the local repo, this is equivalent 
to the request we do through our app. But in the case of the target itself maven 
will try to build it, though what I'd need is it to be fetched from the repo 
too.




----- Original Message ----
From: Anders Hammar <an...@hammar.net>
To: Maven Users List <us...@maven.apache.org>
Sent: Wed, August 11, 2010 11:42:29 AM
Subject: Re: fetch target from remote repo

I don't quite follow. What is it that you want to achieve? Surely the main
purpose is not only to have the artifact installed in the local repo, but
you want to do what? Maybe: Use it from some other project? Use it in some
IDE? Have a look in the jar? Telling us this will help you on the right
track as your current question doesn't make sense (to me at least).

/Anders

On Wed, Aug 11, 2010 at 19:55, Pepe Perez <pp...@yahoo.com> wrote:

> Hello,
>
> The regular way of operation for maven is to build an artifact and install
> or
> deploy it into the repo. Is there any way to specify a target to be fetched
> from
> the remote repo into the local repo instead of building it, since I know
> that
> it's already deployed?
>
> Another way to look at it, I'm looking for something similar to
> mvn install:install-file -Dfile=your-artifact-1.0.jar
> [-DpomFile=your-pom.xml] \
> [-DgroupId=org.some.group] \
> [-DartifactId=your-artifact] \
> [-Dversion=1.0]
>
> though
> your-artifact-1.0.jar
> is already present in the remote repo so maven would go and fetch it
> bringing it
> to the local repo
>
> Or yet in other words... when building a target maven downloads all
> dependencies
> from the remote repo. Is there any way to direct maven to do the same thing
> with
> the target, fetch vs build?
>
> Thanks!
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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: fetch target from remote repo

Posted by Anders Hammar <an...@hammar.net>.
I don't quite follow. What is it that you want to achieve? Surely the main
purpose is not only to have the artifact installed in the local repo, but
you want to do what? Maybe: Use it from some other project? Use it in some
IDE? Have a look in the jar? Telling us this will help you on the right
track as your current question doesn't make sense (to me at least).

/Anders

On Wed, Aug 11, 2010 at 19:55, Pepe Perez <pp...@yahoo.com> wrote:

> Hello,
>
> The regular way of operation for maven is to build an artifact and install
> or
> deploy it into the repo. Is there any way to specify a target to be fetched
> from
> the remote repo into the local repo instead of building it, since I know
> that
> it's already deployed?
>
> Another way to look at it, I'm looking for something similar to
> mvn install:install-file -Dfile=your-artifact-1.0.jar
> [-DpomFile=your-pom.xml] \
> [-DgroupId=org.some.group] \
> [-DartifactId=your-artifact] \
> [-Dversion=1.0]
>
> though
> your-artifact-1.0.jar
> is already present in the remote repo so maven would go and fetch it
> bringing it
> to the local repo
>
> Or yet in other words... when building a target maven downloads all
> dependencies
> from the remote repo. Is there any way to direct maven to do the same thing
> with
> the target, fetch vs build?
>
> Thanks!
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>