Error building sample plugin project

I am getting errors running ‘Build the plugin by running mvn install from the project directory’.

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin org.sonarsource.sonar-packaging-maven-plugin:sonar-packaging-maven-plugin:1.23.0.740 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.sonarsource.sonar-packaging-maven-plugin:sonar-packaging-maven-plugin:jar:1.23.0.740
@
[ERROR] Unknown packaging: sonar-plugin @ line 7, column 14
@
[ERROR] The build could not read 1 project → [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin org.sonarsource.sonar-packaging-maven-plugin:sonar-packaging-maven-plugin:1.23.0.740 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.sonarsource.sonar-packaging-maven-plugin:sonar-packaging-maven-plugin:jar:1.23.0.740
@
[ERROR] Unknown packaging: sonar-plugin @ line 7, column 14

Hi,

Welcome to the community and thanks for this report!

Could you point me to the sample project you’re trying to build?

 
Thx,
Ann

Hi,

I was looking for a URL. Thankfully, that was included in your screenshot. This repo hasn’t had any meaningful maintenance in 2 years, so I suppose it’s not surprising it doesn’t compile. I’ve flagged this for the team.

 
Ann

I created my own package with 2 rules and then ran ‘mvn clean’,‘mvn clean package’ and ‘mvn install’. I got the same error message all 3 times. I think it is the POM file I copied from the Sonar pkg.

I am unable to upload the VSCODE screen. Tried several times.

Line 1/2 and line 7 of the pom.xml file have error messages

Line 1/2

4.0.0

Line 1/2 error message

[ERROR] Unresolveable build extension: Plugin org.sonarsource.sonar-packaging-maven-plugin:sonar-packaging-maven-plugin:1.23.0.740 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.sonarsource.sonar-packaging-maven-plugin:sonar-packaging-maven-plugin:jar:1.23.0.740

Under line 7 sonar-plugin

Line 7 error message

Unknown packaging: sonar-plugin @ line 7, column 14

Full screenshot:

[INFO] Scanning for projects…
Downloading from central: https://repo.maven.apache.org/maven2/org/sonarsource/sonar-packaging-maven-plugin/sonar-packaging-maven-plugin/1.23.0.740/sonar-packaging-maven-plugin-1.23.0.740.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin org.sonarsource.sonar-packaging-maven-plugin:sonar-packaging-maven-plugin:1.23.0.740 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for org.sonarsource.sonar-packaging-maven-plugin:sonar-packaging-maven-plugin:jar:1.23.0.740
@
[ERROR] Unknown packaging: sonar-plugin @ line 7, column 14

This is what AI said

This is not a code or POM problem, but a Java SSL trust/certificate issue. Fix your Java truststore or proxy settings and Maven will resolve dependencies normally.