In Eclipse you can specify an output folder for a directory instead of using the 
default output folder. To do this setup your source directories in project for 
<project>/src/java and <project>/src/test assuming you have a java and a test 
directory under src. Go to project's properties and select "java build path" and then 
the source tab to make these changes.
 
First check the check box "Allow output folders for source folders".
 
Assuming you have setup your default output folder (this will be on the bottom of the 
source tab) to <project>/target/classes, expand the <project>/src/test by clicking on 
the "+" and select the "Output folder". Edit this to change the output to go to 
<project>/target/test-classes instead of the default.
 
You should now be able to run you junit tests since the <project>/target/test-classes 
directory will be on the classpath.
 
I hope this helps.
 
Li

"Amato Massimiliano (TLAB)" <[EMAIL PROTECTED]> wrote:
Hello,

I am starting to integrating all my tests into my environment, but i've found a 
problem.

My tests needs to read some settings from configuration files while others reads data 
from XML. I have all those files under test/conf dir so when I launch "maven test" 
those are moved into target/test-classes and succesfully read by test classes.

Now the problem, I work with eclipse and i'd like to launch some tests under that IDE, 
because it is faster than rerun all the tests for a project, but obviously the files 
are not found.
I tought about it and I realized that the class dir in eclipse should be different 
than target/classes since in this way also test class are put in that directory that 
under maven should not contain them

Anyone has ever solved this problem, since I cannot imagine a solution to force 
eclipse to copy conf files into the right directory or another workaround

Another problem I had with Eclipse is that since I work with CVS eclipse see the CVS 
directory under the src tree and copy those files under the class directory and 
sometimes doesn't compile.

I had to modify the eclipse plugin so by default it excludes CVS directories.

Thanks for any help
Max


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

                
---------------------------------
Do you Yahoo!?
Friends.  Fun. Try the all-new Yahoo! Messenger

Reply via email to