Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] How do you define provided dependencies with Webby?

Dear all,

My web projects are usually run from maven with the jetty plugin (mvn jetty:run) - usually from within Eclipse.

I've been trying WAR overlays to reuse JSPs and tested with a simple scenario:

ProjectA (war) - has dependency to ProjectB
ProjectB (war) - the overlay

1) If I'm running jetty:run on the command line and ProjectB has been previously installed, jetty runs successfully. However:

2) If I have both projects opened on an Eclipse workspace, I can't run jetty:run in Eclipse - projectB won't be "overlayed" (e.g. jsp's of ProjectB won't be available when running the application

3) I tried Webby and managed to make the overlay work for workspace projects (and is quite impressive). But how do you define provided dependencies? More specifically, my maven-jetty-plugin has 2 dependencies (c3p0 and the postgresql driver, see [1]), but when I run Webby jetty will complain that it can't find classes from those dependencies.


Do you know how to define the dependencies in Webby? Or, alternatively, if running jetty:run with the m2e-wtp allows for war overlays with the overlay project in the workspace?

Cheers,

Miguel Almeida

[1] the jetty-maven-plugin configuration in the pom:
<plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>8.1.7.v20120910</version>
                <configuration>
                    <webAppConfig>
                        <contextPath>/</contextPath>
                    </webAppConfig>
                    <scanIntervalSeconds>5</scanIntervalSeconds>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.eclipse.jetty.aggregate</groupId>
                        <artifactId>jetty-server</artifactId>
                        <version>8.1.7.v20120910</version>
                    </dependency>
                    <dependency>
                        <groupId>postgresql</groupId>
                        <artifactId>postgresql</artifactId>
                        <version>${postgesqlDriver.version}</version>
                        <type>jar</type>
                    </dependency>
                    <dependency>
                        <groupId>c3p0</groupId>
                        <artifactId>c3p0</artifactId>
                        <version>${c3p0.version}</version>
                        <type>jar</type>
                    </dependency>
                </dependencies>
            </plugin>

Back to the top