I want to deploy binary artifacts (Linux and Mac OS X executables) to a Maven repository using Gradle’s MavenPublication
such that they are stored in the repository without a file extension (as is the case by default for binaries/executables on Linux and Mac).
Say I have a binary foo
in version 1.0.0
; in Maven terminology these would be the artifactId
and version
, respectively. The closest I can get is to deploy it under the name foo-1.0.0.
- note the trailing dot (.
). I would rather want it to be stored under the name foo-1.0.0
(i.e., without the dot). I tried not specifying the extension
property, and I also tried specifying an empty extension=''
.
publishing {
publications {
maven(MavenPublication) {
artifact("some/parent/dir/foo") {
extension ''
}
}
}
}
Is it possible to achieve this?
This question has also been asked on Stackoverflow.