Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Separate ouptut directories(META-INF/services + JUnit tests)
Separate ouptut directories [message #509421] Fri, 22 January 2010 07:27 Go to next message
Eclipse UserFriend
I have a component (defined in my 'src' directory) which uses the Java ServiceLoader mechanism to locate service implementations. The 'src' directory also contains a META-INF/services file that describes the 'production' service implementations.

The JUnit tests for this component are in a separate 'test_src' directory and define specialised test service implementations. Obviously the test service implementations shouldn't appear in the main META-INF/services file, but if I define a separate META-INF/services file in test_src then there is a clash in the output directory. These two files have to have the same name + path (by definition) but Eclipse's use of a single output directory means that I can't include both files on my classpath at the same time.

Is there any way to specify a separate output directory for test_src (e.g. test_bin)? I hunted through the dialogs but the only output directory setting that I could find seems to be global.
Re: Separate ouptut directories [message #509435 is a reply to message #509421] Fri, 22 January 2010 07:49 Go to previous messageGo to next message
Eclipse UserFriend
On 22/01/10 5:57 PM, Paul wrote:
> Is there any way to specify a separate output directory for test_src
> (e.g. test_bin)? I hunted through the dialogs but the only output
> directory setting that I could find seems to be global.

You can have separate output folders for each source folder: Project
Properties->Java Build Path->Source tab.

- Prakash
Platform UI Team, IBM

Blog <http://blog.eclipse-tips.com>
Twitter <http://www.twitter.com/Eclipse_Tips>
Re: Separate ouptut directories [message #509440 is a reply to message #509435] Fri, 22 January 2010 08:02 Go to previous message
Eclipse UserFriend
Aha... I missed the little checkbox for 'Allow output for source folders'. You have to turn that on before the option to select a different output folder is available. If source folders normally use the default directory anyway then I don't really know why you need an additional checkbox, but it's easy enough once you know its there.

Many thanks!
Previous Topic:SQLJ OOM issue with Eclipse
Next Topic:.settings folder created in source location, not workspace?
Goto Forum:
  


Current Time: Tue Mar 18 10:39:29 EDT 2025

Powered by FUDForum. Page generated in 0.12165 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top