Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020361Openbravo ERPA. Platformpublic2012-04-26 16:062012-05-25 12:09
iperdomo 
AugustoMauch 
urgentmajoralways
closedfixed 
303.3.3-1-ARCH
pi 
pi 
Apple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
Core
No
0020361: Unexpected result when using a file containing 'web' string sequence as part of the file name
When you have a static resource under web folder, you expect that all folder is properly copied.

Due to an error in the mapper regular expression of the 'build.web.folder.base' task, the result is unexpected.

Check the code:
https://code.openbravo.com/erp/devel/pi/file/285d006fa8f8/src/build.xml#l619 [^]
* Place any file in a module under the web/your.java.package folder
* The file should contain the web string, eg. webpos.js or mysuperwebview.js
* Run ant smartbuild
* Search for the static file under the web/your.java.package/ folder and you'll not find it
* Apply the attached diff (put the verbose attribute to the copy task)
* Re-run the smartbuild and filter for the "Copying" string: ant smartbuild | grep -i copying | tee -a /tmp/copying.log
* Verify to which folder of your file was copied
-----
Example:
[copy] Copying /home/iperdomo/workspace/src/openbravo/pi-mob/modules/org.openbravo.retail.posterminal/web/org.openbravo.retail.posterminal/windows/webpos.js to /home/iperdomo/workspace/src/openbravo/pi-mob/WebContent/web/pos.js

In this case web/pos.js is a valid path, but the mapper could expand to a broken (non existent folder)
Fix the mapper expression
No tags attached.
diff build.xml.diff (441) 2012-04-26 16:06
https://issues.openbravo.com/file_download.php?file_id=5173&type=bug
zip copying.zip (601,918) 2012-04-30 12:55
https://issues.openbravo.com/file_download.php?file_id=5179&type=bug
Issue History
2012-04-26 16:06iperdomoNew Issue
2012-04-26 16:06iperdomoAssigned To => alostale
2012-04-26 16:06iperdomoFile Added: build.xml.diff
2012-04-26 16:06iperdomoWeb browser => Apple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
2012-04-26 16:06iperdomoModules => Core
2012-04-27 07:49alostaleAssigned Toalostale => AugustoMauch
2012-04-30 12:55AugustoMauchFile Added: copying.zip
2012-05-03 10:44hgbotCheckin
2012-05-03 10:44hgbotNote Added: 0048307
2012-05-03 10:44hgbotStatusnew => resolved
2012-05-03 10:44hgbotResolutionopen => fixed
2012-05-03 10:44hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9a7580f8f3584d69502b76ce80c2aae3667c3e3b [^]
2012-05-03 10:51AugustoMauchNote Added: 0048308
2012-05-10 09:08guilleaerNote Added: 0048534
2012-05-10 09:08guilleaerStatusresolved => closed
2012-05-10 09:09guilleaerFixed in Version => pi
2012-05-25 12:09hudsonbotCheckin
2012-05-25 12:09hudsonbotNote Added: 0048996

Notes
(0048307)
hgbot   
2012-05-03 10:44   
Repository: erp/devel/pi
Changeset: 9a7580f8f3584d69502b76ce80c2aae3667c3e3b
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu May 03 10:43:29 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/9a7580f8f3584d69502b76ce80c2aae3667c3e3b [^]

Fixes issue 20361: Files with 'web' in its name are copied propertly to Webfolder

A regular expression has been fixed in the build.web.folder.base task, and now the files that contain the substring 'web' are copier to the proper folder in webfolder.

Before the fix:
modules/org.openbravo.test.issue20361/web/org.openbravo.test.issue20361/webpos.js -> WebContent/web/pos.js

After the fix:
modules/org.openbravo.test.issue20361/web/org.openbravo.test.issue20361/webpos.js -> WebContent/web/org.openbravo.test.issue20361/webpos.js

---
M src/build.xml
---
(0048308)
AugustoMauch   
2012-05-03 10:51   
Test plan:
- Create a module (i.d. issue20361, with javapackage org.openbravo.test.issue20361).
- Place a file (i.e. webpos.js) in the modules/javapackage/web/javapackage folder
- Run ant smartbuild.
- The new file should have been copied to the WebContent/web/javapackage folder

The attached file copying.zip contains two log files. The first file (copyingBefore.log) contains the output of all the file copies made in the build.web.folder.base task, and the second one (copyingAfter.log) contains the same output after the fix was applied. You can check that the files that did not contain in its name the 'web' substring are copied correctly in both files, and those who contained 'web' are copied correctly only after the fix was applied.

This fix is not risky.
(0048534)
guilleaer   
2012-05-10 09:08   
Code reviewed and tested in pi@e720f25cba62
(0048996)
hudsonbot   
2012-05-25 12:09   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5401e185a8b0 [^]

Maturity status: Test