Commit bfa9f2dc authored by Stefan Huehner's avatar Stefan Huehner
Browse files

ISSUE-47174. Fix incremental compile near generate.entities.quick

Similar to issue 20416 also compile.src.gen & generate.entities.quick
had same bug causing to recompile files in modules/* always.

Fix that by ensuring the include part of javac call only matches the
path matching the javapackage of the source files.

- Specifically for compile.src.gen:
  - Remove the modules/*/src part which is supposed to match the src
    subfolder in any present module.
    Replace it by dirset entry matching the needed src subfolder
    separately.
- For the javac call at the end of generate.entities.quick split the
  srcdir attributed by a separate entry. Goal is the same to change from
  the ${base.modules} to a dirset matching the src folders properly
parent f8a55d96
......@@ -202,10 +202,17 @@ build.war: build a war file in the lib directory.
<classpath refid="project.class.path" />
</javac>
-->
<javac srcdir="${base.src}:${base.src.gen}:${base.modules}" includes="org/openbravo/model/**,org/openbravo/base/structure/**,org/openbravo/dal/**,org/openbravo/service/dataset/**,*/src/**/base/weld/**" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on" includeantruntime="false">
<classpath refid="project.class.path" />
<compilerarg value="-implicit:class" />
</javac>
<javac includes="org/openbravo/model/**,org/openbravo/base/structure/**,org/openbravo/dal/**,org/openbravo/service/dataset/**,*/src/**/base/weld/**" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on" includeantruntime="false">
<src>
<pathelement path="${base.src}"/>
<pathelement path="${base.src.gen}"/>
<dirset dir="${base.modules}">
<include name="*/src" />
</dirset>
</src>
<classpath refid="project.class.path" />
<compilerarg value="-implicit:class" />
</javac>
<javac srcdir="${base.src.gen}" excludes="org/openbravo/model/**,org/openbravo/base/structure/**,org/openbravo/dal/**,org/openbravo/service/dataset/**" destdir="${build}" encoding="UTF-8" fork="true" memorymaximumsize="${build.maxmemory}" debug="true" debuglevel="lines,vars,source" deprecation="on" includeantruntime="false">
<classpath refid="project.class.path" />
</javac>
......@@ -248,7 +255,12 @@ build.war: build a war file in the lib directory.
</copy>
<!-- also compile the domaintypes in modules -->
<javac srcdir="${basedir}/../" includes="modules/*/src/**/model/domaintype/**/*.java" destdir="${build}" fork="true" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
<javac includes="**/model/domaintype/**/*.java" destdir="${build}" fork="true" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
<src>
<dirset dir="${base.modules}">
<include name="*/src" />
</dirset>
</src>
<classpath refid="project.class.path" />
</javac>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment