It will if you use the same id, ie 'central'.

/Anders (mobile)
Den 24 maj 2014 09:36 skrev "Dan Tran" <[email protected]>:

> Anders' suggestion sounds very logical
>
> however, i found this at super pom
>
>   <repositories>
>     <repository>
>       <id>central</id>
>       <name>Central Repository</name>
>       <url>http://repo.maven.apache.org/maven2</url>
>       <layout>default</layout>
>       <snapshots>
>         <enabled>false</enabled>
>       </snapshots>
>     </repository>
>   </repositories>
>
>   <pluginRepositories>
>     <pluginRepository>
>       <id>central</id>
>       <name>Central Repository</name>
>       <url>http://repo.maven.apache.org/maven2</url>
>       <layout>default</layout>
>       <snapshots>
>         <enabled>false</enabled>
>       </snapshots>
>       <releases>
>         <updatePolicy>never</updatePolicy>
>       </releases>
>     </pluginRepository>
>   </pluginRepositories>
>
> Is there a way to disable/clear out the super pom pluginRepositories?
> If I add my own pluginRepositories, will it override the super pom
> one?
>
>
> Thanks
>
> Dan
>
>
>
>
> On Tue, May 6, 2014 at 6:20 AM, Barrie Treloar <[email protected]> wrote:
>
> > On 6 May 2014 20:23, Anders Hammar <[email protected]> wrote:
> >
> > > >
> > > > Presumably you are trying to separate artifacts used by plugins
> during
> > > > your build (where you might use e.g. GPL licensed modules) from
> > artifacts
> > > > used as dependencies in your project proper (where using that same
> GPL
> > > > licensed modules would make your legal department scream) by
> separating
> > > the
> > > > repositories used to provide them.
> > > >
> > > > As far as I know/understand all artifacts are downloaded to the same
> > > local
> > > > cache repository (~/.m2/repository), regardless of whether they were
> > > > required by some plugin or as a dependency of your project.
> > > >
> > > > This makes them available for both purposes and thus obliterates all
> > your
> > > > efforts of keeping them separate.
> > > >
> > > > Maven Masters: Please correct me if I'm wrong.
> > > >
> > >
> > > I don't think this is correct with Maven 3. Maven 3 uses Aether which
> > AFAIK
> > > keeps the repository id for the artifact to verify from where it was
> > > downloaded. Haven't verified for this use case though.
> > >
> > > So, using Maven 3 it should be possible to specify one repository
> > > declaration for your deps and one pluginRepository declaration (with a
> > > different repo id) for your plugins (incl deps). If you msut use mirror
> > > declarations, I would use this for the deps and add exclusions (using
> > '!')
> > > for any pluginRepository.
> > >
> > > /Anders
> >
> >
> > I don't remember what happens for duplicates.
> > I think it used to complain that the artifact doesn't exist (if the one
> it
> > downloaded from is not available, even though its available elsewhere).
> >
> > The GPL example isn't a good one, as the output of running GPL is not GPL
> > itself.
> >
> > I think Nexus allows you to restrict things by licence so that you can
> > curate what is available in your repository manager. You'd have to look
> at
> > the docs to find out.
> >
>

Reply via email to