mjg123 / aa-maven-plugin

maven plugin written in clojure to introduce some love to your build
2 stars 0 forks source link

Repository metadata could not be retrieved from repository #1

Open amercier opened 12 years ago

amercier commented 12 years ago

I've got an error while using this plugin:

amercier@ubuntu:~/Documents/poc-selenese$ mvn aa:validate
[INFO] Scanning for projects...
[INFO] snapshot com.github.mjg123:aa-maven-plugin:0.0.1-SNAPSHOT: checking for updates from mjg-repo
[WARNING] repository metadata for: 'snapshot com.github.mjg123:aa-maven-plugin:0.0.1-SNAPSHOT' could not be retrieved from repository: mjg-repo due to an error: Error transferring file: raw.github.com
[INFO] Repository 'mjg-repo' will be blacklisted
[INFO] snapshot com.github.mjg123:aa-maven-plugin:0.0.1-SNAPSHOT: checking for updates from amercier-snapshots
[WARNING] repository metadata for: 'snapshot com.github.mjg123:aa-maven-plugin:0.0.1-SNAPSHOT' could not be retrieved from repository: amercier-snapshots due to an error: Error transferring file: raw.github.com
[INFO] Repository 'amercier-snapshots' will be blacklisted
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).

Project ID: com.github.mjg123:aa-maven-plugin

Reason: POM 'com.github.mjg123:aa-maven-plugin' not found in repository: Unable to download the artifact from any repository

  com.github.mjg123:aa-maven-plugin:pom:0.0.1-SNAPSHOT

from the specified remote repositories:
  amercier-snapshots (https://raw.github.com/amercier/amercier-mvn-repo/master/snapshots),
  central (http://repo1.maven.org/maven2),
  mjg-repo (https://raw.github.com/mjg123/mjg-repo/master/repo)

 for project com.github.mjg123:aa-maven-plugin

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Fri Aug 17 07:02:46 PDT 2012
[INFO] Final Memory: 2M/7M
[INFO] ------------------------------------------------------------------------
amercier@ubuntu:~/Documents/poc-selenese$ cd ~/Documents/poc-selenese/ && mvn aa:validate
[INFO] Scanning for projects...
[INFO] snapshot com.github.mjg123:aa-maven-plugin:0.0.1-SNAPSHOT: checking for updates from mjg-repo
[WARNING] repository metadata for: 'snapshot com.github.mjg123:aa-maven-plugin:0.0.1-SNAPSHOT' could not be retrieved from repository: mjg-repo due to an error: Error transferring file: raw.github.com
[INFO] Repository 'mjg-repo' will be blacklisted
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).

Project ID: com.github.mjg123:aa-maven-plugin

Reason: POM 'com.github.mjg123:aa-maven-plugin' not found in repository: Unable to download the artifact from any repository

  com.github.mjg123:aa-maven-plugin:pom:0.0.1-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  mjg-repo (https://raw.github.com/mjg123/mjg-repo/master/repo)

 for project com.github.mjg123:aa-maven-plugin

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Fri Aug 17 07:05:48 PDT 2012
[INFO] Final Memory: 2M/7M
[INFO] ------------------------------------------------------------------------

Here is my pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>com.github.amercier</groupId>
    <artifactId>poc-selenium</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>

    <name>Selenium HTML Client</name>
    <description>Remote-control HTML-suite client</description>

    <build>
        <plugins>
            <plugin>
                <groupId>com.github.mjg123</groupId>
                <artifactId>aa-maven-plugin</artifactId>
                <version>0.0.1-SNAPSHOT</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>beautify</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <message>this could be the start of a beautiful build</message>
                    <show-file>plain.txt</show-file>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <pluginRepositories>
        <pluginRepository>
            <id>mjg-repo</id>
            <url>https://raw.github.com/mjg123/mjg-repo/master/repo</url>
        </pluginRepository>
    </pluginRepositories>

</project>
mjg123 commented 12 years ago

Can you try version 0.0.2 instead of 0.0.1-SNAPSHOT please? The README was out of date...

amercier commented 12 years ago

I've got the following error now :

amercier@ubuntu:~/Documents/poc-selenese$ mvn aa:validate
[INFO] Scanning for projects...
Downloading: https://raw.github.com/mjg123/mjg-repo/master/repo/com/github/mjg123/aa-maven-plugin/0.0.2/aa-maven-plugin-0.0.2.pom
[WARNING] Unable to get resource 'com.github.mjg123:aa-maven-plugin:pom:0.0.2' from repository mjg-repo (https://raw.github.com/mjg123/mjg-repo/master/repo): Error transferring file: raw.github.com
Downloading: http://repo1.maven.org/maven2/com/github/mjg123/aa-maven-plugin/0.0.2/aa-maven-plugin-0.0.2.pom
[INFO] Unable to find resource 'com.github.mjg123:aa-maven-plugin:pom:0.0.2' in repository central (http://repo1.maven.org/maven2)
Downloading: http://repo1.maven.org/maven2/com/github/mjg123/aa-maven-plugin/0.0.2/aa-maven-plugin-0.0.2.pom
[INFO] Unable to find resource 'com.github.mjg123:aa-maven-plugin:pom:0.0.2' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).

Project ID: com.github.mjg123:aa-maven-plugin

Reason: POM 'com.github.mjg123:aa-maven-plugin' not found in repository: Unable to download the artifact from any repository

  com.github.mjg123:aa-maven-plugin:pom:0.0.2

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  mjg-repo (https://raw.github.com/mjg123/mjg-repo/master/repo)

 for project com.github.mjg123:aa-maven-plugin

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Fri Aug 17 08:10:18 PDT 2012
[INFO] Final Memory: 2M/7M
[INFO] ------------------------------------------------------------------------

It's weird though, cause I can access https://raw.github.com/mjg123/mjg-repo/master/repo/com/github/mjg123/aa-maven-plugin/0.0.2/aa-maven-plugin-0.0.2.pom through my web browser. I'll double-check my maven proxy settings to see if it's a proxy issue.

amercier commented 12 years ago

Yeha ! It was indeed a proxy problem. I was able to use your repo suing the following command:

mvn aa:validate -Dhttps.proxyHost=<myproxyhost> -Dhttps.proxyPort=<myproxyport>

I never had this problem before as "standard" mvn repos use http and no https.

The solution to this issue would be to host the repo on http://mjg123.github.com/mjg-repo/... by creating a gh-pages branch.

amercier commented 12 years ago

Apparently this is a well known Maven Wagon bug: http://jira.codehaus.org/browse/WAGON-125

amercier commented 12 years ago

I tried making my own repo on https://github.com/amercier/amercier-mvn-repo and setup a gh-pages branch.

Apparently, it is possible to access XML files but not POM files :

Edit: POM is now accessible! It was probably a file transfer delay. I finally got everything working!

mjg123 commented 12 years ago

Great! Thanks for your detective work. I'll create a gh-pages branch and close the issue :)

amercier commented 12 years ago

Sweet! Thanks for your work as I would not have been able to setup my own repo without this :D