Skip to content
Permalink
Browse files
Merge branch 'NPE-fix' of https://github.com/spark404/cxf-xjc-utils
This closes #1
  • Loading branch information
dkulp committed Jul 8, 2015
2 parents ad38d5a + 6c7770c commit ef81073963ef5bf56031ad4cdb8aa42ab7f6b7ba
Showing 1 changed file with 5 additions and 1 deletion.
@@ -258,7 +258,7 @@ public void execute() throws MojoExecutionException {
}
}

private List<File> resolve(String artifactDescriptor) {
private List<File> resolve(String artifactDescriptor) throws MojoExecutionException {
String[] s = artifactDescriptor.split(":");

String type = s.length >= 4 ? s[3] : "jar";
@@ -281,6 +281,10 @@ private List<File> resolve(String artifactDescriptor) {
ArtifactResolutionResult result = repository.resolve(request);
List<File> files = new ArrayList<File>();
for (Artifact a : result.getArtifacts()) {
if (a.getFile() == null) {
throw new MojoExecutionException("Unable to resolve " + a.toString()
+ " while resolving " + artifactDescriptor);
}
files.add(a.getFile());
}
if (!files.contains(artifact.getFile())) {

0 comments on commit ef81073

Please sign in to comment.