maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Hammar <and...@hammar.net>
Subject Re: How to filter Project artifacts/dependencies?
Date Thu, 17 Oct 2013 06:26:27 GMT
I believe you handle scope via the Mojo annotation [1]. Have a look at*
 requiresDependencyResolution.*

[1]
http://maven.apache.org/plugin-tools/maven-plugin-annotations/apidocs/org/apache/maven/plugins/annotations/Mojo.html

/Anders


On Thu, Oct 17, 2013 at 5:00 AM, Pino Silvaggio <pino.silvaggio@gmail.com>wrote:

> I am writing a Maven plugin which needs to filter a project dependencies
> based criteria like scope, is snapshot, is optional, the groupId, etc...
>
> So, all the Project.getRuntimeArtifacts(), getCompileArtifacts(), etc..
> are deprecated.
>
> There is still getArtifacts().
>
> But how do you filter a project dependencies efficiently. Yea, I've looked
> at aether but that doesn't seem to be an option since it doesn't look like
> there is a way to account for the project resolved dependencies?
>
> So the question is how do you filter a project dependencies like aether
> can with filters.
>
> Also, why is there no way to ask if a dependency will be in a specific
> scope?
>
> Like if dependency a will be in scope Runtime, Compile and Test.
>
> -
>
> p
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@maven.**apache.org<users-unsubscribe@maven.apache.org>
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message