Some questions on plugin development

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Some questions on plugin development

Jochen Wiedmann

Hi,

I'd like to create a Jenkins plugin. However, I have some questions, hopefully you are able to help me with:

- My plugin A is designed to provide an extension for an extension point, which is defined by plugin B (existing).
- My understanding is, that I simply create a subclass of the extension point class, which in turn implements
  hudson.ExtensionPoint. No annotations, or something like that?
- Í assume, that I declare the jar files of B in my plugin as Maven dependencies with scope "provided", so that
  the necessary API is present at compile time.
- However, I do not understand, how dependency resolution works at runtime. Am I supposed to declare that
  plugin B must be in the classpath of plugin A? If so: How do I do that? Or, is there some magic, I am unaware
  of?
- Finally: I'd like to configure my plugin with some config files location. How would I do that? (Preferrably without
  some UI, I am trying to keep things simple.

Thanks,

Jochen

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/38140fc6-b564-4cf9-a2da-9f3ddbe43018%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Some questions on plugin development

Jesse Glick-4
On Wed, Dec 20, 2017 at 2:04 PM, Jochen Wiedmann
<[hidden email]> wrote:
> My plugin A is designed to provide an extension for an extension point,
> which is defined by plugin B (existing).
> - My understanding is, that I simply create a subclass of the extension
> point class, which in turn implements
>   hudson.ExtensionPoint. No annotations, or something like that?

`@Extension`

> Í assume, that I declare the jar files of B in my plugin as Maven
> dependencies with scope "provided", so that
>   the necessary API is present at compile time.

No, use `compile` scope (i.e., do not specify `<scope>` at all).

> I'd like to configure my plugin with some config files location.
> How would I do that?

You would not.

> Preferrably without
> some UI, I am trying to keep things simple.

`GlobalConfiguration`

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2v18CsB4SCq%3DR101WbY_9AhdQm7_%3DuEdwvzfQ%2B9hhoWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Some questions on plugin development

Daniel Beck
In reply to this post by Jochen Wiedmann

> On 20. Dec 2017, at 20:04, Jochen Wiedmann <[hidden email]> wrote:
>
> No annotations, or something like that?


https://jenkins.io/doc/developer/extensibility/ explains this and links to relevant Javadoc (the developer docs on jenkins.io are work in not-much-progress, but this is mostly covered -- and there are references to previous docs on the wiki for every topic we have docs on).

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/D6CE636B-3132-44B3-84F6-89E659EE7CEE%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Some questions on plugin development

Jesse Glick-4
In reply to this post by Jesse Glick-4
On Wed, Dec 20, 2017 at 4:05 PM, Jesse Glick <[hidden email]> wrote:
>> Preferrably without
>> some UI, I am trying to keep things simple.
>
> `GlobalConfiguration`

BTW

https://github.com/jenkinsci/archetypes/blob/master/README.md#usage

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2EGrj-V15u0%2BrGHtdOZXuSt-WkjFAmjf6v3L0o7e5H_Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Some questions on plugin development

Ulli Hafner

Am 21.12.2017 um 15:40 schrieb Jesse Glick <[hidden email]>:

On Wed, Dec 20, 2017 at 4:05 PM, Jesse Glick <[hidden email]> wrote:
Preferrably without
some UI, I am trying to keep things simple.

`GlobalConfiguration`


Since your plugin is related to the static analysis suite:
 

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/7E83B707-E6F4-4A38-A2CC-88A3E4112D22%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc (540 bytes) Download Attachment