I'm trying to get into Groovy scripting in Jenkins, but there seems to be no docs about this and the API is kind of split between package hudson
and jenkins
. I understand that Hudson is Jenkins' former name, and my first guess is that the devs didn't rename the old packages, but used the new name for newer code - effectively creating a mess. Is this true or am I missing something?
Asked
Active
Viewed 41 times
0

Hubert Grzeskowiak
- 15,137
- 5
- 57
- 74
-
How is it a problem? Or are you just confused? I just use jenkins, if it doesn't work for some reason I check documentation and use hudson. But later years I've just used hudson. – MaTePe Dec 07 '16 at 14:38
-
I am confused because I don't know in which package I should look for things. It seems classes and sub-packages are randomly put into one of the two packages. – Hubert Grzeskowiak Dec 07 '16 at 14:39
-
Well, it is as you say, the package is the same and probably due to too much work renaming them. From my point of view you aren't missing anything, it is like this. We'll see if you get any intelligent answer too..:) – MaTePe Dec 07 '16 at 14:48
1 Answers
1
You are somewhat right. Jenkins originated from Hudson , so left the old packages and classes as it is for 2 of the obvious reasons:
- To support the old legacy classes and codes written/used all over world. Other wise it would be difficult for every developer to either change or use something like @deprecated @SuppressWarnings
- It will take more time to change/restructure all the classes for Jenkins. Even Huge Java community also avoid such things and they only restructure the code when it requires the most. Like they did in Dictionary or Vector classes or even Collections framework during generics implementions.
You can also refer this page for some more answers: How to choose between Hudson and Jenkins?