Well, you could write your own plugin which has checkstyle as a dependency. But it might be the easiest to just create a PR for the checkstyle plugin. The checkstyle plugin is maintained by maven. So why not just create a feature request?
Also, where do you want to execute the "new goal"? In the maven build or inside your java code? This will also make a difference. If it is the latter, you can just pull in the plugin as a regular dependency. You can make it optional or provided (or both) if you do not need it at runtime. Am Do., 25. Juni 2020 um 03:49 Uhr schrieb LINUS FERNANDES <linus.fernan...@gmail.com>: > > My usecase is that I need to execute a feature available in Checkstyle > that's not provided as a goal in its plugin. > > For that, I need access to the dependency classpath (latest version > always). > > Then I can execute the feature using the Ant Run plugin. > > > > > On Thu, 25 Jun 2020, 06:51 LINUS FERNANDES, <linus.fernan...@gmail.com> > wrote: > > > Is it possible to generate a classpath for a dependency not placed in the > > dependencyManagement and/or dependencies section but is attached to a > > plugin used by the project? > > > > I know it's possible to generate a path to the local repository and look > > for the latest version directory and specify the jars under it but is there > > any other way to do this preferably via a Maven plugin and one of its goals? > > > > build-classpath from the Maven dependency plugin will only generate > > classpaths for dependencies listed in the project's dependencies, not a > > plugin's direct dependencies. > > > > I don't wish to add a plugin's specific dependencies to the project's > > dependencies. > > > > Regards, > > Linus. > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org