Hi,

I have a multi-module project.  I have some test resources that a
project needs at runtime that are defined in another project.  I know
the correct would be to move shared resources into their own project,
but I don't have that luxury right now.  So, I do this:

<testResources>
    <testResource>
        <directory>${basedir}/../other-project/src/test/resources/</directory>
        <includes>
            <include>some-file.xml</include>
        </includes>
    </testResource>
</testResources>

Then run:

mvn process-test-resources

This puts some-file.xml under target/test-classes/some-file.xml, which
is great b/c I need it there on the test classpath.  So far so
good...until I create the eclipse project and the eclipse plugin adds
this line to the .classpath file:

<classpathentry kind="src"
path="C:/path/other-project/src/test/resources"
output="target/test-classes" including="some-file.xml"
excluding="**/*.java"/>

The problem is the windows path-name
[C:/path/other-project/src/test/resources]...apparently, eclipse can't
deal with it.  Under the problems tab in eclipse, it notes that the
resource can't be found, and the project can't be built.  I have to
manually go into Eclipse and delete the link, and link it back in
manually.

I've tried a number of different ways to get around this looking at
the various options for maven-eclipse-plugin and
maven-resources-plugin, but I'm coming up short.  Any ideas??

Thanks in advance,
Davis

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to