porscheinformatik / sonarqube-licensecheck

SonarQube Licensecheck Plugin
Apache License 2.0
156 stars 58 forks source link

sonar maven plugin issue due to null pointer exception #402

Open inrajeee opened 9 months ago

inrajeee commented 9 months ago

Hello, Got this error in Jenkins job when it invokes sonar analysis. Ran the job with mvn -X(debug mode) and shared the details below. Please let us know your comments

Log: [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.10.0.2594:sonar (default-cli) on project X : Cannot invoke "String.equals(Object)" because the return value of "at.porscheinformatik.sonarqube.licensecheck.license.License.getIdentifier()" is null -> [Help 1]

12 58.67 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.10.0.2594:sonar (default-cli) on project client-center-backend: Cannot invoke "String.equals(Object)" because the return value of "at.porscheinformatik.sonarqube.licensecheck.license.License.getIdentifier()" is null

12 58.69 Caused by: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "at.porscheinformatik.sonarqube.licensecheck.license.License.getIdentifier()" is null

12 58.69 at at.porscheinformatik.sonarqube.licensecheck.ValidateLicenses.lambda$checkSpdxLicense$3 (ValidateLicenses.java:174)

Janpopan commented 8 months ago

@inrajeee have you some more context? Which SQ version, which plugin version?