Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

No acess to protected el4j mvn repo

Help
2011-11-10
2013-06-10
  • Recently there have been a lot of (external) bug reports in the form:

    Access denied to: http://public-el4.elca-services.ch/el4j-protected/….

    For example the following exception:

    Failed to execute goal ch.elca.el4j.maven.plugins:maven-depgraph-plugin:3.0:depgraph (default-cli) on project agis: Execution default-cli of goal ch.elca.el4j.maven.plugins:maven-depgraph-plugin:3.0:depgraph failed: Plugin ch.elca.el4j.maven.plugins:maven-depgraph-plugin:3.0 or one of its dependencies could not be resolved: Failed to collect dependencies for ch.elca.el4j.maven.plugins:maven-depgraph-plugin:jar:3.0 (): Failed to read artifact descriptor for javax.inject:inject:jar:1.0: Could not transfer artifact javax.inject:inject:pom:1.0 from/to el4jRepositoryInternal (http://public-el4.elca-services.ch/el4j-protected/maven2repository/): Access denied to: http://public-el4.elca-services.ch/el4j-protected/maven2repository/javax/inject/inject/1.0/inject-1.0.pom ->

    Causes:
    *Maven in newer versions resolves repositories different than before: sometimes it checks for ALL repositories in the list. If one of them is not available, it gives this error - even if the artefact it tries to download does not even exist in that unavailable repository.
    *Sometimes maven central seems slow. I have found that in certain cases EMPTY jar files were downloaded from (I suppose) maven central! This can lead to class not found exceptions.

    How to fix:
    *The easiest way is to set a mirror in your settings.xml file that mirrors the unavailable protected repository (it is for internal code only). E.g. something like the following:
    (Note from the author that has written this: this needs further testing)
    <mirror>
    <id>testMirror</id>
    <mirrorOf>el4jRepositoryInternal</mirrorOf>
    <name>To avoid that mvn checks an unneeded repository</name>
    <url>file:///D:/tmp</url>
    </mirror>

    Cheers,
    P

     
  • Hi,

    I am observing the same issue, but cannot solve it with the given hint.
    I have defined the following repositories for el4j:

    <repository>
        <id>el4jReleaseRepositoryExternal</id>
        <name>External release repository of the EL4J project</name>
        <url>http://public-el4.elca-services.ch/el4j/maven2repository</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <releases>
            <enabled>true</enabled>
        </releases>
    </repository>
    <repository>
        <id>el4jReleaseRepositoryInternal</id>
        <name>Internal release repository of the EL4J project</name>
        <url>http://public-el4.elca-services.ch/el4j-protected/maven2repository/</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <releases>
            <enabled>true</enabled>
        </releases>
    </repository>
    

    and the following mirror:

    <mirror>
        <id>testMirror</id>
        <mirrorOf>el4jReleaseRepositoryInternal</mirrorOf>
        <name>To avoid that mvn checks an unneeded repository</name>
        <url>file:///C:/tmp</url>
    </mirror>
    

    And this is my mvn result:

    Could not transfer artifact javax.inject:inject:pom:1.0 from/to el4jReleaseRepositoryInternal (http://public-el4.elca-services.ch/el4j-protected/maven2repository/): Not authorized, ReasonPhrase:Authorization Required. -> [Help 1]

    Any further ideas?

     
    Last edit: Malte Brunnlieb 2013-06-10