0

I'd like to have roughly the following source setup, within one project in Eclipse:

enter image description here

Both server1 and server2 depend on common.

Is this possible to achieve easily and without later problems, in either Gradle or Maven?

Many thanks!

Jan Żankowski
  • 8,690
  • 7
  • 38
  • 52
  • As a side note, I understand that this is non-standard, as all online sources seem to recommend separate Eclipse projects and separate Gradle/Maven projects for each of `common`, `server1`, `server2` in my example. The advantage of that is filtering from view `server2` when I'm only working on `server1`. Continued below... – Jan Żankowski Dec 23 '14 at 14:00
  • However, I can't help feeling that often such a separation, with each shared component having its own `src/main/java/` etc structure, is excessive. I think this is especially true when there's a lot of shared folders but the overall project size is still manageable, so that developers have a clear sense of what each top-level Java package is responsible for. – Jan Żankowski Dec 23 '14 at 14:01
  • You can do in Gradle having a ```settings.gradle``` and incldue the ```common```, ```server1``` and ```server2``` directories. But to add the sources of the projects to the ```$projectDir``` directly is not working properly in Eclipse such that I suggest using at least a ```src``` folder. – Andreas Schmid Jan 02 '15 at 12:40

0 Answers0