Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

One person asks:

I am looking at Jenkins from time to time and this time I got as far
as reading up on creating plugins for Jenkins. What I am wondering is
why one would need Maven to build Jenkin's plugins?

Isn't this more complicated for a "simple" Java developer to have to
read up on and set up Maven rather than just implementing an
interface, adding registration of the custom class and dumping a jar
with it into a lib folder?

I do realize that Maven can be a real pain to work with. It is especially so if you are new to Maven, and your concern is understandable. But this is a conscious decision. There are several reasons why I felt the benefits of Maven outweighs its problems when it comes to Jenkins plugins:

  • Jenkin's build process involves a certain amount of source code pre-processing. If you are to do this with Ant, your build script will get a bit more complicated.
  • The packaging of the plugin .hpi file involves a certain amount of conventions, such as listing other plugin dependencies. Doing this manually is error prone, and again, your build script will get a bit more complicated.
  • Doing this as a Maven plugin makes it possible for us to provide the "hpi:run" goal. This is a critical piece of a faster edit/build/debug experience. Without Maven, this is highly non-trivial.

I think an interesting possibility might be to let a scripting language define a plugin, so that you can do some simple things very easily.

  • No labels