HttpPost httpPost = new HttpPost(this.nexusUrl+"/service/local/artifact/maven/content");
String pkgName = file.getName();
RpmPackageInfo pkgInfo = new RpmPackageInfo(pkgName);
MultipartEntityBuilder entityBuilder = MultipartEntityBuilder.create();
entityBuilder.addTextBody("r", this.repoName);
entityBuilder.addTextBody("g", this.repoGroup);
entityBuilder.addTextBody("e", "rpm");
entityBuilder.addTextBody("hasPom", "false");
entityBuilder.addTextBody("a", pkgInfo.getName());
entityBuilder.addTextBody("p", "rpm");
entityBuilder.addTextBody("v", pkgInfo.getVersion()+"-"+pkgInfo.getTimeStamp()+"."+pkgInfo.getArch());
FileBody uploadFilePart = new FileBody(file );
entityBuilder.addPart("upload_file", uploadFilePart);
httpPost.setEntity(entityBuilder.build());
try {
System.out.println("Start uploading file : " + file.getName());
HttpResponse response = httpclient.execute(httpPost); -- always fails here.
try {
HttpEntity entity = response.getEntity();
IOException for fp.act(new UploadRpm()) ============================================ = traceback hudson.FilePath.act(FilePath.java:912) hudson.FilePath.act(FilePath.java:889) com.sfdc.jenkinsnexusartifact.NexusRpmBuilder.perform(NexusRpmBuilder.java:155) hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:781) hudson.model.Build$BuildExecution.build(Build.java:199) hudson.model.Build$BuildExecution.doRun(Build.java:160) hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:562) hudson.model.Run.execute(Run.java:1665) hudson.matrix.MatrixRun.run(MatrixRun.java:146) hudson.model.ResourceController.execute(ResourceController.java:88) hudson.model.Executor.run(Executor.java:246) hudson.util.IOException2: remote file operation failed: /home/jenkins-slave/workspace/00_packages/idlc/latest/idlc-puppet-modules-1.0.0-140111183208_devtest.noarch.rpm at hudson.remoting.Channel@5590eab2:jenkin-slave.sf.com IOException for fp.act(new UploadRpm())
Best regards,
Shoujin Wang
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/UnQlZV6-dus/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.