Fixed 21580: Fix compiling on windows with many modules instaleld.
authorStefan Hühner <stefan.huehner@openbravo.com>
Tue, 11 Sep 2012 17:07:03 +0200
changeset 17945 d6111f597f9c
parent 17944 f9fb375f5e05
child 17946 061968db96b6
Fixed 21580: Fix compiling on windows with many modules instaleld.
When fixing issue 20416 this changed the javac sourcepath definition to
include each subfolder of each module folder which may contain .java files
individually when calling javac. However it did consider any possible subfolder
below a module folder including i.e. web, src-db, referencedata.
However none of those folder should ever contain any .java file.
The only folder which should contain .java files are: src & src-test
This excludes the following two special folders (src-wad, src-util), but those
are never used in any normal compilation.

This building of a combined sourcepath with too many folders seems to overflow
some windows only sourcepath length restriction causing the compile to fail.

This commit changes behavior of the compile process to being the following:

A normal compile will only look into the following two subfolders below
a modules' folder:
a.) src
b.) src-test
Any .java file not in one of those folders will be ignored and not compiled
anymore.

This complies with unwritten openbravo practice since 2.50.
Also a search in all (380) published modules in status QA Approved in the CR
for 3.0 did only find a single module having a java file in a non-standard
location. And examining this case shows that is clearly a (harmless) bug and
not compiling that one file will not be a problem at all.
src/build.xml
--- a/src/build.xml	Tue Sep 11 14:15:28 2012 +0200
+++ b/src/build.xml	Tue Sep 11 17:07:03 2012 +0200
@@ -333,9 +333,8 @@
     <pathelement path="${build.sqlc}/srcAD" />
     <pathelement path="${base.src.test}" />
     <dirset dir="${base.modules}">
-      <include name="*/*" />
-      <exclude name="*/src-util" />
-      <exclude name="*/src-wad" />
+      <include name="*/src" />
+      <include name="*/src-test" />
     </dirset>
   </path>