-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
jenkins: 2.35
jenkins-artifactory-plugin: 2.8.2
gradle: 3.2.1
The following gradle scripts shows a minimal reproducer of my use case. It is a gradle project using the ivy-publish plugin. I specify a version on project level. For publishing I override the project version by using the revision attribute(I add a timestamp to the published revision). For different reasons I cannot add the timestamp on the project version.
apply plugin: 'java' apply plugin: 'ivy-publish' group = 'my.sample' version = '1.0.0.SNAPSHOT' publishing { publications { ivyJava(IvyPublication) { from components.java revision = "1.0.0.SNAPSHOT.${System.currentTimeMillis()}" } } repositories { ivy { url "$buildDir/repo" } } }
Running
./gradlew publish
without jenkins produces the desired result:
...
Published artifactory-gradle-version-bug-reproducer.jar (my.sample:artifactory-gradle-version-bug-reproducer:1.0.0.SNAPSHOT.1481626157755) to file:/C:/git/artifactory-gradle-version-bug-reproducer/build/repo/my.sample/artifactory-gradle-version-bug-reproducer/1.0.0.SNAPSHOT.1481626157755/artifactory-gradle-version-bug-reproducer-1.0.0.SNAPSHOT.1481626157755.jar
...
When building this via jenkins with enabled artifactory-plugin and gradle integration, the result is that the timestamp is not added
I also pushed the above example to github.