[JIRA] (JENKINS-61091) Missing deployed artifacts using getGeneratedArtifacts()

2020-02-14 Thread ricard4e...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Ricard F updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-61091  
 
 
  Missing deployed artifacts using getGeneratedArtifacts()   
 

  
 
 
 
 

 
Change By: 
 Ricard F  
 

  
 
 
 
 

 
 Hello, I'm trying to get all the list of deployed artifacts and save their url to be able to report them, or even to add this information into an artifactory buildinfo object.I'm using the code statedin the wiki:    {code:java}def deployed = '' Collection generatedArtifacts = currentBuild.rawBuild.getAction(org.jenkinsci.plugins.pipeline.maven.publishers.MavenReport.class).getGeneratedArtifacts(); for (org.jenkinsci.plugins.pipeline.maven.MavenArtifact generatedArtifact:generatedArtifacts) { if (generatedArtifact.isDeployed()) { }{code}  The mvn deploy command is currently deploying 4 artifacts (jar, sources, javadoc and pom as 0.6.3-SNAPSHOT), those 4 artifacts are currently archived to jenkins if I do not disable the option, but when going to the list or to the generated artifacts list, I only get 3 downloadable artifacts and 5 in the list (pom is uploaded but missing from the list):{color:#0747a6}maven-test-0.6.3-20200213.132009-3.jar{color}{color:#0747a6}maven-test-0.6.3-20200213.132009-3-sources.jar{color}{color:#0747a6}maven-test-0.6.3-20200213.132009-3-javadoc.jar{color}maven-test-0.6.3-SNAPSHOT.jarmaven-test-0.6.3-SNAPSHOT.pom I assume that if 4 artifacts are deployed to the maven repository, I would get 4 artifacts in the deployedArtifacts list and the link in the maven section should allow to download the 4 of them.I also don't undestand why in the list there is the jar and pom SNAPSHOT artifacts but not sources and javadoc (I would assume to show them all, or none of them), as in jenkins they are archived as 6.3.0-SNAPSHOT all of them.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

   

[JIRA] (JENKINS-61091) Missing deployed artifacts using getGeneratedArtifacts()

2020-02-14 Thread ricard4e...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Ricard F created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-61091  
 
 
  Missing deployed artifacts using getGeneratedArtifacts()   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Cyrille Le Clerc  
 
 
Components: 
 pipeline-maven-plugin  
 
 
Created: 
 2020-02-14 08:13  
 
 
Environment: 
 Jenkins 2.204.1  Pipeline Maven Integration Plugin 3.8.2  
 
 
Labels: 
 maven  
 
 
Priority: 
  Major  
 
 
Reporter: 
 Ricard F  
 

  
 
 
 
 

 
 Hello,  I'm trying to get all the list of deployed artifacts and save their url to be able to report them, or even to add this information into an artifactory buildinfo object. I'm using the code statedin the wiki:     

 

def deployed = ''
 Collection generatedArtifacts = currentBuild.rawBuild.getAction(org.jenkinsci.plugins.pipeline.maven.publishers.MavenReport.class).getGeneratedArtifacts();

 for (org.jenkinsci.plugins.pipeline.maven.MavenArtifact generatedArtifact:generatedArtifacts) {
 if (generatedArtifact.isDeployed()) { }
 

     The mvn deploy command is currently deploying 4 artifacts (jar, sources, javadoc and pom as 0.6.3-SNAPSHOT), those 4 artifacts are currently archived to jenkins if I do not disable the option, but when going to the list or to the generated artifacts list, I only get 3 downloadable artifacts and 5 in the list (pom is uploaded but missing from the list): maven-test-0.6.3-20200213.132009-3.jar mav