Search code examples
m2eembedded-jettywebby

m2e-webby and provided dependencies with jetty


I have a maven project with some provided dependencies and I am trying to run the application with webby but it give me a java.lang.ClassNotFoundException exception.

In this link it says: "Webby allows to initialize a launch configuration from the configuration of the jetty-maven-plugin".

My question is it is possible to also pass the dependencies defined in the jetty-maven-plugin? If not how can webby resolve the provided dependencies?


Solution

  • Want I did was to create a profile in the pom project:

    <profile>
            <id>webby</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>groupId</groupId>
                    <artifactId>artifactId</artifactId>
                    <version>version</version>
                </dependency>
            </dependencies>
        </profile>
    

    And then right click on the project -> properties -> Maven and added webby to the Active Maven Profiles