-
Bug
-
Resolution: Unresolved
-
Minor
-
None
Environment
- Jenkins ver. 2.60.1 (see about.md for full details)
- Artifactory Version 5.2.0
Issue
Using this Jenkinsfile use-case: https://github.com/JFrogDev/project-examples/blob/b1470a12863df239ae059f1683158b1555da3a5e/jenkins-pipeline-examples/gradle-example/Jenkinsfile
According to https://github.com/jenkinsci/artifactory-plugin/blob/ef6bb05155f8507fea46e2f8e0a727ec9426cadb/src/main/webapp/help/common/help-deployedArtifactExcludePattern.html Multiple exclusions work as Comma or space-separated list
After trying all the following options on line 24
// Option 1 rtGradle.deployer.artifactDeploymentPatterns.addExclude("*.war, *.jar") // Option 2 rtGradle.deployer.artifactDeploymentPatterns.addExclude("*.war *.jar") // Option 3 rtGradle.deployer.artifactDeploymentPatterns.addExclude("*.jar").addExclude("*.war")
None of them work and has the same result: artifactory deploys everything
Console Output
Deploying artifact: http://localhost:8081/artifactory/libs-snapshot-local/org/jfrog/example/gradle/api/1.0-SNAPSHOT/api-1.0-SNAPSHOT-javadoc.jar Deploying artifact: http://localhost:8081/artifactory/libs-snapshot-local/org/jfrog/example/gradle/api/1.0-SNAPSHOT/api-1.0-SNAPSHOT-sources.jar Deploying artifact: http://localhost:8081/artifactory/libs-snapshot-local/org/jfrog/example/gradle/api/1.0-SNAPSHOT/api-1.0-SNAPSHOT.jar Deploying artifact: http://localhost:8081/artifactory/libs-snapshot-local/org/jfrog/example/gradle/webservice/1.0-SNAPSHOT/webservice-1.0-SNAPSHOT-javadoc.jar Deploying artifact: http://localhost:8081/artifactory/libs-snapshot-local/org/jfrog/example/gradle/webservice/1.0-SNAPSHOT/webservice-1.0-SNAPSHOT-sources.jar Deploying artifact: http://localhost:8081/artifactory/libs-snapshot-local/org/jfrog/example/gradle/webservice/1.0-SNAPSHOT/webservice-1.0-SNAPSHOT.war Deploying artifact: http://localhost:8081/artifactory/libs-snapshot-local/org/jfrog/example/gradle/shared/1.0-SNAPSHOT/shared-1.0-SNAPSHOT-javadoc.jar Deploying artifact: http://localhost:8081/artifactory/libs-snapshot-local/org/jfrog/example/gradle/shared/1.0-SNAPSHOT/shared-1.0-SNAPSHOT-sources.jar Deploying artifact: http://localhost:8081/artifactory/libs-snapshot-local/org/jfrog/example/gradle/shared/1.0-SNAPSHOT/shared-1.0-SNAPSHOT.jar
1 exclusion pattern only work as expected
rtGradle.deployer.artifactDeploymentPatterns.addExclude("*.jar")
Result: *jar are excluded from uploading
Skipping the deployment of 'org/jfrog/example/gradle/api/1.0-SNAPSHOT/api-1.0-SNAPSHOT-javadoc.jar' due to the defined include-exclude patterns. Skipping the deployment of 'org/jfrog/example/gradle/api/1.0-SNAPSHOT/api-1.0-SNAPSHOT-sources.jar' due to the defined include-exclude patterns. Skipping the deployment of 'org/jfrog/example/gradle/api/1.0-SNAPSHOT/api-1.0-SNAPSHOT.jar' due to the defined include-exclude patterns. Skipping the deployment of 'org/jfrog/example/gradle/webservice/1.0-SNAPSHOT/webservice-1.0-SNAPSHOT-javadoc.jar' due to the defined include-exclude patterns. Skipping the deployment of 'org/jfrog/example/gradle/webservice/1.0-SNAPSHOT/webservice-1.0-SNAPSHOT-sources.jar' due to the defined include-exclude patterns. Deploying artifact: http://localhost:8081/artifactory/libs-snapshot-local/org/jfrog/example/gradle/webservice/1.0-SNAPSHOT/webservice-1.0-SNAPSHOT.war Skipping the deployment of 'org/jfrog/example/gradle/shared/1.0-SNAPSHOT/shared-1.0-SNAPSHOT-javadoc.jar' due to the defined include-exclude patterns. Skipping the deployment of 'org/jfrog/example/gradle/shared/1.0-SNAPSHOT/shared-1.0-SNAPSHOT-sources.jar' due to the defined include-exclude patterns. Skipping the deployment of 'org/jfrog/example/gradle/shared/1.0-SNAPSHOT/shared-1.0- SNAPSHOT.jar' due to the defined include-exclude patterns.
Additional notes
Maven multiple exclusion works as expected
carlosrodlop thank you for reporting this issue,
We have identified and working on a fix for this issue.
The fix will be included in the upcoming release.