Skip to content

Commit 7ba5d96

Browse files
committed
report missing processor
1 parent 4973658 commit 7ba5d96

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/main/java/io/openapiprocessor/maven/ProcessMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public void execute () throws MojoExecutionException {
8181
if (!upToDate) {
8282
log.info("Changes detected - generating target files!");
8383

84-
new ProcessorRunner(id, properties).run();
84+
new ProcessorRunner(log, id, properties).run();
8585

8686
} else {
8787
log.info("Nothing to process - all generated target files are up to date.");

src/main/java/io/openapiprocessor/maven/ProcessorRunner.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
package io.openapiprocessor.maven;
77

8+
import org.apache.maven.plugin.logging.Log;
9+
810
import java.util.Map;
911
import java.util.Optional;
1012

@@ -13,11 +15,12 @@
1315
* openapiProcessor configuration.
1416
*/
1517
class ProcessorRunner {
16-
18+
private final Log log;
1719
private final String processorName;
1820
private final Map<String, ?> processorProps;
1921

20-
ProcessorRunner (String processorName, Map<String, ?> processorProps) {
22+
ProcessorRunner (Log log, String processorName, Map<String, ?> processorProps) {
23+
this.log = log;
2124
this.processorName = processorName;
2225
this.processorProps = processorProps;
2326
}
@@ -53,6 +56,7 @@ void run () {
5356

5457
processorOld.ifPresent (openApiProcessor -> openApiProcessor.run (processorProps));
5558

59+
log.error(String.format("Processor '%s' not found!", processorName));
5660
} catch (Exception e) {
5761
throw e;
5862
}

0 commit comments

Comments
 (0)