Hello all,
My Jenkins plugin is using a pretty standard pom.xml to create the HPI file, but I don’t see a license.xml being created or placed into WEB-INF/.
I suspect this is supposed to be automatic, as the file is automatically requested from the Jenkins Plugin Management page.
Am I missing something obvious?
Thanks,
Bo Zimmerman
licenses.xml is an xml document which contains license information about third-party libraries used in the building and execution of a Jenkins plugin.
licenses.xml is required for certain plugin information features in Jenkins to work properly. For example, log into your Jenkins server, and from the Dashboard, select “Manage Jenkins” from the left menu, and then “Manage Plugins” from the center page. Now, you should see the “Plugin Manager” page. Click on the “Installed” tab, and you will see a big list of installed plugins. Now click on the version number of any plugin. The page that pops up: THAT is built from the licenses.xml.
I expect it to be in WEB-INF because
That appears to be where the Jenkins server looks for it.
That appears to be where other Jenkins plugins have their licenses.xml file located, when I inspect the contents of their “hpi” file distributions. I just don’t know how to get one into mine in a kosher fashion. Right now, I’m having to write the file by hand, and insert it into the “hpi” package after the build completes.
LMK if I can clarify any further, and thanks for your question.
Try creating a new plugin with the Jenkins plugin archetype as described at
Compare the pom.xml from the archetype with your pom.xml. I suspect you’re missing some items or may be based on an outdated version of the parent pom.