Hi,

We have a Maven project that is laid out as

./domainModule
./serviceModule
./baseModule (with parent pom)
./webAppModule
./module4

We can successfully generate eclipse projects for the module using mvn eclipse:eclipse from the baseModule which sets up the classpath correctly in eclipse with the separate eclipse projects depending on each other correctly. The classes in the webAppModule are able to see the classes from other modules within the development environment.

However when we try to run the webapp within Eclipse, we get ClassNotFoundExceptions when the code attempts to reference our classes which are in the domainModule or serviceModule.

Strangely enough if I run mvn eclipse:eclipse from the webAppModule directory so that the eclipse project has dependencies on the snapshot jars in the local repo then the exact same code in the webAppModule works fine.

It seems the problem is to do with eclipse resolving the classpath dependencies on other projects, not really a Maven issue but I'm at a loss as to where else to pose this question.

Any ideas?

I'm using eclipse 3.4

I've configured wtp as follows:

                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-eclipse-plugin</artifactId>
                                <configuration>
                                        <downloadSources>true</downloadSources>
                                        <wtpversion>2.0</wtpversion>
                                </configuration>
                        </plugin>

Cheers,
Ian

Reply via email to