jutzig / github-release-plugin

uses the github release api to upload files
69 stars 24 forks source link

Miscellanous #1

Closed dscho closed 10 years ago

dscho commented 10 years ago

This pull request does the following things:

jutzig commented 10 years ago

This looks great, thank you! I'll have to add the curl hack again though because it does not work on my machine to upload with java. I tried the API, plain HttpConnection, apache http client, nothing works. Probably an issue with my JVM... I'll add an option to switch to curl so it stays usable for me as well.

dscho commented 10 years ago

@jutzig this is strange. I reverted the cURL hack explicitly to find out why it is failing, only to find that it is not failing here at all.

Do you think you could give me a full stack trace and maybe information as to the size of the file you are trying to upload? I have a hunch that there is some timeout parameter we need to pass to GitHub's API via a header or some such...

jutzig commented 10 years ago

@dscho I don't quite remember the exact issue, but it would always hang for several minutes (5 or 10) and then exit with a timeout. The artifact I was uploading was rather small though and I got the exact same results with several different approaches. After the failure, the artifact was actually visible in github, but as a 0 byte file. I'll post the stacktrace (if it still appears) and some more details later this evening.

dscho commented 10 years ago

@jutzig just for reference, I tested with this release: https://github.com/dscho/pgp-maven-plugin/releases/tag/1.1-SNAPSHOT. For me, it did not hang, it uploaded the artifact as I wanted (after I overrode the faulty artifact name -- the plugin looked for an artifact with the file extension .maven-plugin)...

FWIW this was done on MacOSX Snow Leopard...

jutzig commented 10 years ago

@dscho I tried this again in works fine now, I just uploaded an asset with it. Must have been some kind of freak incident at that specific day... Anyways, thanks again for the pull request. However, the change to repositoryId is not correct, I think @parameter default="${project.scm.connection}" expression="${release.repositoryId}" Shouldn't this be @parameter default-value="${project.scm.connection}" expression="${release.repositoryId}"?

dscho commented 10 years ago

Oops! Obviously, I did not test this. And the same should hold for artifact, right?

jutzig commented 10 years ago

True... I'll push a fix

dscho commented 10 years ago

Oops. See #2...