Hi Friends,--I am pretty new in the Nexus 3.0 and wanted to upload snapshot jar file into nexus default repository for learning and having dummy jar file "maven-artifact-9.1.1-SNAPSHOT.jar" which I have renamed (not sure do I need to ).I am using curl command to upload it as below :curl -v -u username:password --upload-file "path of file\maven-artifact-9.1.1-SNAPSHOT.jar" http://hostname:8081/repository/maven-snapshots/org/apache/maven/plugins/maven-artifact/9.1.1-SNAPSHOT/maven-artifact-9.1.1-SNAPSHOT.jarPath : "org/apache/maven/plugins/maven-artifact/9.1.1-SNAPSHOT" I have taken as read somewhere (not sure if it is correct)after running it gets uploaded into repository maven-snapshots however it is not adding time stamp as it should which I have read in documentation.I do not have any other file or something.Do I need to create POM file and upload it into same Repository before uploading jar file so going forward each time I upload the the file with SNAPSHOT name it should append the time stamp.Please help me creating POM file for above jar file.Thank you !
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/6d56af5a-8fcc-4c15-8929-e144417083c5%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.
mvn deploy:deploy-file -DgroupId=com.somecompany -DartifactId=project -Dversion=1.0.0 -DgeneratePom=true -Dpackaging=jar -DrepositoryId=nexus -Durl=http://localhost:8081/nexus/content/repositories/releases -Dfile=target/project-1.0.0.jar
curl -v -F r=releases -F hasPom=true -F e=jar -F file=@pom.xml -F file=@project-1.0.jar -u admin:admin123 http://localhost:8081/nexus/service/local/artifact/maven/content
Here I am not able to find the path "http://localhost:8081/nexus/service/local/artifact/maven/content"
not able to find the path : /nexus/content/repositories/releases
Can you please suggest about above paths, do they present on nexus or we need to configure it and is there any other rest API which allows us to upload the snapshot with timestamp.
Or is it mandatory to upload SnapShot with timestamp :
This is the last question from my side for this topic and apologies for any inconvenience
Thanks in advance
Hi Rich,Thank you so much.I am trying to use the link you provided however path : "http://localhost:8081/nexus/service/local/artifact/maven/content" I am not able to find it on my nexus server :my nexus version is 3.1.0-04"when I am trying to upload any jar file with SNAPSHOT in both of the places in URL when using old curl command : 9.1.1-SNAPSHOT/maven-artifact-9.1.1-SNAPSHOT.jar it is getting uploaded howeverwhile doing as "/3.3.9-SNAPSHOT/maven-artifact-3.3.9-20161115.jar " it is giving 400 :Invalid path for maven 2 repositoryAs per link suggested by you : commands are as below :mvn deploy:deploy-file -DgroupId=com.somecompany -DartifactId=project -Dversion=1.0.0 -DgeneratePom=true -Dpackaging=jar -DrepositoryId=nexus -Durl=http://localhost:8081/nexus/content/repositories/releases -Dfile=target/project-1.0.0.jarcurl -v -F r=releases -F hasPom=true -F e=jar -F file=@pom.xml -F file=@project-1.0.jar -u admin:admin123 http://localhost:8081/nexus/service/local/artifact/maven/contentHere I am not able to find the path "http://localhost:8081/nexus/service/local/artifact/maven/content"not able to find the path : /nexus/content/repositories/releasesCan you please suggest about above paths, do they present on nexus or we need to configure it and is there any other rest API which allows us to upload the snapshot with timestamp.Thanks in advance
On Monday, 14 November 2016 20:20:08 UTC+5:30, Rich Seddon wrote:
Nexus won't generate a timestamped snapshot, that is the responsibility of the tool doing the deploy.Try using the maven deploy:deploy-file goal as described here, that will do what you want:Rich
On Mon, Nov 14, 2016 at 8:38 AM, priytam shukla <priytam....@gmail.com> wrote:
Hi Friends,I am pretty new in the Nexus 3.0 and wanted to upload snapshot jar file into nexus default repository for learning and having dummy jar file "maven-artifact-9.1.1-SNAPSHOT.jar" which I have renamed (not sure do I need to ).I am using curl command to upload it as below :curl -v -u username:password --upload-file "path of file\maven-artifact-9.1.1-SNAPSHOT.jar" http://hostname:8081/repository/maven-snapshots/org/apache/maven/plugins/maven-artifact/9.1.1-SNAPSHOT/maven-artifact-9.1.1-SNAPSHOT.jarPath : "org/apache/maven/plugins/maven-artifact/9.1.1-SNAPSHOT" I have taken as read somewhere (not sure if it is correct)after running it gets uploaded into repository maven-snapshots however it is not adding time stamp as it should which I have read in documentation.I do not have any other file or something.Do I need to create POM file and upload it into same Repository before uploading jar file so going forward each time I upload the the file with SNAPSHOT name it should append the time stamp.Please help me creating POM file for above jar file.Thank you !
--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/6d56af5a-8fcc-4c15-8929-e144417083c5%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/ae083199-d0a9-4777-a315-125e9eab4ab6%40glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/CAGkc%2BDOgswHYR9KeY%3DHiQ3Xz9VsMjG-HY4a_V1oEpChJQW4tyw%40mail.gmail.com.