Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
13.2.0
-
None
-
Flagged
-
Pulsar
-
Platform 210 SSO Delivery 1
Description
Once a localization artifact is resolved, it is added to the projects' dependency tree using
project.getDependencyArtifacts().add(resolvableLocaleArtifact);
The resolvableLocaleArtifact does not have a scope defined which leads to a NullPointerException when it is combined with Jenkins and the Jenkins Artifactory-Plugin
[ERROR] NullPointerException java.lang.NullPointerException at org.jfrog.build.api.builder.BuildInfoMavenBuilder.mergeModuleDependencies(BuildInfoMavenBuilder.java:389) at org.jfrog.build.api.builder.BuildInfoMavenBuilder.mergeModuleDependencies(BuildInfoMavenBuilder.java:389)
This is reported in BuildInfoMavenBuilder at https://github.com/jfrog/build-info/issues/169 but there's no movement there to the request is to set "compile" scope in org.onehippo.cms.l10n.IncludeLocalesMojo#recurse line 133:
130 if (resolvableLocaleArtifact == null) { 131 getLog().warn("Could not resolve localization module '" + localeArtifact + "' and also no fallback to lower micro version"); 132 } else { 133 resolvableLocaleArtifact.setScope(Artifact.SCOPE_COMPILE); // addition here 134 project.getDependencyArtifacts().add(resolvableLocaleArtifact);
The above is confirmed to work for the client involved.