Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324886

Summary: jetty-maven-plugin does not load dependencies in second instance within reactor build
Product: [RT] Jetty Reporter: Josh Hyde <jrh3k5>
Component: otherAssignee: Jesse McConnell <jesse.mcconnell>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: mgorovoy
Version: unspecified   
Target Milestone: 7.1.x   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
A Maven project that demonstrates the issue with jetty-maven-plugin none

Description Josh Hyde CLA 2010-09-09 14:36:20 EDT
Build Identifier: SpringSource Tool Suite 2.3.2.RELEASE

If there are two projects within a Maven reactor build that reference the 8.0.0.M1 version of jetty-maven-plugin and the downstream project defines dependencies for the plugin that the upstream project *does not*, then the downstream project's instance of the plugin will fail to find the classes on its classpath.

An example Maven project will be attached shortly.

Reproducible: Always

Steps to Reproduce:
1. From the attached jetty-classloader-test-reactor-build project, run "mvn clean verify".  The second project, when built, will throw a NoClassDefFoundError, saying it cannot find the HSQLDB JDBC driver.
2. From the same project, run "mvn clean verify -Dfixed".  The exception should not be thrown because the "fixed" property activates a profile in the upstream project that includes the HSQLDB driver in its dependencies.
Comment 1 Josh Hyde CLA 2010-09-09 14:36:52 EDT
Created attachment 178544 [details]
A Maven project that demonstrates the issue with jetty-maven-plugin
Comment 2 Jesse McConnell CLA 2011-01-11 15:31:50 EST
I suspect this is a maven version issue since we don't really deal with much at that level in the jetty maven plugin itself.  At least not for the dependencies as supplied to the plugin itself via maven declarations.

either way, I tried with this maven 3.0.2 and both projects appeared to build and run correctly.

you can reopen if you have further issues