Failing to find the hpi packaging type

I am trying to build a Jenkins plugin.

What I already did was creating a Maven project from the hello-world-plugin archetype.

But when I do mvn verify, it gives me the following error:

How can I point it to the hpi package?

Hello @joris and welcome to this community. :wave:

Please, next time you want to show us logs, do a textual copy and paste, not a screenshot. :pray:

I had that kind of error when trying to build a very old plugin with a recent version of Maven.
Could you please show us your pom.xml?

hey gay, i see same error. i using maven3.9.6(use new empty repository) generate new empty plugin.
$ mvn archetype:generate -B -DarchetypeGroupId=io.jenkins.archetypes -DarchetypeArtifactId=empty-plugin -DhostOnJenkinsGitHub=true -DarchetypeVersion=1.22 -DartifactId=somefeature
$ cd somefeature
$ mvn verify

[INFO] Scanning for projects...
Downloading from repo.jenkins-ci.org: https://repo.jenkins-ci.org/public/org/jenkins-ci/plugins/plugin/4.75/plugin-4.75.pom
Downloaded from repo.jenkins-ci.org: https://repo.jenkins-ci.org/public/org/jenkins-ci/plugins/plugin/4.75/plugin-4.75.pom (54 kB at 18 kB/s)
Downloading from repo.jenkins-ci.org: https://repo.jenkins-ci.org/public/org/jenkins-ci/tools/maven-hpi-plugin/3.50/maven-hpi-plugin-3.50.pom
...(so more)
Downloaded from central: https://repo.maven.apache.org/maven2/org/mockito/mockito-bom/5.6.0/mockito-bom-5.6.0.pom (3.0 kB at 16 kB/s)
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unknown packaging: hpi @ io.jenkins.plugins:somefeature:${revision}${changelist}, E:\WorkSpace\ideaIC\test\somefeature\pom.xml, line 13, column 14
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project io.jenkins.plugins:somefeature:1.0-SNAPSHOT (E:\WorkSpace\ideaIC\test\somefeature\pom.xml) has 1 error
[ERROR]     Unknown packaging: hpi @ io.jenkins.plugins:somefeature:${revision}${changelist}, E:\WorkSpace\ideaIC\test\somefeature\pom.xml, line 13, column 14
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

have any idea?

I believe this is cross-posted from

If that’s not the case, then it may be that the same problem is happening here. In that case, the developer was trying to use Java 8 to create a new Jenkins plugin. The Jenkins project stopped supporting Java 8 for development of new plugins over a year ago.

yes, is me. sorry for enfore your double time.

Repeat my results in this:
archetype 1.22 + Java 17 work well.
archetype 1.7 + Java 8 work well.
No continue attempts.