Error Retrieving Previous Build Number For Artifact
Contents |
here for a quick overview of the site Help Center Detailed error retrieving previous build number for artifact error transferring file answers to any questions you might have Meta Discuss
Nexus Error Retrieving Previous Build Number For Artifact
the workings and policies of this site About Us Learn more about Stack Overflow the nexus repository policy company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss
This Is A Maven Snapshot Repository And Manual Upload Against It Is Forbidden
Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Gradle maven publish doesn't work for first version up vote 0 down vote favorite with a build.gradle file containing: apply maven-deploy-plugin plugin: 'java' apply plugin: 'maven' uploadArchives { repositories { mavenDeployer { snapshotRepository (url: mavenSnapshotRepoUrl) repository (url: mavenRepoUrl) { authentication (userName: mavenRepoUsername, password: mavenRepoPassword) } pom { //groupId = project.group artifactId = 'myapp' //version = project.version } } } } when I run the command uploadArchives, I get the following error: $ gradlew uploadArchives :compileJava UP-TO-DATE :processResources UP-TO-DATE :classes UP-TO-DATE :jar UP-TO-DATE :uploadArchives FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':uploadArchives'. > Could not publish configuration 'archives' > Error deploying artifact 'mycompany:myapp:jar': Error retrieving previous build number for artifact 'mycompany:myapp:jar': repository metadata for: 'snapshot mycompany:myapp:0.0. 1-SNAPSHOT' could not be retrieved from repository: remote due to an error: Authorization failed: Access denied to: http://myserver\ /repository/snapshots/mycompany/myapp/0.0.1-SNAPSHOT/maven-metadata.xml * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Topic Next Topic › Classic List Threaded ♦ ♦ Locked 3 messages prankris Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Deploying artifacts to Nexus gives "Error retrieving previous build .." Hi all, When I deploy artifacts to http://stackoverflow.com/questions/28314101/gradle-maven-publish-doesnt-work-for-first-version nexus snapshots repository, I am getting "Error retrieving previous build number for artifact 'com.mycompany.sec:sampleproj:jar': repository metadata for: 'snapshot com.mycompany.sec:sampleproj:1.0-SNAPSHOT' could not be retrieved from repository: snapshots due to an error: Authorization failed: Access denied to: http://remoteserver:8080/nexus/content/repositories/snapshots/com/mycompany/sec/sampleproj/1.0-SNAPSHOT/maven-metadata.xml". I'm using maven 2.2.1, nexus http://maven.40175.n5.nabble.com/Deploying-artifacts-to-Nexus-gives-quot-Error-retrieving-previous-build-quot-td4506835.html v1.9.1.1, glassfish 3.0.1, JDK 1.6.0_23 However, when I make the security settings to OFF under Administration -> Server, then I am not getting the above error. I am deploying to nexus using deployment user. Following is the error using -e switch NetBeans: Executing 'C:\apache-maven-2.2.1\bin\mvn.bat -Dnetbeans.execution=true -Dmaven.repo.local=C:\Documents and Settings\username\.m2\repository -e deploy' NetBeans: JAVA_HOME=C:\Program Files\Java\jdk1.6.0_23 + Error stacktraces are turned on. Scanning for projects... ------------------------------------------------------------------------ Building Sampleproj task-segment: [deploy] ------------------------------------------------------------------------ [resources:resources] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! Copying 0 resource [compiler:compile] Nothing to compile - all classes are up to date [resources:testResources] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! skip non existing resourceDirectory C:\WorkspaceNetBeans\S
a https://discuss.gradle.org/t/gradle-uploadarchives-task-fail-error-retrieving-previous-build-number-for-artifact-from-s3-repository/1149 maven repo hosted on s3. I am getting this error - :uploadArchives FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':uploadArchives'. > Could not publish configuration 'archives' > error retrieving Error deploying artifact 'com.test:MyProject:aar': Error retrieving previous build number for artifact 'com.artoo:MyProject:aar': repository metadata for: 'snapshot com.test:MyProject:1.2-SNAPSHOT' could not be retrieved from repository: remote due to an error: Cannot write file to '/Users/Shubham/.m2/repository/com/test/MyProject/1.2-SNAPSHOT/maven-metadata-remote.xml.tmp Here is error retrieving previous my uploadArchives task - uploadArchives { repositories { mavenDeployer { deployer -> configuration = configurations.deployerAars def repositoryUrl = 's3://my-mvn-repo/snapshots' repository(url: repositoryUrl) { authentication(userName: 's3AccessKey', passphrase: 's3SecureKey') } pom.project { name 'MyProject' packaging 'aar' } } } } Am I doing something wrong ? Note: I am successfully able to deploy if my s3 maven repo is empty i.e it don't have any previous version. Antoine (Antoine) 2015-02-06 14:21:00 UTC #2 I am also getting this error. I am using springsource's aws-maven 5.0.0. Did you resolved your issue? Home Categories FAQ/Guidelines Terms of Service Privacy Policy Powered by Discourse, best viewed with JavaScript enabled