0

I am trying to implement a Sphinx4 demo application using Netbeans IDE 8.0.2 and jre8. It builds successfully.

enter image description here

But when I try to run the project after setting edu.cmu.Sphinx4.demo.DemoRunner.java as the main class I get the following error.

enter image description here

The error reads

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

The POM.XML file is

<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>

Is there anything I have done wrong?

1 Answers1

0

In the output log the demo program says you need to specify an name of the demo to run as an argument otherwise it exits with an error status.

You might want just to use specific demo like edu.cmu.sphinx.demo.transcriber.TranscriberDemo, it should run without arguments.

Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87