开发者

impossible to extend maven plugin configuration

开发者 https://www.devze.com 2023-01-16 04:29 出处:网络
I am trying to extend the maven plugin: hibernate3 (org.codehaus).All I want to do is extend their base plugin class and change some functionality.The plugin compiles and installs just fine (after usi

I am trying to extend the maven plugin: hibernate3 (org.codehaus). All I want to do is extend their base plugin class and change some functionality. The plugin compiles and installs just fine (after using maven-inherit-plugin [note: development of maven-inherit-plugin has moved to GitHub]), however at runtime I end up with trouble. For some reason, maven expects there to be a class named Component in the same package as my plugin; I'm not exactly sure why this is -- it seems to be caused by the plexus container. It seems like I should extend the org.codehaus.mojo.hibernate3.exporter.Component from the parent plugin, but ... well the author has decided 开发者_如何学编程that class is final.

Clearly extending maven plugins (at least hibernate3) more difficult that it first appears, and I am better off copying the source and modifying it.

However, if I could somehow tell plexus not to use my configuration object, and instead use the one from the parent plugin, all would be well. Can this be done (use a delegate configuration object class)?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号