Jenkins Artifactory Plugin (gradle) doesn't read version from gradle.properties Jenkins Artifactory Plugin (gradle) doesn't read version from gradle.properties jenkins jenkins

Jenkins Artifactory Plugin (gradle) doesn't read version from gradle.properties


According to your description, when you access the "Artifactory Release Staging" page, the "Release version" and "Next development version" fields are empty. This might be because you did not define the property names for your version and next development version in your Jenkins job configuration.Here's how you do it:1. Open your gradle.properties file and find the name of your version property. For example, if your gradle.properties contains:version=1.2-SNAPSHOTthen the name is "version".2. Open your Jenkins job configuration, and put "version" in the "Release property" and "Next development properly" text fields. You should find them under the "Release Staging" configuration.

Now, the Artifactory Release Staging page should know where to take your versions from. This configuration is not required when using Artifactory Release Staging for Maven, because in Maven the version can be found at one place only - in the pom file.

Hope this helps


The way I see it, it seems your gradle.properties could not be committed with the rest of your files with SVN. Can you check this?

If it is committed and is effectively present with all the other source files when Jenkins executes the build job, it may be worth ensuring that the Jenkins build job is looking for the gradle.properties file at the right place. The Gradle plugin's default behaviour is to search for the gradle.properties file at the root of each project. If that's not where your gradle.properties file is, you may want to set the path manually. To do so, add the following under 'switches', in your Jenkins job:

-Dgradle.user.home=$HOME/.gradle

Let me know if this helps.


possibly this happens due to the below reason, while reading the properties

  1. File permission - check the file group and owner in the work-space where your gradle.properties is located2.(Not sure on details, it helped me in resolving) After updating the correct file owner group, removed the version property from jenkins artifactory release management section and triggered the build and once it is successful and included the version in jenkins artifactory release management section and triggered the build and it solved the problem.