Adrian Shum wrote:
Message ...I found that in the newly imported projects, default
output directory for resources is target/classes and
target/test-classes. For my existing projects, it is
src/main/resources and src/test/resources. I found my JUnit tests no
longer be able to load resources in test/resources (I have some unit
tests needs to load Spring's app context xml). It seems to me that
the default output directory cause problem for resources loading in
Eclipse's JUnit tests. It can be solved by either
> 1) Removing resources from build path, and add them as Class Folder
in Libraries, or
> 2) Remove the Exclude filter of resources folder in build path.
Eclipse will then copy the files to target directory (However,
everytime I change my resource, it triggers a lengthy (near 10
second) automatic build)
Have you tried to run "Maven / Update Project Configuration" action on
your projects? You may also have to recreate your saved launch
configurations for those junit tests. Anyways we don't recommend to
change project configuration by hands, because it will get out of sync
with your Maven build.
Also see my blog entry on how to configure Maven project to use
different output folders.
http://www.jroller.com/eu/entry/configuring_separate_maven_output_folders
regards,
Eugene
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email