Re: uploading existing jar+pom as one artifact
> On 07/12/2011 04:02 AM, Wendy Smoak wrote: >> On Mon, Jul 11, 2011 at 8:15 PM, Olaf Klischat >> wrote: >>> mvn deploy:deploy-file -Dfile=mylib.jar DpomFile=mypom.pom >>> -DgeneratePom=false -Durl= >>> >>> , it apparently just uploads the jar under the name>> from >>> mypom.pom>-.pom. >> >> You mentioned a timestamp, so... you're deploying a snapshot? > > Oh, yeah I do. Sorry, I forgot to mention that. Somewhat answering my > own question, it looks like I can just issue two such mvn invocations to > upload first the pom, then the jar, like so: > > mvn deploy:deploy-file -Dfile=mypom.pom -DpomFile=mypom.pom > -DgeneratePom=false -Durl= > > mvn deploy:deploy-file -Dfile=mylib.jar -DgroupId= mypom.pom> -DartifactId= -Dversion=SNAPSHOT > -DgeneratePom=false -Dpackaging=jar -Durl= Hm, no, the differing timestamps resulting from the two seperate uploads are a problem. A build that references this library in its dependencies fails -- the POM isn't found: [WARNING] The POM for ::jar: is missing, no dependency information available. So my original issue remains: How do I upload these two things (snapshot jar + pom) correctly? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: uploading existing jar+pom as one artifact
On 07/12/2011 04:02 AM, Wendy Smoak wrote: On Mon, Jul 11, 2011 at 8:15 PM, Olaf Klischat wrote: mvn deploy:deploy-file -Dfile=mylib.jar DpomFile=mypom.pom -DgeneratePom=false -Durl= , it apparently just uploads the jar under the name-.pom. You mentioned a timestamp, so... you're deploying a snapshot? Oh, yeah I do. Sorry, I forgot to mention that. Somewhat answering my own question, it looks like I can just issue two such mvn invocations to upload first the pom, then the jar, like so: mvn deploy:deploy-file -Dfile=mypom.pom -DpomFile=mypom.pom -DgeneratePom=false -Durl= mvn deploy:deploy-file -Dfile=mylib.jar -DgroupId=mypom.pom> -DartifactId= -Dversion=SNAPSHOT -DgeneratePom=false -Dpackaging=jar -Durl= ..and the varying timestamps are correctly written to the maven-metadata.xml. The redundancy in the explicit groupId etc. parameters in the 2nd call is unfortunate but tolerable. Maybe there's a better way still. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
uploading existing jar+pom as one artifact
I have a jar file and an accompanying POM file that describes the jar file's metadata (name etc.) and dependencies, but contains no repo/deployment info. Can I upload both files to my (Sonatype Nexus or local/filesystem) repo so that they end up as one project/artifact, just as they would if I only had the jar and let the pom be generated automatically by the deploy:deploy-file plugin? If I run mvn deploy:deploy-file -Dfile=mylib.jar DpomFile=mypom.pom -DgeneratePom=false -Durl= , it apparently just uploads the jar under the name from mypom.pom>-.pom. So how do I do this correctly? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org