Re: uploading existing jar+pom as one artifact

2011-07-13 Thread olaf . klischat
 On 07/12/2011 04:02 AM, Wendy Smoak wrote:
 On Mon, Jul 11, 2011 at 8:15 PM, Olaf Klischatolaf.klisc...@sofd.de
 wrote:
 mvn deploy:deploy-file -Dfile=mylib.jar DpomFile=mypom.pom
 -DgeneratePom=false -Durl=repourl

 , it apparently just uploads the jar under the namegroupid-artifactid
 from
 mypom.pom-timestamp.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=repourl

 mvn deploy:deploy-file -Dfile=mylib.jar -DgroupId=groupId from
 mypom.pom -DartifactId=artifactId from mypom.pom -Dversion=SNAPSHOT
 -DgeneratePom=false -Dpackaging=jar -Durl=repourl

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 groupId:artifactId:jar:timestamp of the 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

2011-07-13 Thread Stephen Connolly
mvn deploy:deployFile -Dfile=... -DpomFile=... -Durl=... should deploy
both the jar and the pom. If it is not doing so can you raise a JIRA.

Note that you might have to force the version of the deploy plugin as
it could be an issue with an older version,

mvn org.apache.maven.plugins:maven-deploy-plugin:2.6:deploy-file ...

rather than just plain deploy:deploy-file

On 13 July 2011 13:14,  olaf.klisc...@sofd.de wrote:
 On 07/12/2011 04:02 AM, Wendy Smoak wrote:
 On Mon, Jul 11, 2011 at 8:15 PM, Olaf Klischatolaf.klisc...@sofd.de
 wrote:
 mvn deploy:deploy-file -Dfile=mylib.jar DpomFile=mypom.pom
 -DgeneratePom=false -Durl=repourl

 , it apparently just uploads the jar under the namegroupid-artifactid
 from
 mypom.pom-timestamp.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=repourl

 mvn deploy:deploy-file -Dfile=mylib.jar -DgroupId=groupId from
 mypom.pom -DartifactId=artifactId from mypom.pom -Dversion=SNAPSHOT
 -DgeneratePom=false -Dpackaging=jar -Durl=repourl

 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 groupId:artifactId:jar:timestamp of the 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



-
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

2011-07-13 Thread Wendy Smoak
On Wed, Jul 13, 2011 at 8:14 AM,  olaf.klisc...@sofd.de wrote:
 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 groupId:artifactId:jar:timestamp of the jar is
 missing, no dependency information available.

 So my original issue remains: How do I upload these two things (snapshot
 jar + pom) correctly?


Thanks for reporting it.  I moved the issue to the Deploy plugin:
https://jira.codehaus.org/browse/MDEPLOY-138 .

-- 
Wendy

-
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

2011-07-12 Thread Olaf Klischat

On 07/12/2011 04:02 AM, Wendy Smoak wrote:

On Mon, Jul 11, 2011 at 8:15 PM, Olaf Klischatolaf.klisc...@sofd.de  wrote:

mvn deploy:deploy-file -Dfile=mylib.jar DpomFile=mypom.pom
-DgeneratePom=false -Durl=repourl

, it apparently just uploads the jar under the namegroupid-artifactid from
mypom.pom-timestamp.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=repourl


mvn deploy:deploy-file -Dfile=mylib.jar -DgroupId=groupId from 
mypom.pom -DartifactId=artifactId from mypom.pom -Dversion=SNAPSHOT 
-DgeneratePom=false -Dpackaging=jar -Durl=repourl


..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

2011-07-11 Thread Olaf Klischat
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=repourl


, it apparently just uploads the jar under the name groupid-artifactid 
from mypom.pom-timestamp.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



Re: uploading existing jar+pom as one artifact

2011-07-11 Thread Wendy Smoak
On Mon, Jul 11, 2011 at 8:15 PM, Olaf Klischat olaf.klisc...@sofd.de wrote:
 mvn deploy:deploy-file -Dfile=mylib.jar DpomFile=mypom.pom
 -DgeneratePom=false -Durl=repourl

 , it apparently just uploads the jar under the name groupid-artifactid from
 mypom.pom-timestamp.pom.

You mentioned a timestamp, so... you're deploying a snapshot?  And
even though you specify -DpomFile in the command, only the jar gets
deployed?

Does it work if you use a non-snapshot version number?  (Use something
like 1.0-test or 1.0-deleteme to avoid 'using up' a version number you
might need in the future.)

Check JIRA and see if it's a known issue for the version of the deploy
plugin you're using.  I've never tried to deploy-file a snapshot.

-- 
Wendy

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