Sunday, 21 May 2017

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec cannot run program "raml2html"

I am getting maven error even though i tried doing "maven clean install" and then "maven build" however i am getting an error 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.



via Jon

No comments:

Post a Comment