This is an automated email from the ASF dual-hosted git repository.
buhhunyx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/master by this push:
new 930e6e5 cxf-codegen-plugin: fix typo in class name; fix error message
930e6e5 is described below
commit 930e6e5cbd64279a356560100090f04d81941182
Author: Alexey Markevich <[email protected]>
AuthorDate: Thu Dec 5 14:29:23 2019 +0300
cxf-codegen-plugin: fix typo in class name; fix error message
---
...ractCodegenMoho.java => AbstractCodegenMojo.java} | 20 ++++++--------------
.../cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java | 4 ++--
.../maven_plugin/wsdl2js/WSDL2JavaScriptMojo.java | 4 ++--
3 files changed, 10 insertions(+), 18 deletions(-)
diff --git
a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMojo.java
similarity index 98%
rename from
maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
rename to
maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMojo.java
index 59462a9..8b96592 100644
---
a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
+++
b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMojo.java
@@ -69,7 +69,7 @@ import org.codehaus.plexus.util.cli.Commandline;
import org.codehaus.plexus.util.cli.StreamConsumer;
import org.sonatype.plexus.build.incremental.BuildContext;
-public abstract class AbstractCodegenMoho extends AbstractMojo {
+public abstract class AbstractCodegenMojo extends AbstractMojo {
/**
* JVM/System property name holding the hostname of the http proxy.
@@ -202,7 +202,7 @@ public abstract class AbstractCodegenMoho extends
AbstractMojo {
private RepositorySystem repositorySystem;
- public AbstractCodegenMoho() {
+ public AbstractCodegenMojo() {
super();
}
@@ -617,12 +617,7 @@ public abstract class AbstractCodegenMoho extends
AbstractMojo {
Commandline cmd = new Commandline();
cmd.getShell().setQuotedArgumentsEnabled(true); // for JVM args
cmd.setWorkingDirectory(project.getBuild().getDirectory());
- try {
- cmd.setExecutable(getJavaExecutable().getAbsolutePath());
- } catch (IOException e) {
- getLog().debug(e);
- throw new MojoExecutionException(e.getMessage(), e);
- }
+ cmd.setExecutable(getJavaExecutable().getAbsolutePath());
cmd.createArg().setLine(additionalJvmArgs);
@@ -811,7 +806,7 @@ public abstract class AbstractCodegenMoho extends
AbstractMojo {
}
}
- private File getJavaExecutable() throws IOException {
+ private File getJavaExecutable() throws MojoExecutionException {
if (javaExecutable != null) {
getLog().debug("Plugin configuration set the 'javaExecutable'
parameter to " + javaExecutable);
} else {
@@ -827,11 +822,8 @@ public abstract class AbstractCodegenMoho extends
AbstractMojo {
String exe = SystemUtils.IS_OS_WINDOWS &&
!javaExecutable.endsWith(".exe") ? ".exe" : "";
File javaExe = new File(javaExecutable + exe);
if (!javaExe.isFile()) {
- throw new IOException(
- "The java executable '"
- + javaExe
- + "' doesn't exist or is not a file."
- + "Verify the <javaExecutable/>
parameter or toolchain configuration.");
+ throw new MojoExecutionException("The java executable '" + javaExe
+ "' doesn't exist or is not a file."
+ + " Verify the <javaExecutable/> parameter or toolchain
configuration.");
}
getLog().info("The java executable is " + javaExe.getAbsolutePath());
return javaExe;
diff --git
a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java
b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java
index 706e5a9..a882bdf 100644
---
a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java
+++
b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java
@@ -38,7 +38,7 @@ import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.common.classloader.ClassLoaderUtils;
import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.maven_plugin.AbstractCodegenMoho;
+import org.apache.cxf.maven_plugin.AbstractCodegenMojo;
import org.apache.cxf.maven_plugin.GenericWsdlOption;
import org.apache.cxf.tools.common.ToolContext;
import org.apache.cxf.tools.common.ToolErrorListener;
@@ -54,7 +54,7 @@ import org.sonatype.plexus.build.incremental.BuildContext;
@Mojo(name = "wsdl2java", defaultPhase = LifecyclePhase.GENERATE_SOURCES,
threadSafe = true,
requiresDependencyResolution = ResolutionScope.TEST)
-public class WSDL2JavaMojo extends AbstractCodegenMoho {
+public class WSDL2JavaMojo extends AbstractCodegenMojo {
final class MavenToolErrorListener extends ToolErrorListener {
private final List<File> errorfiles;
diff --git
a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WSDL2JavaScriptMojo.java
b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WSDL2JavaScriptMojo.java
index 10b3909..395da52 100644
---
a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WSDL2JavaScriptMojo.java
+++
b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2js/WSDL2JavaScriptMojo.java
@@ -32,7 +32,7 @@ import java.util.Set;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.maven_plugin.AbstractCodegenMoho;
+import org.apache.cxf.maven_plugin.AbstractCodegenMojo;
import org.apache.cxf.maven_plugin.GenericWsdlOption;
import org.apache.cxf.maven_plugin.WsdlUtilities;
import org.apache.cxf.tools.common.ToolContext;
@@ -47,7 +47,7 @@ import org.apache.maven.project.MavenProject;
@Mojo(name = "wsdl2js", defaultPhase = LifecyclePhase.GENERATE_SOURCES,
threadSafe = true,
requiresDependencyResolution = ResolutionScope.TEST)
-public class WSDL2JavaScriptMojo extends AbstractCodegenMoho {
+public class WSDL2JavaScriptMojo extends AbstractCodegenMojo {
@Parameter(property = "cxf.testJavascriptRoot")
File testSourceRoot;