Hi Brett,
Thanks for your response. I agree, I could request for an enhancement
where local repo remembers where a particular artifact came from. I will
log an RFE for the same.
But I think I am asking for a shorthand command to do a re-resolution
if that's what this entails. Maven already does it, when I do for instance,
"mvn [-U] install". Here, I just want something like:
mvn resolve -DgroupId=javax.persistence -DartifactId=persistence-api -Dversion=
...
and it tells me it resolved it from a particular remote repository without
even consulting local repo. So, I guess this is letting users know where
artifact resolves from, without actually installing it in local repo.
The reason I ask for this is sometimes, a local repo has gone bad or corrupt
and I want to delete it. Then, after finding out the repo from above command,
I can use it in mvn install:install-file to reinstall it locally.
- Kedar
Brett Porter wrote:
Once Maven has resolved an artifact, the local repository does not
remember where it came from, so it would not be possible to do this
reliably (without re-resolving them all, which would essentially just
be doing this in order).
You could make a feature request for Maven to remember this in the
local repository.
Another alternative is to use a repository manager. You can then proxy
in all the remote repositories (as well as getting a number of other
benefits like being able to block out certain artifacts or
repositories), and Maven can get them all from there. It is easier to
search for a given artifact's source repository in this case (or you
may no longer need to do so, depending on your reason now).
- Brett
On 20/04/2008, Kedar Mhaswade <[EMAIL PROTECTED]> wrote:
Is there a shorthand command (e.g. mvn resolve or something similar)
that tells me which repository a particular artifact comes from,
when a large project has several repositories?
Thanks,
Kedar
(Currently, I look at all the repositories (http://...) and
find that out -- this seems quite time-consuming).
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]