help

I'm trying to setup a project and this is the tree structure:
addons classes com company ]]>

I'm setting the following project roots
1. sources
2. sources/addons

Now I need to exclude 'sources/addons' from 'sources', and since exclude is
global that disables the second project root altogether. Am I missing
something?

thanks,
--nikolay


0
2 comments

Why do you set up sources/addons (2) as a separate project root? All the files in that folder are already present in project because of the the first root (1).

0

That's a quite an odd directory layout. Java and Java IDEs like IDEA
work best when you have files of only one type in a directory.

For example, you could a src/java directory which only contains Java
source files:

src
java
com
company
...
org
foo
...

And you could have a build/classes directory which only contains
compiled class files:

build
classes
com
company
...
org
foo
...

When you start mixing those together like in your example, you get
problems like you describe. I recommend that you reorganise your
directory layout into something more standard.

Here's a suggestion for your layout:

build
classes

sources
main
com
company
...
addons
com
company
...

If you have non-Java sources like scripts, etc. I would recommend
putting a java directory layer in between sources and main and addons:

sources
java
main
addons
scripts
native

You could also split the build/classes into main and addons as well. But
that just lengthens your classpath unecessarily. With the main and addon
classes in one directory hierarchy, you should be able to distinguish
them (for JARing) by their packages.

Ciao,
Gordon

Nikolay Nikolov wrote:

I'm trying to setup a project and this is the tree structure:
sources > classes > com > company > > addons > classes > com > company > > ]]>

I'm setting the following project roots
1. sources
2. sources/addons

Now I need to exclude 'sources/addons' from 'sources', and since exclude is
global that disables the second project root altogether. Am I missing
something?

thanks,
--nikolay


--
Gordon Tyler
Software Developer, R&D
Sitraka -- Performance is Mission Critical

0

Please sign in to leave a comment.