Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty array for dependencies and licenses in debug and in dashboards #299

Open
s7an-it opened this issue Jan 18, 2022 · 1 comment
Open

Comments

@s7an-it
Copy link

s7an-it commented Jan 18, 2022

Problem - no dependencies and licenses generated or collected on successful run, I have 1 failed dependency retrieving, is it possible that it cancels everything else?
I see that exit code is influenced by this warning in the script even if is warning.
Jenkins sonar scanner plugin maven run on multibranch like this:

                                    rtMaven.run pom: 'pom.xml', goals: 'install -B -Dmaven.test.redirectTestOutputToFile=true', buildInfo: buildInfo
                                    rtMaven.run pom: 'pom.xml', goals: '-B sonar:sonar -X -Dsonar.verbose=true -Dsonar.log.level=DEBUG -Dsonar.projectKey=singRoadmap_' + serviceName + ' -Dsonar.branch.name=' + env.BRANCH_NAME, buildInfo: buildInfo

Version:
SonarQube - 9.2.4 with LTS License Check plugin 5.0
Debug:

[main] INFO org.sonarsource.scanner.maven.SonarQubeMojo - 09:44:14.469 Sensor License Check [licensecheck]
[main] INFO org.sonarsource.scanner.maven.SonarQubeMojo - 09:44:14.471 Scanning for Maven dependencies (POM: file:///home/jenkins/agent/workspace/unting-example-service_develop/pom.xml)
[main] WARNING org.sonarsource.scanner.maven.SonarQubeMojo - 09:44:19.512 Could not get dependency list via maven
[main] WARNING org.sonarsource.scanner.maven.SonarQubeMojo - 09:44:19.512 Failed to execute goal on project example-service: Could not resolve dependencies for project com.singularity:example-service:jar:3.3.0-SNAPSHOT: The following artifacts could not be resolved: com.aspose:aspose-words:jar:jdk17:19.4, com.aspose:aspose-cells:jar:19.3, com.aspose:aspose-slides:jar:jdk16:19.3: Could not find artifact com.aspose:aspose-words:jar:jdk17:19.4 in central (https://repo.maven.apache.org/maven2) -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

[main] INFO org.sonarsource.scanner.maven.SonarQubeMojo - 09:44:19.517 No license-details.json file found in /home/jenkins/agent/workspace/unting-example-service_develop/build/reports/dependency-license/license-details.json - skipping Gradle dependency scan
[main] DEBUG org.sonarsource.scanner.maven.SonarQubeMojo - 09:44:19.538 Saving dependencies for module [key=singRoadmap_example-service]: []
[main] DEBUG org.sonarsource.scanner.maven.SonarQubeMojo - 09:44:19.538 Saving licenses for project [key=singRoadmap_example-service]: []
[main] INFO org.sonarsource.scanner.maven.SonarQubeMojo - 09:44:19.540 Sensor License Check [licensecheck] (done) | time=5071ms
@Janpopan
Copy link
Contributor

Problem - no dependencies and licenses generated or collected on successful run, I have 1 failed dependency retrieving, is it possible that it cancels everything else? I see that exit code is influenced by this warning in the script even if is warning. Jenkins sonar scanner plugin maven run on multibranch like this:

As fare a I understand the code, yes, if there is an exception during capturing the list from maven, you get an empty list back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants