Skip to content
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.

only generate one project.pom.asc #5

Closed
wants to merge 2 commits into from
Closed

only generate one project.pom.asc #5

wants to merge 2 commits into from

Conversation

signed
Copy link

@signed signed commented Mar 5, 2013

When deploying a relase with the 0.2 version on gradle 1.4 I always get an Error like

Uploading: com/github/signed/jvm-protocol-handler/jvm-protocol-handler/0.0.2/jvm-protocol-handler-0.0.2.pom.asc to repository remote at http://localhost:8081/nexus/content/repositories/releases
Transferring 0K from remote
Uploaded 0K
Uploading: com/github/signed/jvm-protocol-handler/jvm-protocol-handler/0.0.2/jvm-protocol-handler-0.0.2.pom.asc to repository remote at http://localhost:8081/nexus/content/repositories/releases
Transferring 0K from remote
:uploadArchives FAILED

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':uploadArchives'.
> Could not publish configuration 'archives'
> Error deploying artifact 'com.github.signed.jvm-protocol-handler:jvm-protocol-handler:jar': Error deploying artifact: Failed to transfer file: http://localhost:8081/nexus/content/repositories/releases/com/github/signed/jvm-protocol-handler/jvm-protocol-handler/0.0.2/jvm-protocol-handler-0.0.2.pom.asc. Return code is: 400

The log states, that after the first successfull upload of jvm-protocol-handler-0.0.2.pom.asc the attempt to upload the file a second time failed. The second attempt to upload the file occures, because the pom.asc file is actually generated two identical pom.asc files.

With this patch the plugin only generates only one pom.asc file.

@signed
Copy link
Author

signed commented Sep 16, 2013

I am still having this problem with version 0.3.
How do I have to configure the plugin to avoid this?
If I apply the changes in this pull request, everything works as I expect it.
If you want to reproduce the problem, please have a look at https://github.com/signed/gradle-hamcrest-plugin.
I tested it this with a local nexus installation.

Any feedback is appreciated.

@bmuschko
Copy link
Owner

I think what needs to happen instead is this:

project.tasks.withType(Upload) { task ->
    task.repositories.mavenDeployer() {
        beforeDeployment { MavenDeployment deployment ->
            signPom(deployment)
        }
    }
}

Would you mind trying that out?

@ghost ghost assigned bmuschko Oct 27, 2013
@bmuschko
Copy link
Owner

Thanks for pointing me to the issue.

@bmuschko bmuschko closed this Oct 27, 2013
@signed
Copy link
Author

signed commented Oct 28, 2013

After figuring out the bintray change the new 0.4 version works for me.
The asc file is uploaded only once. Thx for looking into this.

@signed signed deleted the upload-pom-signature-only-once branch October 28, 2013 20:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants