Hi,

Thanks a lot for your help!

I changed '<groupId>org.apache.bcel</groupId>' to
'<groupId>bcel</groupId>' and everything worked.

-Stefan Wismer

-----Original Message-----
From: Tim Kettler [mailto:[EMAIL PROTECTED] 
Sent: Mittwoch, 22. August 2007 14:09
To: Maven Users List
Subject: Re: Maven chooses the wrong repository

Hi,

Wismer Stefan wrote:
> Hi,
> 
> In our project we used apache bcel version 5.1, which got replaced by
> 5.2 on the main maven repository (http://repo1.maven.org).

What do you mean by replaced? An deployed artifact is (normally) never 
replaced (or even deleted from the repository). Also there is only 
version 5.0 and 5.1 available in the repository [1], no 5.2.

Wait... Ok, I see it now: The groupId changed from 'bcel' to 
'org.apache.bcel'. So both versions are available in the repo 
'bcel:bcel:5.1' and 'org.apache.bcel:bcel:5.2'. Nothing got replaced, 
just the groupId changed.

> For
> compatibility reasons we wanted to keep the version and provide it
using
> our own repository.

You shouldn't need to do this, see above. The old versions are still 
available form the repository.

> Although the bcel 5.1 pom is now downloaded from our
> server, the jar file is still searched only on the main repository
where
> it cannot be found. I verified this by using Wireshark: maven doesn't
> connect to our server...

How did you deploy the artifact/pom to your internal repository. Just 
copied the files or used the deploy:deploy-file mojo? You need to deploy

it so the metadata is generated properly. Perhaps this is the problem. 
See here for instructions [2].

> It doesn't even help to explicitly declare the <downloadUrl> and

The <downloadUrl/> isn't used for artifact downloading. I didn't hink 
it's even being used by maven itself. See here [2] for a description.

> <repository> in the pom file. Maven insists on downloading the jar
from
> the main repository.
> 
> What am I doing wrong?

Defining the repository either in your settings.xml or the projects 
pom.xml should be the only thing you need to do. Can you post the 
repository definition you used so we can see if it is correct (which it 
probably will since the pom got downloaded correctly.)

-Tim

[1] http://repo1.maven.org/maven2/bcel/bcel/
[2] http://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html
[3] http://maven.apache.org/ref/current/maven-model/maven.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to