diff --git a/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java b/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java index 6045bda1530ab..2d3ebd900c360 100644 --- a/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java +++ b/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/ValidateMojo.java @@ -354,12 +354,10 @@ private void unzipIntoCache(List mavenSourcesArtifacts, Path extr Path target = extraSourcesPath.resolve(artifact.getGav().getArtifactId()); getLog().info("Unzipping the artifact: " + artifact + " to " + target); - if (Files.exists(target)) { - continue; + if (!Files.exists(target)) { + unzipArtifact(artifact, target); } - unzipArtifact(artifact, target); - FileUtil.findJavaFiles(target.toFile(), javaFiles); FileUtil.findXmlFiles(target.toFile(), xmlFiles); } @@ -555,7 +553,7 @@ protected void doExecuteRoutes(CamelCatalog catalog) throws MojoExecutionExcepti // find all java route builder classes findJavaRouteBuilderClasses(javaFiles, includeJava, includeTest, project); - // find all xml routes + // find all XML routes findXmlRouters(xmlFiles, includeXml, includeTest, project); for (File file : javaFiles) { @@ -847,7 +845,7 @@ private void parseJavaRouteFile( String fqn = file.getPath(); String baseDir = "."; JavaType out = Roaster.parse(file); - // we should only parse java classes (not interfaces and enums etc) + // we should only parse java classes (not interfaces and enums etc.) if (out instanceof JavaClassSource clazz) { RouteBuilderParser.parseRouteBuilderEndpoints(clazz, baseDir, fqn, fileEndpoints, unparsable, includeTest); RouteBuilderParser.parseRouteBuilderSimpleExpressions(clazz, baseDir, fqn, fileSimpleExpressions); @@ -899,7 +897,7 @@ private int validateEndpointPairs(List endpoints, String s Set producers = endpoints.stream() .filter(e -> e.isProducerOnly() && e.getEndpointUri().startsWith(scheme + ":")).collect(Collectors.toSet()); - // are there any producers that do not have a consumer pair + // are there any producers that do not have a consumer pair? for (CamelEndpointDetails detail : producers) { boolean none = consumers.stream().noneMatch(c -> matchEndpointPath(detail.getEndpointUri(), c.getEndpointUri())); if (none) {