Brian
Brian

Reputation: 13583

Where to download hudson library?

I want to modify a jenkins plugin called Files Found Trigger. But after I downloaded the source code from github, I found there are lots of lines started with import hudson.XXX. And I have no clue where to get the hudson library.

I thought maybe I could find some information at Jenkins Plugin Tutorial. But it seems that the tutorial doesn't mention about where to get the library.

Anyone can help?

Upvotes: 2

Views: 1592

Answers (3)

mishadoff
mishadoff

Reputation: 10789

Every jenkins plugin should refer to parent object in pom.xml

<parent>
    <groupId>org.jenkins-ci.plugins</groupId>
    <artifactId>plugin</artifactId>
    <version>2.21</version>
    <relativePath />
</parent>

You can find more examples at official git plugin https://github.com/jenkinsci/git-plugin/blob/master/pom.xml#L3

UPDATE: The plugin Files Found Trigger you're trying to modify, uses parent dependency in pom.xml https://github.com/jenkinsci/files-found-trigger-plugin/blob/master/pom.xml#L4

All import hudson.* statements, come exactly from that lib:

screenshot

Upvotes: 0

Jon S
Jon S

Reputation: 16346

There is no need to do anything, the Jenkins core has loads of references to java packages pointing to hudson.XXX. This is for legacy reasons, Jenkins used to be called Hudson. When the splitting of the project and renaming to Jenkins was done, the java package structure and names was kept in order to maintain backwards comparability for plugins (otherwise all plugins would have to be updated).

In case you've got compilation errors due to this, then something is wrong with your setup, ensure that the maven dependencies are correct as mishadoff says.

Upvotes: 0

link
link

Reputation: 2419

From here (Upgrading from Hudson to Jenkins):

Jenkins is basically a drop-in replacement to Hudson.

It's the continuation of the same code base, in same package structure. There has been no major surgery since the rename, and the rename really only affected what's shown in the UI. As such, it understands the same set of environment variables, same system properties, and the same information in the home directory. So if you rename jenkins.war as hudson.war, and simply overwrite your hudson.war, the upgrade is complete.

  • So my conclusion is: just rename hudson to jenkins.

Upvotes: 2

Related Questions