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