Closed dscho closed 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.
@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...
@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.
@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...
@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}"
?
Oops! Obviously, I did not test this. And the same should hold for artifact
, right?
True... I'll push a fix
Oops. See #2...
This pull request does the following things:
scm:git:git@github.com:dscho/pgp-maven-plugin.git
as${project.scm.connection}
whichGitHub#getRepository()
does not like at all, and in my test repository,${project.packaging}
ismaven-plugin
which is completely different from the file extension:jar
).