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 <rwhee...@artifact-software.com> To: Maven Users List <users@maven.apache.org> Cc: Pepe Perez <pp.pe...@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<and...@hammar.net> > To: Maven Users List<users@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.pe...@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<and...@hammar.net> >> To: Maven Users List<users@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.pe...@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<and...@hammar.net> >>> To: Maven Users List<users@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.pe...@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-unsubscr...@maven.apache.org >>>> For additional commands, e-mail: users-h...@maven.apache.org >>>> >>>> >>> >>> >>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >>> For additional commands, e-mail: users-h...@maven.apache.org >>> >>> >> >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org >> For additional commands, e-mail: users-h...@maven.apache.org >> >> > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org