Skip to content
Permalink
Browse files
all file add Apache License header
  • Loading branch information
EricJoy2048 committed Jun 16, 2020
1 parent da7e4de commit 8a152f68e3c33468e339572ef76722277d714fdb
Showing 1 changed file with 5 additions and 4 deletions.
@@ -38,7 +38,7 @@
import java.util.List;

/**
* create the spi service file
* create the spi services file
*/
@Mojo(name = "generate-dolphin-service-descriptor",
defaultPhase = LifecyclePhase.PACKAGE,
@@ -83,18 +83,19 @@ public void execute()
pluginImplClasses = findPluginImplClasses(loader);
}
catch (Exception e) {
throw new MojoExecutionException(String.format("%n%nError scanning for classes implementing %s.", pluginClassName), e);
throw new MojoExecutionException(String.format("%n%nError for find the classes that implements %s.", pluginClassName), e);
}

if (pluginImplClasses.isEmpty()) {
throw new MojoExecutionException(String.format("%n%nYou must have at least one class that implements %s.", pluginClassName));
throw new MojoExecutionException(String.format("%n%nNot find classes implements %s, You must have at least one class that implements %s.", pluginClassName, pluginClassName));
}

if (pluginImplClasses.size() > 1) {
StringBuilder sb = new StringBuilder();
for (Class<?> pluginClass : pluginImplClasses) {
sb.append(pluginClass.getName()).append(LS_ALIAS);
}
throw new MojoExecutionException(String.format("%n%nYou have more than one class that implements %s:%n%n%s%nYou can only have one per plugin project.", pluginClassName, sb));
throw new MojoExecutionException(String.format("%n%nFound more than one class that implements %s:%n%n%s%nYou can only have one per plugin project.", pluginClassName, sb));
}

try {

0 comments on commit 8a152f6

Please sign in to comment.