Some questions on plugin development

29 katselukertaa
Siirry ensimmäiseen lukemattomaan viestiin

Jochen Wiedmann

lukematon,
20.12.2017 klo 14.04.1620.12.2017
vastaanottaja Jenkins Developers

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

Jesse Glick

lukematon,
20.12.2017 klo 16.05.4920.12.2017
vastaanottaja Jenkins Dev
On Wed, Dec 20, 2017 at 2:04 PM, Jochen Wiedmann
<jochen....@gmail.com> 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`

Daniel Beck

lukematon,
20.12.2017 klo 18.35.0120.12.2017
vastaanottaja jenkin...@googlegroups.com

> On 20. Dec 2017, at 20:04, Jochen Wiedmann <jochen....@gmail.com> 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).

Jesse Glick

lukematon,
21.12.2017 klo 9.40.5621.12.2017
vastaanottaja Jenkins Dev
On Wed, Dec 20, 2017 at 4:05 PM, Jesse Glick <jgl...@cloudbees.com> wrote:
>> Preferrably without
>> some UI, I am trying to keep things simple.
>
> `GlobalConfiguration`

BTW

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

Ullrich Hafner

lukematon,
21.12.2017 klo 10.53.2021.12.2017
vastaanottaja Jenkins Developers

Am 21.12.2017 um 15:40 schrieb Jesse Glick <jgl...@cloudbees.com>:

On Wed, Dec 20, 2017 at 4:05 PM, Jesse Glick <jgl...@cloudbees.com> wrote:
Preferrably without
some UI, I am trying to keep things simple.

`GlobalConfiguration`


signature.asc
Vastaa kaikille
Vastaa kirjoittajalle
Välitä
0 uutta viestiä