1616
1717package io .openapiprocessor .maven ;
1818
19- import org .apache .maven .plugin .*;
20- import org .apache .maven .plugins .annotations .*;
19+ import org .apache .maven .plugin .AbstractMojo ;
20+ import org .apache .maven .plugin .MojoExecutionException ;
21+ import org .apache .maven .plugins .annotations .LifecyclePhase ;
2122import org .apache .maven .plugins .annotations .Mojo ;
22- import org .apache .maven .project . MavenProject ;
23+ import org .apache .maven .plugins . annotations . Parameter ;
2324
2425import java .io .File ;
2526import java .nio .file .Path ;
2627import java .nio .file .Paths ;
27- import java .util .*;
28+ import java .util .HashMap ;
29+ import java .util .Map ;
2830
2931/**
3032 * run an openapi-processor.
@@ -39,6 +41,9 @@ public class ProcessMojo extends AbstractMojo {
3941 @ Parameter (required = true )
4042 private String id ;
4143
44+ @ Parameter (required = false )
45+ private String processorName ;
46+
4247 @ Parameter (required = false )
4348 private File apiPath ;
4449
@@ -50,7 +55,7 @@ public class ProcessMojo extends AbstractMojo {
5055
5156 @ Override
5257 public void execute () throws MojoExecutionException {
53- String processor = String .format ("openapi-processor-%s" , id );
58+ String processor = String .format ("openapi-processor-%s" , processorName == null ? id : processorName );
5459
5560 try {
5661 getLog ().info (String .format ("%10s - %s" , "processor" , processor ));
0 commit comments