It smells like a reactor issue. Are you using Maven 2.x? Could you try Maven
3.0.2? Maven 3 has bug improvements (fixes) to reactor builds.

/Anders

On Fri, Jan 21, 2011 at 14:11, Smirnegger Steihnhoff
<smirneg...@gmail.com>wrote:

> Hi,
> I'm having some trouble with how maven resolves dependencies in my
> project. The project has many sub-projects, and one of the
> sub-projects does not build correctly when I build the whole project.
> This problematic project is a WAR project which contains my app's web
> services. In this project, I need two dependencies: one for the
> project containing classes generated by wsimport, and an EJB project.
> The pom has these relevant parts:
> -- wsgen plugin
> <plugin>
> --<groupId>org.codehaus.mojo</groupId>
> --<artifactId>jaxws-maven-plugin</artifactId>
> --<version>1.12</version>
> --...
> --<executions>
> ----<execution>
> ------<id>generate-wsdl</id>
> ------<phase>pre-integration-test</phase>
> ------<goals>
> --------<goal>wsgen</goal>
> ------</goals>
> ----</execution>
> --</executions>
> --<dependencies>
> ----<dependency>
> ------<groupId>${project.groupId}</groupId>
> ------<artifactId>EJB-Project</artifactId>
> ------<version>${project.version}</version>
> ------<type>ejb</type>
> ----</dependency>
> ----<dependency>
> ------<groupId>${project.groupId}</groupId>
> ------<artifactId>WS-Classes</artifactId>
> ------<version>${project.version}</version>
> ------<type>jar</type>
> ----</dependency>
> --</dependencies>
> </plugin>
> ...
> </build>
> <dependencies>
> ----<dependency>
> ------<groupId>${project.groupId}</groupId>
> ------<artifactId>EJB-Project</artifactId>
> ------<version>${project.version}</version>
> ------<type>ejb</type>
> ------<scope>provided</scope>
> ----</dependency>
> ----<dependency>
> ------<groupId>${project.groupId}</groupId>
> ------<artifactId>WS-Classes</artifactId>
> ------<version>${project.version}</version>
> ------<type>jar</type>
> ----</dependency>
> </dependencies>
>
> If I build this WAR project alone, the build is successfull. However,
> when I issue the build on the Big Project, it fails by not finding
> some classes in the EJB project (which has scope compile for the
> plugin but cannot go in the WEB-INF/lib dir of the WAR, so it has
> provided scope out of the plugin).
> If I change the EJB project's scope to compile, the build succeeds,
> but then the EJB project and all of it's dependencies end up in the
> lib directory of the WAR. This breaks stuff when I package them into
> an EAR, though.
>
> Is there something I'm overlooking? What should I do?
>
> TIA,
>
> --
> Khristian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to