github / maven-plugins

Official GitHub Maven Plugins
MIT License
584 stars 198 forks source link

Fix user-agent-required when updating download and site #37

Closed cescoffier closed 11 years ago

cescoffier commented 11 years ago

By updating to the latest org.eclipse.egit.github.core, it fixes the following error:

Failed to execute goal com.github.github:downloads-maven-plugin:0.5:upload (default) on project h-ubu: Listing downloads failed: Missing or invalid User Agent string. See http://developer.github.com/v3/#user-agent-required (403) -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.github:downloads-maven-plugin:0.5:upload (default) on project h-ubu: Listing downloads failed: Missing or invalid User Agent string. See http://developer.github.com/v3/#user-agent-required (403)

cescoffier commented 11 years ago

As a turn around for the time being:

<plugin>
            <!-- Deploy the web site -->
            <groupId>com.github.github</groupId>
            <artifactId>site-maven-plugin</artifactId>
            <version>0.7</version>
            <executions>
                <execution>
                    <goals>
                        <goal>site</goal>
                    </goals>
                    <phase>site-deploy</phase>
                    <configuration>
                        <message>Building site for ${project.version}</message>
                        <path>${site.path}</path>
                        <merge>true</merge>
                    </configuration>
                </execution>
            </executions>
            <dependencies>
                <dependency>
                    <groupId>org.eclipse.mylyn.github</groupId>
                    <artifactId>org.eclipse.egit.github.core</artifactId>
                    <version>2.0.3</version>
                </dependency>                        
            </dependencies>    
        </plugin>
        <plugin>
            <!-- Create the file to download -->
            <groupId>com.github.github</groupId>
            <artifactId>downloads-maven-plugin</artifactId>
            <version>0.6</version>
            <executions>
                <execution>
                    <goals>
                        <goal>upload</goal>
                    </goals>
                    <phase>site-deploy</phase>
                </execution>
            </executions>
            <configuration>
                <description>${project.version} version of ${project.name}</description>
                <override>true</override>
                <includeAttached>false</includeAttached>
                <includes>
                    <include>${project.artifactId}*.js</include>
                </includes>    
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.eclipse.mylyn.github</groupId>
                    <artifactId>org.eclipse.egit.github.core</artifactId>
                    <version>2.0.3</version>
                </dependency>                        
            </dependencies>    
        </plugin>

By adding the dependencies to the plugin, it makes it works.

peterneubauer commented 11 years ago

Had the same problem. Thank for fixing it!

branflake2267 commented 11 years ago

Nice job. Thanks for the work around. :)

kevinsawicki commented 11 years ago

Merged this into master, thanks, I'll push a new release shortly with it.