Unable to deploy artifacts - cloudbees

I get the following when trying to deploy artifcats from within my job:
[ERROR] uniqueVersion == false is not anymore supported in maven 3
[INFO] Deployment in dav:https://repository-xinco.forge.cloudbees.com/snapshot (id=cloudbees-private-repository,uniqueVersion=false)
Deploying the main artifact Card-Game-Extension-1.0-SNAPSHOT.pom
Downloading: dav:https://repository-xinco.forge.cloudbees.com/snapshot/simple/server/Card-Game-Extension/1.0-SNAPSHOT/maven-metadata.xml
Uploading: https://repository-xinco.forge.cloudbees.com/snapshot/simple/server/Card-Game-Extension/1.0-SNAPSHOT/Card-Game-Extension-1.0-20120820.205113-1.pom
Uploading: https://repository-xinco.forge.cloudbees.com/snapshot/simple/server/Card-Game-Extension/1.0-SNAPSHOT/Card-Game-Extension-1.0-20120820.205113-1.pom
ERROR: Failed to deploy artifacts: Could not transfer artifact simple.server:Card-Game-Extension:pom:1.0-20120820.205113-1 from/to cloudbees-private-repository (dav:https://repository-xinco.forge.cloudbees.com/snapshot): Failed to transfer file: https://repository-xinco.forge.cloudbees.com/snapshot/simple/server/Card-Game-Extension/1.0-SNAPSHOT/Card-Game-Extension-1.0-20120820.205113-1.pom. Return code is: 401
org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact simple.server:Card-Game-Extension:pom:1.0-20120820.205113-1 from/to cloudbees-private-repository (dav:https://repository-xinco.forge.cloudbees.com/snapshot): Failed to transfer file: https://repository-xinco.forge.cloudbees.com/snapshot/simple/server/Card-Game-Extension/1.0-SNAPSHOT/Card-Game-Extension-1.0-20120820.205113-1.pom. Return code is: 401
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:182)
at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:707)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:682)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:997)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:629)
at hudson.model.Run.run(Run.java:1433)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact simple.server:Card-Game-Extension:pom:1.0-20120820.205113-1 from/to cloudbees-private-repository (dav:https://repository-xinco.forge.cloudbees.com/snapshot): Failed to transfer file: https://repository-xinco.forge.cloudbees.com/snapshot/simple/server/Card-Game-Extension/1.0-SNAPSHOT/Card-Game-Extension-1.0-20120820.205113-1.pom. Return code is: 401
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:280)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:211)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:443)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
... 11 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact simple.server:Card-Game-Extension:pom:1.0-20120820.205113-1 from/to cloudbees-private-repository (dav:https://repository-xinco.forge.cloudbees.com/snapshot): Failed to transfer file: https://repository-xinco.forge.cloudbees.com/snapshot/simple/server/Card-Game-Extension/1.0-SNAPSHOT/Card-Game-Extension-1.0-20120820.205113-1.pom. Return code is: 401
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:950)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:837)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:467)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:274)
... 14 more
Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: https://repository-xinco.forge.cloudbees.com/snapshot/simple/server/Card-Game-Extension/1.0-SNAPSHOT/Card-Game-Extension-1.0-20120820.205113-1.pom. Return code is: 401
at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:379)
at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:287)
at org.apache.maven.wagon.providers.webdav.WebDavWagon.put(WebDavWagon.java:332)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:811)
... 16 more
[INFO] Deployment failed after 0.74 sec
Build step 'Deploy artifacts to my Private CloudBees Repository' changed build result to FAILURE
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: FAILURE
Is there anything to set up in the repository I'm unaware of?

You are using the Deploy artifacts to my Private CloudBees Repository publisher.
You need to enable the Assign unique versions to snapshots option on the Advanced options for that plugin.
Once you do that it should deploy just fine.

"uniqueVersion == false is not anymore supported in maven 3", even being reported as an ERROR, won't stop the deployment.
This seems to be a configuration issue in your account, will follow-up on https://cloudbees.zendesk.com/tickets/5055

It was a repository permission issue.

Related

jboss server not deploying webapp artifact

I have started the jboss server by copying the war to deploy folder in jboss. But it was throwing the error as the artifact not deployed. Is there any particular configuration to be followed to make the artifact deployed.
09:25:00,894 ERROR [ProfileServiceBootstrap] Failed to load profile:
Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS)
DEPLOYMENTS IN ERROR:
Deployment "vfszip:
<>../webapp-war-1.14.0-SNAPSHOT.war/" is in error due to the following reason(s): org.jboss.xb.binding.JBossXBRuntimeException: Failed to resolve schema nsURI=http://java.sun.com/xml/ns/javaee location=http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd

Not able to execute scripts from Jenkins although working fine locally & via command line

I am Not able to run scripts from Jenkins. How ever working fine from Command line & Local. I am within office network. Getting Below Error. I don't understand why Jenkins is trying to download Maven plugin? I am new to Jenkins. Any suggestion will be appretiated.
[INFO] ------------------------< Test:Junit-Demo >-------------------------
[INFO] Building Junit-Demo 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.695 s
[INFO] Finished at: 2018-04-11T14:29:52-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.68.215] failed: Connection timed out: connect -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding="UTF-8"
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
Maven, triggered by Jenkins, downloads the maven-clean-plugin as part of its normal execution. This happened on your location machine in the first run and was then cached in ~/.m2/.
Your Jenkins build agent, however, cannot connect to the server from which maven downloads artifacts:
Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.68.215] failed: Connection timed out: connect
Make sure that there is no firewall involved blocking these connections or configure Jenkins to use a local artifact repository (like Nexus or Artifactory).
Missing some info to fully know what's wrong.
To use maven in Jenkins you have to install the jenkins maven plugin and call the binary in your Jenkins file.
Did you have to do any maven configuration for your local set up?
ie inside ~/.m2 is usually where you would set up your account for nexus credentials inside settings.xml.
You would have to do this same config on your jenkins machine, either in the Jenkins user account's ~/.m2 or inside the maven plugin folder.

Artifactory Remote Repository (Maven Central) - Unauthorized

I try to configure Artifactory (2.6.4 rev. 13153) to use Maven Central as a remote repository. For this I configuered the remote repository (please see screenshots below). In gradle.build I configured:
repositories {
maven {
url artifactoryBaseUrl + 'build-libs'
}
maven {
url artifactoryBaseUrl + 'mcentral'
}
}
Using Artifactory's simple browser I can browse Maven Central using my remote repo "mcentral" but when running gradle I get an error:
D:\...\at.mic.all.hermes>gradle build
:compileJava
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Could not resolve org.apache.myfaces.trinidad:trinidad-impl:1.0.13.
Required by:
at.mic.all.hermes:at.mic.all.hermes:20150924104503
> Could not GET 'http://mic-build2.mic.co.at:8082/artifactory/mcentral/org/apache/myfaces/trinidad/trinidad-impl/1.0.13/trinidad-impl-1.0.13.pom'. Received status code 401 from server: Unauthorized
BUILD FAILED
Any ideas what I made wrong? I would highly appreciate any help. Thanks!
Frank
The screensots:

Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5

I am new to Maven,
I want to install all the artifacts to my local maven, when i tried to run my script.Got bellow error.
[INFO] Scanning for projects...Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or on
e of its dependencies could not be resolved: Failed to read artifact descriptorfor org.apache.maven.plugins:maven-clean-plugin:jar:2.5
Please help in resolving this issue. What do i need to do in my setting.xml, which proxy ip i need to give as my poxy is been disabled on my system.

teamcity 5.1 maven proxy configuration

I created a new build configuration and tried to run the same. However I encounter errors saying the artifacts could not be found in the repository. If I run the maven build from command line for the same workspace, the build works well. The proxy configuration has been mentioned in ./m2/settings.xml and the settings file has been mentioned in the build configuration. I tried even placing the proxy configuration in TeamCity\buildAgent\plugins\maven\conf\settings.xml but it does not seem to help. Kindly let me know if you have any pointers.
Caused by: org.apache.maven.plugin.InvalidPluginException: Unable to build project for plugin 'org.apache.maven.plugins:maven-site-plugin': POM 'org.apache.maven.plugins:maven-site-plugin' not found in repository: Unable to download the artifact from any repository[16:59:48]: org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7[16:59:48]: from the specified remote repositories:[16:59:48]: central (http://repo1.maven.org/maven2)[16:59:48]: for project org.apache.maven.plugins:maven-site-plugin[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:293)[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:205)[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:184)[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.loadPluginDescriptor(DefaultPluginManager.java:1642)[16:59:48]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1540)[16:59:48]: ... 19 more[16:59:48]: Caused by: org.apache.maven.project.ProjectBuildingException: POM 'org.apache.maven.plugins:maven-site-plugin' not found in repository: Unable to download the artifact from any repository[16:59:48]: org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7[16:59:48]: from the specified remote repositories:[16:59:48]: central (http://repo1.maven.org/maven2)[16:59:48]: for project org.apache.maven.plugins:maven-site-plugin[16:59:48]: at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:605)[16:59:48]: at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)[16:59:48]: at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:277)[16:59:48]: ... 23 more[16:59:48]: Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository[16:59:48]: org.apache.maven.plugins:maven-site-plugin:pom:2.0-beta-7[16:59:48]: from the specified remote repositories:[16:59:48]: central (http://repo1.maven.org/maven2)[16:59:48]: at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228)[16:59:48]: at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)[16:59:48]: at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558)[16:59:48]: ... 25 more[16:59:48]: Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository[16:59:48]: at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404)[16:59:48]: at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)[16:59:48]: ... 27 more
Have you tried setting the settings.xml within the Maven installation
e.g. for my TeamCity installation /usr/local/apache-maven/apache-maven-2.2.1/conf/settings.xml
Don't forget that TeamCity will probably be running as its own user, so ~/.m2/settings.xml may not be where you think it is.