This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new ac9c191 Fixed NPE ac9c191 is described below commit ac9c191c01340e89b7f6e01e9a25d0af16247f81 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Tue Jun 23 09:01:50 2020 +0200 Fixed NPE --- .../maven/packaging/GenerateConfigurerMojo.java | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/GenerateConfigurerMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/GenerateConfigurerMojo.java index 0554471..d7fcb42 100644 --- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/GenerateConfigurerMojo.java +++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/GenerateConfigurerMojo.java @@ -274,23 +274,25 @@ public class GenerateConfigurerMojo extends AbstractGeneratorMojo { scope = Artifact.SCOPE_COMPILE; } - Artifact art = this.artifactFactory.createDependencyArtifact(groupId, artifactId, versionRange, - type, classifier, scope, null, optional); + if (this.artifactFactory != null) { + Artifact art = this.artifactFactory.createDependencyArtifact(groupId, artifactId, versionRange, + type, classifier, scope, null, optional); - if (scope.equalsIgnoreCase(Artifact.SCOPE_SYSTEM)) { - art.setFile(new File(dependency.getSystemPath())); - } + if (scope.equalsIgnoreCase(Artifact.SCOPE_SYSTEM)) { + art.setFile(new File(dependency.getSystemPath())); + } - List<String> exclusions = new ArrayList<>(); - for (Exclusion exclusion : dependency.getExclusions()) { - exclusions.add(exclusion.getGroupId() + ":" + exclusion.getArtifactId()); - } + List<String> exclusions = new ArrayList<>(); + for (Exclusion exclusion : dependency.getExclusions()) { + exclusions.add(exclusion.getGroupId() + ":" + exclusion.getArtifactId()); + } - ArtifactFilter newFilter = new ExcludesArtifactFilter(exclusions); + ArtifactFilter newFilter = new ExcludesArtifactFilter(exclusions); - art.setDependencyFilter(newFilter); + art.setDependencyFilter(newFilter); - artifacts.add(art); + artifacts.add(art); + } } return artifacts;