I managed to publish my artifacts by using Gradle into Artifactory. But the version is always unspecified (example-unspecified.jar)
How Can set groupId ="com.example" and version 'BUILD_NUMBER' into jenkins??
I want to publish something like that example-10.jar (10 is Jenkins build number, and group: 'com.example')
Thanks
You need to set the
groupandversionin thebuild.gradleThen the build will produce artifacts like
"$project.name-${project.version}.jar"The
groupis used by maven to organize the artifacts and is the first item in dependency notation"$project.group:$project.name:$project.version"So if we build without any params it will produce
blah-0.1.jarIf we build with the parambuild_numberit will assign the version supplied.For example:
gradlew clean build -Pbuild_number=10will produceblah-10.jar