github / maven-plugins

Official GitHub Maven Plugins
MIT License
587 stars 197 forks source link

Request Entity Too Large #2

Open velo opened 12 years ago

velo commented 12 years ago

I tried to use github:site to upload flexmojos (github.com/Flexmojos/flexmojos)

But then got this:

[ERROR] Failed to execute goal com.github.github:site-maven-plugin:0.1:site (default) on project flexmojos-maven-plugin: Error creating blob: Request Entity Too Large -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.github:site-maven-plugin:0.1:site (default) on project flexmojos-maven-plugin: Error creating blob: Request Entity Too Large 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:319) 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: Error creating blob: Request Entity Too Large at com.github.maven.plugins.site.SiteMojo.createBlob(SiteMojo.java:250) at com.github.maven.plugins.site.SiteMojo.execute(SiteMojo.java:302) 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: java.io.IOException: Request Entity Too Large at org.eclipse.egit.github.core.client.GitHubClient.createException(GitHubClient.java:385) at org.eclipse.egit.github.core.client.GitHubClient.sendJson(GitHubClient.java:498) at org.eclipse.egit.github.core.client.GitHubClient.post(GitHubClient.java:512) at org.eclipse.egit.github.core.service.DataService.createBlob(DataService.java:115) at com.github.maven.plugins.site.SiteMojo.createBlob(SiteMojo.java:246) ... 22 more [ERROR] [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

kevinsawicki commented 12 years ago

Do you happen to know the size of the file that it failed on?

If you re-run with -X it should log the path of the file before the exception.

velo commented 12 years ago

The file has 1.5Mb.... it is the checkstyle report.

tapichu commented 12 years ago

I had the same problem with a javadocs index file (about 1.4 MB). As a workaround, I configured the javadoc plugin to split the index into multiple files.

fozziethebeat commented 12 years ago

@tapichu, Could you elaborate on how you solved this problem? I have the same issue and I also tried splitting my javadoc index file but it seems i'm doing it incorrectly as that hasn't solved my problem.

tapichu commented 12 years ago

@fozziethebeat, sure, the build section of my pom.xml looks like this:

    <build>
        <plugins>
            ...
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <reportPlugins>
                        ...
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-javadoc-plugin</artifactId>
                            <version>2.8</version>
                            <configuration>
                                <show>public</show>
                                <splitindex>true</splitindex>
                            </configuration>
                        </plugin>
                        ...
                    </reportPlugins>
                </configuration>
            </plugin>
            ...
        </plugins>
    </build>

I just added <splitindex>true</splitindex> to the plugin's configuration and that was enough for me. That will split your index into multiple files, alphabetically, one file per letter.

If that doesn't work, the problem might be in another file, so I would advise you to use the -e and -X maven flags, and the <github.site.dryRun>true</github.site.dryRun> flag to track down the problem.

fozziethebeat commented 12 years ago

Ah, all of all sudden that worked. I don't know why, but even after making that change something was still causing some issues with large blobs. Thankfully the issue vanished?

In any case, thanks for posting this, it's now working perfectly!