Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0041924Openbravo ERPA. Platformpublic2019-10-03 10:342022-02-01 07:24
gorka_gil 
Triage Platform Base 
lowminorN/A
newopen 
5
 
 
Core
No
0041924: ant clean unification
After compile openbravo with a java version and try to do another install source with another java version, sometimes fails because remain clases compiled with old java. And is needed to use special rm commands to clean all:
rm -Rf build/ && rm -Rf src-core/build/ && rm -rf src-trl/build/ && rm -Rf src-wad/build/ && rm -Rf src-gen/org/openbravo/

Also, there is two clean tasks in the principal build.xml:
 - clean
 - cleanSubfolders

Clean only clean the openbravo src, and cleanSubfolders only clean src-core, src-trl and src-wad.

The install.source only calls to cleanSubfolders (As long as I can see)


I think ant clean should call to cleanSubfolders.
And the install.source should call to clean.
Also think to what should call compile.complete, and do small review of the clean in the build.xml.
- clone erp pi
- save included classes:
  find . -name *.class > includedClasess.txt
- run ant install.sources
- run ant clean
- Check that src-core, src-trl and src-wad was not cleaned
  find . -name *.class | grep -v -f includedClasess.txt
- run ant cleanSubfolders
- Check that still there are classes not cleaned
  find . -name *.class | grep -v -f includedClasess.txt

./src-db/build/classes/com/openbravo/db/OpenbravoMasterdataFilter.class
./src-db/build/classes/com/openbravo/db/OpenbravoDataFilter.class
./src-db/build/classes/com/openbravo/db/OpenbravoMetadataFilter.class
./src-db/build/classes/com/openbravo/db/OpenbravoExcludeFilter.class
No tags attached.
related to defect 0020266 closed migueldejuana ant install.source does not clean src-core/build, src-trl/build and src-wad/build 
Issue History
2019-10-03 10:34gorka_gilNew Issue
2019-10-03 10:34gorka_gilAssigned To => platform
2019-10-03 10:34gorka_gilModules => Core
2019-10-03 10:34gorka_gilTriggers an Emergency Pack => No
2019-10-03 10:35gorka_gilRelationship addedrelated to 0020266
2019-11-27 15:47shuehnerNote Added: 0115895
2022-02-01 07:24alostaleAssigned Toplatform => Triage Platform Base

Notes
(0115895)
shuehner   
2019-11-27 15:47   
ant clean does not entirely what you think (i.e. running sql's against ad_textinterfaces).
That is and should be separate from 'trigger recompile'.
As that is reason why install.source cannot just call clean (db does not exist)

So what about stop talking about manual ant clean but fix the real issue instead:
- something supposedly doing a 'full recompile'
  - i.e. compile.complete.*
  - install.source
- Should be fixed to do a 'full recompile' instead of forgetting some parts'

As i think as developer you shouldn't need to care about any 'manual clean'.

Note1:
I think that maybe reported already but not sure

Note2: Below sheet has similar open topic on how to classify both 'clean' & 'cleanSubFolders' if that should be 'developer utility' or internal thing
https://docs.google.com/spreadsheets/d/1xwJJV1aZLhRNRqGluE_cJn6A5TzR3ZqfQKEzfXds4uA/edit#gid=0 [^]

Note3:
those com.openbravo.db are all obsolete -> There is separate mini project to get rid of them. Just nobody got to it so far (see https://issues.openbravo.com/view.php?id=28703 [^])