Dependency plugin specifier in Pom.xml

8 vues
Accéder directement au premier message non lu

selva vignesh

non lue,
18 mai 2019, 02:40:1918/05/2019
à Jenkins Developers
HI,
  How to make some dependency plugin to be installed while our plugin before installing.
What are the changes need to be done at pom.xml.
Thanks in advance

Adrien Lecharpentier

non lue,
18 mai 2019, 05:47:4218/05/2019
à Jenkins Developers
Hello,

all you need is to declare the plugins as dependencies of your plugin. 
You need to specify them in `compile` scope and not optional. 

However, you should only declare those plugins if you need their code for your own plugin. 
From your question, I'm not sure it's the case.

BR,
-- Adrien

--
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 jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/f678a5d0-0ee5-4a76-b5f5-ed2b395bc674%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Adrien Lecharpentier

selva vignesh

non lue,
18 mai 2019, 11:07:2518/05/2019
à jenkin...@googlegroups.com
Hi Adrien, 
Thanks for replying.. my question is if I want to install my plugin it should ask me to mentioned plugin should be installed example pipeline plugin should be installed first and after that only allow to install my plugin.  Or else installation must be failed and showing warning message as pipeline plugin install before install my plugin. 
Hope you understand now.. If not please let me know. I will explain again. 

Jeff Pearce

non lue,
18 mai 2019, 11:46:4718/05/2019
à jenkin...@googlegroups.com
I don’t quite get it. Can you describe the real world scenario you’re trying to implement?

Best,
Jeff

Sent from my iPhone

selva vignesh

non lue,
18 mai 2019, 11:56:0318/05/2019
à jenkin...@googlegroups.com
For example if you install Jira plugin means it will install lot more plugins before it to be done. 
That’s the same scenario I want to do for some plugin. That’s what I am expecting. 
If you see in upgrademanager while installing jira plugin it will install 5 or 5 plugins like (workflow api) and all. 
Can you get it now ?

Parichay Barpanda

non lue,
18 mai 2019, 12:05:4518/05/2019
à jenkin...@googlegroups.com
Hi Vignesh,

I am not quite sure I understand your problem but installing your dependency plugins before installing your plugin should be pretty straightforward:

1) Inside POM mention your dependency plugins within 'dependencies' tag

2) Run 'mvn clean install' then 'mvn hpi:run', your plugin should run a pseudo Jenkins instance with your plugin and it's dependencies installed.

Thanks,
Parichay (baymac)

selva vignesh

non lue,
18 mai 2019, 12:19:2118/05/2019
à jenkin...@googlegroups.com
Hi Parichay, 
Yes I have tried. I have given build var plugin as a dependency and scope as compile time. 
While packaging using mvn package, it’s asking me do check commons-Lang 2.1 and Jenkins expecting 2.6. Can you please explain how Can I resolve this kind of issue. 

Parichay Barpanda

non lue,
18 mai 2019, 12:24:4618/05/2019
à jenkin...@googlegroups.com
I am not quite sure about this problem, maybe upgrade your Jenkins version to Jenkins LTS beyond 2.6 like 2.60.3.

And debugging on mailing list can be tedious and complicated. If you upload your plugin to GitHub or any other SCM and share the link I can take a look at it. 

selva vignesh

non lue,
18 mai 2019, 12:25:5818/05/2019
à jenkin...@googlegroups.com
Yeah sure. I will upload in github and let you know

Adrien Lecharpentier

non lue,
19 mai 2019, 05:57:3919/05/2019
à Jenkins Developers
What you are describing looks like an enforcer-rule report. 
It's there to let you know that your plugin depends on a older version of jenkins than what is required by one of your dependency. 

So yes, you need to update your `jenkins.version` to match what the dependency you added requires.

BR,
-- Adrien


For more options, visit https://groups.google.com/d/optout.


--
Adrien Lecharpentier
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message