You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Karl Heinz Marbaise <kh...@gmx.de> on 2016/02/06 13:38:17 UTC

Manually triggeren dependency resolution within a plugin

Hi,

If i'm in a plugin can i manually trigger the resolution of artifacts 
somehow. So that MavenProject.getArtifacts() is not null...

Usually you would define the mojo like this which means the resolution 
is done by Maven core:

@Mojo( name = "xxxx",
requiresDependencyResolution = ResolutionScope.COMPILE,
)
public class WhatEverMojo
     extends AbstractMojo...

But i'm searching for a way to trigger this manually...

Someone an idea or a hint?

Thanks in advance...
Kind regards
Karl Heinz

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


Re: Manually triggeren dependency resolution within a plugin

Posted by Andreas Gudian <an...@gmail.com>.
No idea if I've done it the way it is supposed to be done, but
check AbstractCompilerMojo#resolveProcessorPathEntries in the
maven-compiler-plugin.

In case it helps... :-)


Am Samstag, 6. Februar 2016 schrieb Karl Heinz Marbaise :

> Hi,
>
> If i'm in a plugin can i manually trigger the resolution of artifacts
> somehow. So that MavenProject.getArtifacts() is not null...
>
> Usually you would define the mojo like this which means the resolution is
> done by Maven core:
>
> @Mojo( name = "xxxx",
> requiresDependencyResolution = ResolutionScope.COMPILE,
> )
> public class WhatEverMojo
>     extends AbstractMojo...
>
> But i'm searching for a way to trigger this manually...
>
> Someone an idea or a hint?
>
> Thanks in advance...
> Kind regards
> Karl Heinz
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>