You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by amaresh mourya <am...@gmail.com> on 2010/08/02 12:45:24 UTC

MavenProject.getRepositories() method doesn't return exact repos second time onwards

Hi All,

I want to extract list of repositories that any pom.xml (say A) can access.
I mean repositories explicitly written in pom and all repositories accessed
by its parent's POM (say B).

MavenProject.getRepositories() is doing the job only for the first time, but
if I add any repository in B and then ask getRepositories(), I am not
getting newly added repository, it seems, parent's POM repositories are
being saved for a particular session. If I restart my application and again
follow above steps..everything works well only for the first time as
described above..

Any Idea?

Thanks,
Amaresh

Re: MavenProject.getRepositories() method doesn't return exact repos second time onwards

Posted by Ron Wheeler <rw...@artifact-software.com>.
  If you are serious about Maven, install Nexus, have your POMs use 
Nexus as a proxy so that the developers only have to work with one 
repository and provide access to your external repos through Nexus.

(may work for other Maven repo software; I know it works for Nexus.)

Ron

On 02/08/2010 6:45 AM, amaresh mourya wrote:
> Hi All,
>
> I want to extract list of repositories that any pom.xml (say A) can access.
> I mean repositories explicitly written in pom and all repositories accessed
> by its parent's POM (say B).
>
> MavenProject.getRepositories() is doing the job only for the first time, but
> if I add any repository in B and then ask getRepositories(), I am not
> getting newly added repository, it seems, parent's POM repositories are
> being saved for a particular session. If I restart my application and again
> follow above steps..everything works well only for the first time as
> described above..
>
> Any Idea?
>
> Thanks,
> Amaresh
>


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