简体   繁体   中英

Custom Maven plugins and libraries

Currently, I have a few custom maven plugins which use the same libraries (JARs) as my application which uses it. It is pertinent to mention that the libraries are also custom libraries developed by us and not 3rd party. I want to let go of these libraries and integrate all of them directly inside my application source code - just have one problem - what do I do with the maven plugins which use them. Is there a way I can use the application source code (after integrating the libraries) while compiling / running the maven plugins?

Personally I wouldn't go on this path because of dependency hell etc, but if you really need to you could create a jar containing the source files (see https://maven.apache.org/plugin-developers/cookbook/attach-source-javadoc-artifacts.html ) and then in the project you need to source unpack it like this https://maven.apache.org/plugins/maven-dependency-plugin/examples/using-dependencies-sources.html .

ps: what is the reason to drop the libraries and instead use the source code?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM