Your code is logging the artifacts related to the project (not the plugin).

Your plugin’s dependencies are not dynamic.
From your plugin’s project, you can run:  mvn dependency:tree

Or maybe you can look at the Plugin’s Site documentation.  For example:  
http://anthonywhitford.com/lombok.maven/lombok-maven-plugin/dependencies.html 
<http://anthonywhitford.com/lombok.maven/lombok-maven-plugin/dependencies.html>

Hope this helps,

Anthony


> On Sep 18, 2019, at 5:48 AM, jason peck <[email protected]> wrote:
> 
> Thanks. Is there a way to directly get the list of plugin dependencies from
> within the custom plugin mojo when run in a project? The following all
> return empty sets when called from the plugin execute() method in that
> scenario:
> 
> getLog().info( "getCompileArtifacts " + project.getCompileArtifacts() );
> getLog().info( "getTestArtifacts " + project.getTestArtifacts() );
> getLog().info( "getRuntimeArtifacts " + project.getRuntimeArtifacts() );
> getLog().info( "getSystemArtifacts " + project.getSystemArtifacts() );
> getLog().info( "getDependencyArtifacts " + project.getDependencyArtifacts()
> );
> getLog().info( "getDependencies " + project.getDependencies() );
> 
> I do see getClass().getClassLoader() populated with the plugin deps, though
> I'd rather not parse that.
> 
> Thanks,
> J
> 
> On 2019/09/18 05:58:50, Anthony Whitford <[email protected]> wrote:
>> Plugins have their own dependencies that pertain to the execution of the
> plugin goals. When you declare a plugin to use in your project, you don’t
> need to mention its dependencies — the Plugin’s POM does that.>
>> 
>> 
>>> On Sep 17, 2019, at 2:26 PM, jason peck <[email protected]> wrote:>
>>>> 
>>> Apologies in advance if this is obvious.>
>>>> 
>>> Let's say I create a custom plugin. The plugin has a>
>>> <dependency></dependency>. When I use the custom plugin in another>
>>> project's pom file, do I need to also specify the
> <dependency></dependency>>
>>> in the project's pom file? Is there anyway to automatically include
> that>
>>> dependency so the user of the plugin doesn't have to do so themselves,
> or>
>>> is that bad practice?>
>>>> 
>>> Thanks!>
>>> J>
>> 
>> 
>> --------------------------------------------------------------------->
>> To unsubscribe, e-mail: [email protected]>
>> For additional commands, e-mail: [email protected]>
>> 
>> 

Reply via email to