Gradle mavenDeployer error while creating directory in wrong location

I have a build.gradle script with the following section for uploading artifacts to a private version of the Maven repo:

uploadArchives {
    repositories {
        mavenDeployer {
            repository(url: "/opt/maven_repo/private-release") {
                pom.artifactId = archive
            }
        }
    }
}

      

I am running a build on a unix machine and the user has write access to the / opt / maven_repo / private-release directory. However, the task fails with the following output:

:uploadArchives
Uploading: company-name/artifact-name/relX.N/artifact-name-relX.N.jar to repository remote at /opt/maven_repo/private-release
Specified destination directory cannot be created: /company-name/artifact-name/relX.N
:uploadArchives FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':uploadArchives'.
> Could not publish configuration 'archives'
   > Error deploying artifact 'artifact-name:jar': Error deploying artifact: Specified destination directory cannot be created: /company-name/artifact-name/relX.N

      

PS: the artifact is actually being pushed to ~ / .m2 / repository and I get the feeling that it is trying to create a directory in the root directory instead of the specified repository directory

+3


source to share





All Articles