Building an hpi file?

32 views
Skip to first unread message

Simon Matthews

unread,
May 25, 2022, 3:18:14 PM5/25/22
to Jenkins Developers
I am attempting to build a modified version of the analysis-model plugin.I think that I need to create an hpi file which I can then install in my jenkins installation, but if this is not correct, please tell me.

It's not clear to me how to do this from the command line: I think it has changed over time, so there are plenty of old pages that are now incorrect.

I think that I need to use maven to build the "hpi:hpi" target, but this may be wrong. In any case, attempts to do this result in an error: I have tried other targets, such as "package" and "install". They appear to complete the build successfully, but don't create an hpi file.

Running:
~/bin/apache-maven-3.8.5/bin/mvn hpi:hpi
results in:
[ERROR] Failed to execute goal org.jenkins-ci.tools:maven-hpi-plugin:3.29-rc1263.227a_29289ce3:hpi (default-cli) on project analysis-model: Failed to determine Jenkins version this plugin depends on. -> [Help 1]
I have tried adding the following to my pom.xml file:
    <jenkins.version>2.332.3</jenkins.version>
but it doesn't help.

What am I doing wrong?

Simon

Baptiste Mathus

unread,
May 25, 2022, 3:33:46 PM5/25/22
to Jenkins Developers
analysis-model is a jar, not a plugin. So it will create a jar as expected.
It is used by other plugins I think (cannot check just now).

What are you trying to achieve?

--
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/549954d3-3d28-46dd-a3b8-2d450474c87an%40googlegroups.com.

Simon Matthews

unread,
May 25, 2022, 4:17:03 PM5/25/22
to Jenkins Developers
I am trying to add another parser. The intent is that the warnings-ng plugin will show (and use) my new additional parser and I believe that they way to achieve that is through adding the parser to analysis-model.

Simon

Gavin Mogan

unread,
May 25, 2022, 4:22:38 PM5/25/22
to Jenkins Developers
From the last time I looked into this, the recommendation is to use
https://github.com/uhafner/warnings-ng-plugin-devenv (which is linked
from one or more of the readmes)
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/1a70187a-1ead-4607-bce9-acdcf2348819n%40googlegroups.com.

Ullrich Hafner

unread,
May 26, 2022, 4:16:01 PM5/26/22
to JenkinsCI Developers
Yes, using the development environment is the recommended way, since the setup simplifies the build steps.

The analysis-model is split into two modules: 
- analysis-model: a Java library (jar file) that is used in Jenkins or in GitHub Actions
- analysis-model-ap-plugin: a Jenkins Plugin Wrapper to provide the analysis-model jar for Jenkins plugins (actually for the only know dependency warnings-ng).

In my dev environment I have a script (analysis-model/etc/go.sh ) that builds the Jenkins Plugin *and* the Java library:
1) Build analysis-model jar with your new parser
2) Build analysis-model-api hpi (I.e., Jenkins Plugin wrapper), that wraps the SNAPSHOT jar into a Jenkins Plugin


Reply all
Reply to author
Forward
0 new messages