[HAP-524] If a file is excluded from build, then promotion is not possible anymore Created: 22/Sep/14  Updated: 03/Jul/18  Resolved: 15/Oct/14

Status: Resolved
Project: Jenkins Artifactory Plug-in
Component/s: Gradle
Affects Version/s: 2.2.4
Fix Version/s: 2.2.4

Type: Bug Priority: Normal
Reporter: Guillaume Bibens Assignee: Eyal Ben David
Resolution: Not a Bug Votes: 0
Labels: None

Jenkins LTS

Issue Links:
relates to HAP-533 Set the "Filter excluded artifacts fr... Resolved
is related to HAP-1084 If a file is excluded from build when... Open



We encountered a problem when we start to use exclusion pattern in maven artifact deploy using Gradle integration (Gradle-Artifactory Integration -> Use Maven compatible patterns -> Exclude patterns). Indeed if we specify an exclusion pattern we are able to avoid to deploy some files generated by the build process. However we noticed that even if the file is not deployed it is still shown as part of the build in Artifactory build info.
Then if we try to promote the build, it fails saying that the exclude artifact is not found. It is indeed not deployed (as wanted) but it looks like it needs it for promotion as it is still present in build info.

Can you look into that please,


Comment by Eyal Ben David [ 08/Oct/14 ]

Hi Guillaume,
Please let me know if the following helps you resolve the issue you are describing.
In the job configuration page, under the "Exclude Patterns" text box, there's the "Filter excluded artifacts from build Info" check-box.
This options determines how will your build's excluded artifacts be recorded as part of the Build-Info json.
If the check-box is not set, then if you look the the Build-Info json in Artifactory's Build Browser, you will see the your excluded artifacts inside the "artifacts" json section for the relevant module:

"modules" : [ {
"id" : "org.jfrog.example.gradle:api:2.0",
"artifacts" : [

{ "type" : "jar", "sha1" : "ef89d6db7adcc7518481aeff57ed374a466d3b75", "md5" : "c108d766c229d10db990a9ff077659eb", "name" : "api-2.0.jar" }

"excludedArtifacts" : [ ],

Setting the check-box however will place the excluded artifact inside the excludedArtifacts section in the json and instead of the artifacts section. .
When promoting a build, Artifactory will not collect artifacts located inside the excludedArtifacts section and your promotion should be successful. We will consider changing this check-box to be on by default.

Comment by Guillaume Bibens [ 15/Oct/14 ]

Answer given in comment is OK

Comment by Eyal Ben David [ 19/Oct/14 ]

Great. In that case I'm closing this issue. I opened the below issue to have the check-box set to "on" by default (for new jobs).

Generated at Tue Sep 22 18:54:55 UTC 2020 using Jira 8.5.3#805003-sha1:b4933e02eaff29a49114274fe59e1f99d9d963d7.