运行Sphinx4演示应用程序时出现MojoExecutionException

时间:2015-01-01 07:29:38

标签: java maven cmusphinx

我正在尝试使用Netbeans IDE 8.0.2和jre8实现Sphinx4演示应用程序。它成功构建。

enter image description here

但是当我在设置edu.cmu.Sphinx4.demo.DemoRunner.java作为主类后尝试运行项目时,我收到以下错误。

enter image description here

错误读取

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project sphinx4-samples: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

POM.XML文件是

<project
  xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
  http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>edu.cmu.sphinx</groupId>
    <artifactId>sphinx4-parent</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>

  <artifactId>sphinx4-samples</artifactId>
  <packaging>jar</packaging>

  <name>Sphinx4 demo applications</name>

  <dependencies>
    <dependency>
      <groupId>edu.cmu.sphinx</groupId>
      <artifactId>sphinx4-core</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>edu.cmu.sphinx</groupId>
      <artifactId>sphinx4-data</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addClasspath>true</addClasspath>
              <mainClass>edu.cmu.sphinx.demo.DemoRunner</mainClass>
            </manifest>
          </archive>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>2.9</version>
    <executions>
        <execution>
            <id>attach-javadocs</id>
            <goals>
                <goal>jar</goal>
            </goals>
            <configuration>
                <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
        </execution>
    </executions>
    </plugin>

    </plugins>
  </build>
</project>

我做错了什么?

1 个答案:

答案 0 :(得分:0)

在输出日志中,演示程序说您需要指定要作为参数运行的演示名称,否则它将以错误状态退出。

你可能只想使用像edu.cmu.sphinx.demo.transcriber.TranscriberDemo这样的特定演示,它应该没有参数运行。