Closed alecharp closed 11 years ago
Hi, can you share the output of when running with the -X
flag for one of the configurations that failed?
You should see debug output towards the end for the downloads plugin.
ERROR] Failed to execute goal com.github.github:downloads-maven-plugin:0.6:upload (default-cli) on project zenika-parent: Listing downloads failed: Not Found (404) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.github:downloads-maven-plugin:0.6:upload (default-cli) on project zenika-parent: Listing downloads failed: Not Found (404)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Listing downloads failed: Not Found (404)
at com.github.maven.plugins.downloads.DownloadsMojo.getExistingDownloads(DownloadsMojo.java:268)
at com.github.maven.plugins.downloads.DownloadsMojo.execute(DownloadsMojo.java:306)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.eclipse.egit.github.core.client.RequestException: Not Found (404)
at org.eclipse.egit.github.core.client.GitHubClient.createException(GitHubClient.java:516)
at org.eclipse.egit.github.core.client.GitHubClient.get(GitHubClient.java:662)
at org.eclipse.egit.github.core.client.PageIterator.next(PageIterator.java:173)
at org.eclipse.egit.github.core.service.GitHubService.getAll(GitHubService.java:151)
at org.eclipse.egit.github.core.service.DownloadService.getDownloads(DownloadService.java:159)
at com.github.maven.plugins.downloads.DownloadsMojo.getExistingDownloads(DownloadsMojo.java:255)
... 22 more
Was there any output before this that wasn't a stack trace but just regular debug output from the DownloadsMojo?
The DownloadsMojo should log several messages about the credentials being used and other things.
Nothing like that. Only the "[INFO] BUILD FAILURE" things.
2012/9/19 Kevin Sawicki notifications@github.com
Was there any output before this that wasn't a stack trace but just regular debug output from the DownloadsMojo?
The DownloadsMojo should log several messages about the credentials being used and other things.
— Reply to this email directly or view it on GitHubhttps://github.com/github/maven-plugins/issues/24#issuecomment-8698747.
Adrien Lecharpentier
There should be output like this:
[INFO] [ghDownloads:upload {execution: default-cli}]
[DEBUG] Using GitHub repository sonian/elasticsearch-jetty
[DEBUG] Using 'github' server credentials
[DEBUG] Using basic authentication with username: safebot
[DEBUG] Listed 9 existing downloads
before this block:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
when running with the -X
flag.
Yes right. I was using bad mvn option. Sorry.
[DEBUG] Configuring mojo com.github.github:downloads-maven-plugin:0.6:upload from plugin realm ClassRealm[plugin>com.github.github:downloads-maven-plugin:0.6, parent: sun.misc.Launcher$AppClassLoader@7a9664a1]
[DEBUG] Configuring mojo 'com.github.github:downloads-maven-plugin:0.6:upload' with basic configurator -->
[DEBUG] (f) description = 1-SNAPSHOT release of Zenika Parent
[DEBUG] (f) includeAttached = true
[DEBUG] (f) oauth2Token = xxx
[DEBUG] (f) override = true
[DEBUG] (f) project = MavenProject: org.zenika:zenika-parent:1-SNAPSHOT @ /Users/adrien/projects/zenika/pom-parent/pom.xml
[DEBUG] (f) repositoryName = zenika-parent
[DEBUG] (f) repositoryOwner = alecharp
[DEBUG] (f) session = org.apache.maven.execution.MavenSession@38ee9f13
[DEBUG] (f) settings = org.apache.maven.execution.SettingsAdapter@5a0d2bee
[DEBUG] -- end configuration --
[DEBUG] Using GitHub repository alecharp/zenika-parent
[DEBUG] Using OAuth2 access token authentication
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.291s
[INFO] Finished at: Wed Sep 19 19:23:41 CEST 2012
[INFO] Final Memory: 14M/1132M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.github:downloads-maven-plugin:0.6:upload (default-cli) on project zenika-parent: Listing downloads failed: Not Found (404) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.github:downloads-maven-plugin:0.6:upload (default-cli) on project zenika-parent: Listing downloads failed: Not Found (404)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Listing downloads failed: Not Found (404)
at com.github.maven.plugins.downloads.DownloadsMojo.getExistingDownloads(DownloadsMojo.java:268)
at com.github.maven.plugins.downloads.DownloadsMojo.execute(DownloadsMojo.java:306)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.eclipse.egit.github.core.client.RequestException: Not Found (404)
at org.eclipse.egit.github.core.client.GitHubClient.createException(GitHubClient.java:516)
at org.eclipse.egit.github.core.client.GitHubClient.get(GitHubClient.java:662)
at org.eclipse.egit.github.core.client.PageIterator.next(PageIterator.java:173)
at org.eclipse.egit.github.core.service.GitHubService.getAll(GitHubService.java:151)
at org.eclipse.egit.github.core.service.DownloadService.getDownloads(DownloadService.java:159)
at com.github.maven.plugins.downloads.DownloadsMojo.getExistingDownloads(DownloadsMojo.java:255)
... 22 more
What scope does your OAuth token have?
downloads..
Downloads isn't a scope, the available scopes are listed here
Solved. Thanks for your time.
@alecharp No problem, glad to hear things are solved.
Hello,
I didn't manage to configure my POM / Settings to be able to upload artefacts on github download.
Here what I tried:
github.global.userName
andgithub.global.oauth2Token
setgithub.gloal.userName
empty/missing andgithub.global.oauth2Token
setusername
and api-token inpassword
fieldEach time I received a HTTP 404.
Whatever the configuration I choose, if I set my github username and my real github password in the corresponding fields, everything is ok.
Any thought about this?