Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-11977

Maven l10n plugin: add 'compile' scope to included localization artifacts

    XMLWordPrintable

    Details

    • Similar issues:
    • Flagged:
      Flagged
    • Processed by team:
      Platform
    • Sprint:
      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jhoffman Jeroen Hoffman
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: