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 <[email protected]> To: Maven Users List <[email protected]> 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 <[email protected]> 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 <[email protected]> > To: Maven Users List <[email protected]> > 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 <[email protected]> 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 <[email protected]> > > To: Maven Users List <[email protected]> > > 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 <[email protected]> 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: [email protected] > > > For additional commands, e-mail: [email protected] > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
