On Wed, September 26, 2012 1:04 pm, mlandman99 wrote: > Baptiste MATHUS wrote >> +1. >> There's many possibilities to do that. But are you aware that mvn deploy >> is >> already going to timestamp SNAPSHOTs? Isn't that sufficient?> > > Just found that out yesterday, and am using it, awesome! > > My project is dependent on another maven project that I have control over, > as well as 4-5 internally built jars that I don't have control over. All > of > these dependencies might change daily and I'd like them in the repo as > snapshots. > > Let's call "my" project "project 1" and the project it's dependent on, > "project 2". > > For project 2, I have control over building it, and so I have configured > the > nexus repo info in the POM file for that project. On my CI server, I build > that project first, and I have the maven goal "deploy" defined, and it is > properly deploying the snapshot (with timestamp) to the nexus repo. And > when > Project 1 builds later with the -U parameter, it is always downloading the > most recent snapshot of Project 2 from the repo. Cool! > > My problem lies with the 4-5 jars (that are built nightly) that Project 1 > is > dependent on, that are NOT built by maven projects. Specifically, all I > have > a mounted drive to a network share and know that the (new) .jars will be > there, but that's about it. I'd like to automate the process of getting > those to the repo (as an updated SNAPSHOT version) immediately prior to my > project building, so that I'll pull down the latest version. But unless > I'm > missing something, I don't see any easy way to use maven plugins to deploy > those files, since they're not artifacts of a project I'm building. > > What is the easiest way to do that? I suppose I could write a script that > runs some kind of nexus-related command line or maven command line that > will > somehow deploy these 4-5 files as -SNAPSHOT to the repo. But how?
Write a script that invokes the the mvn deploy plugin with the deploy goal and invoke that as separate freestyle build step before your other build e.g. mvn deploy:deploy-file -D ... More info on parameters and stuff at http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html manfred --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org