phoenixnap / springmvc-raml-plugin

Spring MVC - RAML Spec Synchroniser Plugin. A Maven plugin designed to Generate Server & Client code in Spring from a RAML API descriptor and conversely, a RAML API document from the SpringMVC Server implementation.
Apache License 2.0
136 stars 84 forks source link

generate-springmvc-endpoints failed #306

Closed hamza-busuri closed 4 years ago

hamza-busuri commented 4 years ago

When I follow the steps to run the app, I get the following build failure error.

Execution generate-springmvc-controllers of goal com.phoenixnap.oss:springmvc-raml-plugin:0.8.6:generate-springmvc-endpoints failed: A required class was missing while executing com.phoenixnap.oss:springmvc-raml-plugin:0.8.6:generate-springmvc-endpoints: javax/xml/bind/SchemaOutputResolver

Does anyone know how to resolve this?

claytontabone commented 4 years ago

This seems like you're using Java version 9+. Since the introduction of the Jigsaw module system Java has removed some functionality from Java. The good thing is that this functionality is available as dependencies in Maven Central. The dependencies that you seem to be missing are the following:

            <dependency>
                <groupId>jakarta.xml.bind</groupId>
                <artifactId>jakarta.xml.bind-api</artifactId>
            </dependency>

            <dependency>
                <groupId>org.glassfish.jaxb</groupId>
                <artifactId>jaxb-runtime</artifactId>
            </dependency>

Make sure you have dependency management for these to manage the version and that you include these as dependencies to the springmvc-raml-plugin and not directly to your project.