1

I am getting maven error even though i tried doing "maven clean install" and then "maven build" after that. The error that i am getting is when i tried doing "Maven Build". I have already installed npm and raml2html locally but not sure what is wrong here. The error that i am getting is -

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (default) on project archival-system: Command execution failed. Cannot run program "raml2html" (in directory ""): error=2, No such file or directory -> [Help 1]

Below is my POM.XML:

<?xml version="1.0" encoding="UTF-8"?>

<project
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.project</groupId>
    <artifactId>archival</artifactId>
    <version>1.0</version>
    <name>Archival System</name>
    <description>Archival for all services</description>
    <properties>
        <maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
        <fabric8.version>2.2.144</fabric8.version>
        <app-main-class>com.project.AppInit</app-main-class>
        <maven-surefire-plugin.version>2.18.1</maven-surefire-plugin.version>
        <fabric8.maven.plugin.version>3.0.31</fabric8.maven.plugin.version>
        <exec-maven-plugin.version>1.4.0</exec-maven-plugin.version>
        <camel.version>2.17.3</camel.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <weld.version>2.3.3.Final</weld.version>
    </properties>
    <dependencyManagement>
        <dependencies>


            <dependency>
                <groupId>io.fabric8</groupId>
                <artifactId>fabric8-project-bom-with-platform-deps</artifactId>
                <version>${fabric8.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>



            <dependency>
                <groupId>org.apache.camel</groupId>
                <artifactId>camel-parent</artifactId>
                <version>${camel.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.jaxrs</groupId>
            <artifactId>jackson-jaxrs-json-provider</artifactId>
            <version>2.7.2</version>
        </dependency>
        <dependency>
            <groupId>com.commons</groupId>
            <artifactId>common-startup</artifactId>
            <version>1.13.0</version>
        </dependency>

        <dependency>
            <groupId>com.commons</groupId>
            <artifactId>member-pick-commons</artifactId>
            <version>1.0.8</version>
        </dependency>


        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.3.4</version>
        </dependency>

        <dependency>
            <groupId>com.commons</groupId>
            <artifactId>pw</artifactId>
            <version>1.0.0</version>
        </dependency>


        <dependency>
            <groupId>com.commons</groupId>
            <artifactId>common-util</artifactId>
            <version>1.5.0</version>
        </dependency>


        <dependency>
            <groupId>com.commons</groupId>
            <artifactId>database-commons</artifactId>
            <version>1.7.0</version>
        </dependency>

        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-cxf</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-transports-http-jetty</artifactId>
            <version>3.1.7</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/de.androbit/raml-converter-maven-plugin -->
<dependency>
    <groupId>de.androbit</groupId>
    <artifactId>raml-converter-maven-plugin</artifactId>
    <version>0.15</version>
</dependency>





        <!-- <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-dozer</artifactId> 
            </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http-jetty</artifactId> 
            <version>3.1.7</version> </dependency> -->
    </dependencies>

    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>



            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>${exec-maven-plugin.version}</version>
                <configuration>
                    <mainClass>${app-main-class}</mainClass>
                </configuration>
            </plugin>



            <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.4.0</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>exec</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <executable>raml2html</executable>
                <commandlineArgs>-i src/docs/api.raml -o target/api.html</commandlineArgs>
            </configuration>
        </plugin>




            <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>hawt-app-maven-plugin</artifactId>
                <version>${fabric8.version}</version>
                <executions>
                    <execution>
                        <id>hawt-app</id>
                        <goals>
                            <goal>build</goal>
                        </goals>
                        <configuration>
                            <javaMainClass>${app-main-class}</javaMainClass>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/hawt-app/route</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>route</directory>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

Any help is appreciated.

Jon
  • 33
  • 1
  • 5
  • 1
    `Cannot run program "raml2html" (in directory ""): error=2, No such file or directory` ==> maven can not find the program `raml2html` to run. – TuyenNTA May 21 '17 at 22:49
  • You can refer to [how to execute a program](http://stackoverflow.com/questions/2472376/how-do-i-execute-a-program-using-maven) – TuyenNTA May 21 '17 at 22:56
  • okay i have solved "raml2html" error. Now i am getting Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (default) on project archival-system: Command execution failed. Process exited with an error: 127 – Jon May 21 '17 at 23:01
  • For new errors ask new questions. Try and read through your logs or lookup what the error code means. Error 127 means "Command execution failed". This is happening because maven does not know how to process a command. This is most typically caused by something being missing or even though it is installed it is not properly linked in your system `PATH` (Classpath on windows). Make sure that Java, npm and whatever else that this project requires is installed correctly in the system PATH. Some more info: http://stackoverflow.com/questions/1763156/127-return-code-from – sorifiend May 22 '17 at 02:30
  • I suspect that JAVA_HOME is not set correctly in your PATH. – sorifiend May 22 '17 at 02:34

0 Answers0