You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gareth Western <ga...@gmail.com> on 2006/03/22 18:04:53 UTC

Project ignoring custom respository?

Hi,

I'm trying to setup a local repository using the maven-proxy webapp. I have
successfully installed the webapp on a local Tomcat server, and i'm
monitoring the catalina.out log file to see what happens. In a project on my
local machine, I have the following specified in my pom.xml:

<project>
...
   <repositories>
     <repository>
      <id>my-repo</id>
      <name>my custom repo</name>
      <url>http://myserver:8080/maven-proxy-webapp/repository</url>
     </repository>
   </repositories>
</project>


i clean out my local machine's repository in order to try to use the
maven-proxy-webapp, however whenever I run the project (mvn compile), the
project just goes straight to ibiblio to fetch the dependencies!

Does anyone have any suggestions as to why the project is not picking up my
local repository?

Thanks,

Gareth

Re: Project ignoring custom respository?

Posted by Gareth Western <ga...@gmail.com>.
Nevermind. The problem was just a typo in my maven-proxy.properties file.

The default configuration for the ibiblio repo, when downloaded from the
maven-proxy homepage, points to http://www.ibiblio.org/maven. This should
have been (for my project) http:///www.ibiblio.org/maven2

Very annoying!

Thanks for all the replies!

Gareth

On 3/23/06, Gareth Western <ga...@gmail.com> wrote:
>
> Hi again,
>
> Yes, maven-proxy-webapp can contact the Internet (and ibiblio.org). If I
> go directly to a URL on my maven-proxy, e.g.
> http://myServer:8080/maven-proxy-webapp/repository/commons-logging/jars/commons-logging-1.0.1.jar,
> then the proxy will download and store this jar correctly. It just doesn't
> work when I'm trying to access it via the project on my local machine...
>
> On 3/22/06, Thorsten Heit <th...@xtramind.com> wrote:
>
> >
> > Hi,
>
> Does your Maven proxy have direct access to the Internet, i.e. can your
> > proxy access ibiblio.org?
> >
> > Some days ago ibiblio.org wasn't accessible for a few people for some
> > unknown reason, perhaps you should simply try again...?
> >
> > Regards
> >
> > Thorsten
> >
>

Re: Project ignoring custom respository?

Posted by Gareth Western <ga...@gmail.com>.
Hi again,

Yes, maven-proxy-webapp can contact the Internet (and ibiblio.org). If I go
directly to a URL on my maven-proxy, e.g.
http://myServer:8080/maven-proxy-webapp/repository/commons-logging/jars/commons-logging-1.0.1.jar,
then the proxy will download and store this jar correctly. It just doesn't
work when I'm trying to access it via the project on my local machine...

On 3/22/06, Thorsten Heit <th...@xtramind.com> wrote:

>
> Hi,

Does your Maven proxy have direct access to the Internet, i.e. can your
> proxy access ibiblio.org?
>
> Some days ago ibiblio.org wasn't accessible for a few people for some
> unknown reason, perhaps you should simply try again...?
>
> Regards
>
> Thorsten
>

Re: Project ignoring custom respository?

Posted by Thorsten Heit <th...@xtramind.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

> I assume this means it can't fetch the maven-resources-plugin from the
> repository (because it's not in my local one yet). But why didn't it then go
> on to try central?

Does your Maven proxy have direct access to the Internet, i.e. can your
proxy access ibiblio.org?

Some days ago ibiblio.org wasn't accessible for a few people for some
unknown reason, perhaps you should simply try again...?


Regards

Thorsten
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)

iD8DBQFEIZuVQvObkgCcDe0RApJHAKC1OH3rXdi2kOLD/N67TKtYTiWJwgCeMMlJ
EYvaLHhCMVtwDBoGEoDWKFI=
=W43x
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Project ignoring custom respository?

Posted by Gareth Western <ga...@gmail.com>.
Ah thanks! Ok, so now i'm getting somewhere. Now my internal maven proxy is
being contacted, however it doesn't seem to be able to fetch anything from
central. For example: I removed everything from ~/.m2/repository and ran my
project again, however it fell over straight away with:
[INFO]
----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
----------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-resources-plugin' does not
exist or no valid version could be found
[INFO]
----------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
----------------------------------------------------------------------------

I assume this means it can't fetch the maven-resources-plugin from the
repository (because it's not in my local one yet). But why didn't it then go
on to try central?

Sorry for all the bother, and once again thank you for your help!

Gareth

On 3/22/06, Thorsten Heit <th...@xtramind.com> wrote:

>
> No, the proxy is always contacted. See
> http://maven.apache.org/guides/mini/guide-mirror-settings.html
>
> Thorsten
>
>
>

Re: Project ignoring custom respository?

Posted by Thorsten Heit <th...@xtramind.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Gareth,

> Thanks for your reply! So by doing that, you're saying that you only want to
> use your mirror if the central repo is down, correct?

No, the proxy is always contacted. See
http://maven.apache.org/guides/mini/guide-mirror-settings.html


> However I would like to use the maven proxy before trying to contact
> central. What am I getting wrong?

That's exactly what I'm doing here: If a file doesn't yet exist on the
proxy, it is fetched from central :-)


Thorsten
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)

iD8DBQFEIY1oQvObkgCcDe0RAuUJAJ0VpwIT47SyFL37UcVZJIzEZJiVcQCeLTpo
EwLA5ubgKgiRTaNB7sGR3Ak=
=lyAR
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Project ignoring custom respository?

Posted by Gareth Western <ga...@gmail.com>.
Hi Thorsten,

Thanks for your reply! So by doing that, you're saying that you only want to
use your mirror if the central repo is down, correct?

However I would like to use the maven proxy before trying to contact
central. What am I getting wrong?

Thanks,

Gareth

On 3/22/06, Thorsten Heit <th...@xtramind.com> wrote:
>
> Hi Gareth,
>
> I'm using the following in my pom.xml:
>
> <repositories>
>   <repository>
>     <releases>
>       <enabled>false</enabled>
>     </releases>
>     <id>apache.snapshots</id>
>     <name>Apache Development Repository</name>
>     <url>http://cvs.apache.org/maven-snapshot-repository</url>
>   </repository>
> </repositories>
>
>
> The Maven proxy is specified in my settings.xml:
>
> <settings>
>   <mirrors>
>     <mirror>
>       <id>bender</id>
>       <name>Internal mirror of http://repo1.maven.org/maven2/</name>
>       <url>http://maven_proxy:9999/repository</url>
>       <mirrorOf>central</mirrorOf>
>     </mirror>
>   </mirrors>
> </settings>
>
> Thorsten
>
>

Re: Project ignoring custom respository?

Posted by Thorsten Heit <th...@xtramind.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Gareth,

> <project>
> ...
>    <repositories>
>      <repository>
>       <id>my-repo</id>
>       <name>my custom repo</name>
>       <url>http://myserver:8080/maven-proxy-webapp/repository</url>
>      </repository>
>    </repositories>
> </project>

I'm using the following in my pom.xml:

<repositories>
  <repository>
    <releases>
      <enabled>false</enabled>
    </releases>
    <id>apache.snapshots</id>
    <name>Apache Development Repository</name>
    <url>http://cvs.apache.org/maven-snapshot-repository</url>
  </repository>
</repositories>


The Maven proxy is specified in my settings.xml:

<settings>
  <mirrors>
    <mirror>
      <id>bender</id>
      <name>Internal mirror of http://repo1.maven.org/maven2/</name>
      <url>http://maven_proxy:9999/repository</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
  </mirrors>
</settings>


HTH

Thorsten
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)

iD8DBQFEIYcaQvObkgCcDe0RApXeAJ9bDDrqY8563KdBOPDmaz+PboyV8wCgrHFl
iJTyp77tUdUIIDdErGGVQ5c=
=n3Ex
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org