plugin development environment setup.

131 views
Skip to first unread message

Carol M

unread,
Oct 4, 2021, 5:12:38 AM10/4/21
to Jenkins Developers
Hi I need develop a jenkins plugin.
I am confused about the system setup for this goal.
I am follow this link: https://www.jenkins.io/doc/developer/tutorial/prepare/
to try to setup the development environment.
But I have the follow question:
1, Is it the right instruction I can follow?
2, My current jenkins version is 2.249.1 (finally my plugin will run on this jenkins) So 
2.1, Which JDK is good for this pulgin development, JDK 8 or JDK 11?
2.2,  I want to use Eclipse. Which Eclipse can I install,  M2Eclipse (m2e) or Maven Eclipse plugin?
    When I try to use Maven Eclipse plugin, looks it retired. So I think I need install M2Eclipse (m2e). Am I right?
2.3, Do I need install Maven also?
3, Do I need install jenkins on local maching for developing testing?
4, Develop this on Windows is better or on Ubuntu machine is better?

Thank you.
--Carol

jn...@cloudbees.com

unread,
Oct 4, 2021, 5:39:44 AM10/4/21
to Jenkins Developers
>  2.1, Which JDK is good for this pulgin development, JDK 8 or JDK 11?

I would use JDK8.  the plugin's parent POM should set things up correctly that it should not matter - but JDK8 will give you fewer suprises for the moment.

>  2.2,  I want to use Eclipse. Which Eclipse can I install,  M2Eclipse (m2e) or Maven Eclipse plugin?
    When I try to use Maven Eclipse plugin, looks it retired. So I think I need install M2Eclipse (m2e). Am I right?

use m2eclipse.


>  2.3, Do I need install Maven also?

I would recommend installing the most recent Maven version and using that to start with.
After cloning your project run mvn verify to at least confirm that your development environment is sane.

IDEs sometimes do get in the way (eclipse can have an issue where sometimes it does not generate the metadata correctly that is needed for runtime that causes tests to fail when run from the IDE (so a quick "mvn clean package -DskipTests" from the CLI will sort that out)

> 4, Develop this on Windows is better or on Ubuntu machine is better?

unless the plugin does need some linux specific things then Windows should be fine.  There are windows agents available in CI - so you can check if the plugin does compile/test correctly on windows before starting.)  At the end of the day I use windows and if required I drop into WSL2 

/James

Carol M

unread,
Oct 4, 2021, 9:13:46 AM10/4/21
to Jenkins Developers
Thank you so much, James.
Let me try.

--Carol

Carol M

unread,
Oct 4, 2021, 1:23:40 PM10/4/21
to Jenkins Developers
@James or others who can help me:
I am trying to add m2eclipse.
So I downloaded and installed Eclipse java IDE.
To try to add m2e part
I got issue. This is the steps I did:
1,     On Eclipse --> help --> Install New Sofeware --> Add
       Add  repository - name: m2eclipse
       Add  repository - location:  https://download.eclipse.org/technology/m2e/releases/latest/
      Click Add

     I got these:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I found this: 
Not Found

We're sorry, the page or file cannot be found. Here are some reasons why:

  • A file may have moved to the archives. Please contact the project members on their user forum.
  • Your file was part of a nightly or integration build which is no longer there. Simply download the latest version.
  • The project is uploading a new build, and this file is not there yet. Try again later.
Any body can help me for this issue?

Thank you.
--Carol
On Monday, October 4, 2021 at 5:39:44 AM UTC-4 jn...@cloudbees.com wrote:

jn...@cloudbees.com

unread,
Oct 4, 2021, 1:49:07 PM10/4/21
to Jenkins Developers
> So I downloaded and installed Eclipse java IDE.

Eclipse is a bit picky about aligning all the versions of the plugins with each other. 
If you are starting out afresh then I would download one of the packages that has this already like https://www.eclipse.org/downloads/packages/release/2021-09/r/eclipse-ide-java-developers rather than the base IDE and then adding to it.

Alternatively if you do not have an IDE already more people seem to use Jetbrains IntelliJ https://www.jetbrains.com/idea/

Happy coding

/James


Carol M

unread,
Oct 4, 2021, 2:52:15 PM10/4/21
to Jenkins Developers
Hi James:
The eclipse I installed is from here:   https://www.eclipse.org/downloads/packages/release/2021-09/r/eclipse-ide-java-developers
So I think I don't need add m2e as you said this package already has. Thank you.
1,         How can I verify if everything already setup?

Let me follow this url:  https://www.jenkins.io/doc/developer/tutorial/create/ to try to create a first plugin.

(Jetbrains IntelliJ https://www.jetbrains.com/idea/ : there is "Untrusted Server's Certificat" pop up all the time.)

Thank you.
--Carol

Gavin Mogan

unread,
Oct 4, 2021, 3:13:38 PM10/4/21
to Jenkins Developers
> there is "Untrusted Server's Certificat" pop up all the time.

Are you still getting it? Your likely using a really old browser or your company is messing with your certificate store. It might be why your having eclipse issues too

--
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/2ae51f09-8674-4e46-a6a4-beefab3e0ce1n%40googlegroups.com.

Mark Waite

unread,
Oct 4, 2021, 3:16:32 PM10/4/21
to jenkinsci-dev
On Mon, Oct 4, 2021 at 1:13 PM 'Gavin Mogan' via Jenkins Developers <jenkin...@googlegroups.com> wrote:
> there is "Untrusted Server's Certificat" pop up all the time.

Are you still getting it? Your likely using a really old browser or your company is messing with your certificate store. It might be why your having eclipse issues too


Could also be running an outdated version of Java.  I believe we've seen that message with versions before 8u160.
 

Carol M

unread,
Oct 4, 2021, 3:48:16 PM10/4/21
to Jenkins Developers
Hi Ga:

Yes, I still get this all the time.
Thank you for your information.
Let me contact with my company.

Thanks again.
--Carol

Carol M

unread,
Oct 4, 2021, 3:55:01 PM10/4/21
to Jenkins Developers
Hi  Mark Waite:
My laptop (Windows 10)  didn't have java before. 
Just because I need develop jenkins plugin, so I installed JDK 8. (I don't know for this purpose JDK 8 is better or JDK 11 is better? )
(Follow up with this instruction: https://www.jenkins.io/doc/developer/tutorial/prepare/ )

I am trying to use Windows to develop jenkins plugin. Or maybe I need use Ubuntu machine?
Please advise. 

Thank you.
--Carol

Mark Waite

unread,
Oct 4, 2021, 3:59:51 PM10/4/21
to jenkinsci-dev
On Mon, Oct 4, 2021 at 1:55 PM Carol M <carol....@gmail.com> wrote:
Hi  Mark Waite:
My laptop (Windows 10)  didn't have java before. 
Just because I need develop jenkins plugin, so I installed JDK 8. (I don't know for this purpose JDK 8 is better or JDK 11 is better? )
(Follow up with this instruction: https://www.jenkins.io/doc/developer/tutorial/prepare/ )

I am trying to use Windows to develop jenkins plugin. Or maybe I need use Ubuntu machine?
Please advise. 


I'm a happy Windows user.  I maintain Jenkins plugins on Windows.  No need to use an Ubuntu machine, especially if you have a Windows machine already available.

When I run 'java -version' on my Windows computer, it reports:

openjdk version "1.8.0_302"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_302-b08)
OpenJDK 64-Bit Server VM (Temurin)(build 25.302-b08, mixed mode)
 
If your Java version reports something about 1.8.0_160 or older, then the Java 8 update version could be the issue.  If your Java reports something like 1.8.0_262 or newer, the the Java 8 update version is not the issue.

Carol M

unread,
Oct 4, 2021, 4:20:13 PM10/4/21
to Jenkins Developers
Hi Mark Waite:
You are using OpenJDK. I am using JDK.
This is my installed information:
> java -version
java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode)

>mvn -v
Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Maven home: C:\apache-maven-3.8.2
Java version: 1.8.0_301, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_301\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

This is my IntelliJ IDEA information:
IntelliJ IDEA info.PNG

I think I'd better use OpenJDK. 
Where did you got the openJDK?  May I have the link? Thank you.

IntelliJ IDEA community Edition is ok for jenkins plugin develop, correct?

Please also check if I installed right Maven?

Mark Waite

unread,
Oct 4, 2021, 4:22:01 PM10/4/21
to Jenkins Developers
Your Java version is great as is your maven version.  No need to switch to OpenJDK.

I don't use IntelliJ, but I don't see any reason why it would not be great for plugin development.

Reply all
Reply to author
Forward
0 new messages