File tree Expand file tree Collapse file tree
src/main/java/io/openapiprocessor/maven Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ public class ProcessMojo extends AbstractMojo {
3030 @ Parameter (required = true )
3131 private String id ;
3232
33+ @ Parameter (required = false )
34+ private String processor ;
35+
3336 @ Parameter (required = true )
3437 private File apiPath ;
3538
@@ -45,7 +48,7 @@ public class ProcessMojo extends AbstractMojo {
4548 @ Override
4649 public void execute () throws MojoExecutionException {
4750 Log log = getLog ();
48- String processor = String .format ("openapi-processor-%s" , id );
51+ String processor = String .format ("openapi-processor-%s" , getProcessor () );
4952
5053 try {
5154 log .info (String .format ("%10s - %s" , "processor" , processor ));
@@ -86,6 +89,14 @@ public void execute () throws MojoExecutionException {
8689 }
8790 }
8891
92+ private String getProcessor () {
93+ if (processor != null ) {
94+ return processor ;
95+ }
96+
97+ return id ;
98+ }
99+
89100 private String stripBaseDir (String source ) {
90101 Path base = Paths .get (project .getBasedir ().getAbsolutePath ());
91102 Path src = Paths .get (source );
You can’t perform that action at this time.
0 commit comments