Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0020361
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2012-04-26 16:062012-05-25 12:09
ReporteriperdomoView Statuspublic 
Assigned ToAugustoMauch 
PriorityurgentResolutionfixedFixed in Versionpi
StatusclosedFix in branchFixed in SCM revision9a7580f8f358
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabasePostgreSQLJava versionOpenJDK 1.6.0_24
OS Version3.3.3-1-ARCHDatabase version9.1.3Ant version1.8.2
Product VersionpiSCM revisioncccee76be736 
Review Assigned To
Web browserApple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0020361: Unexpected result when using a file containing 'web' string sequence as part of the file name

DescriptionWhen 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 [^]
Steps To Reproduce* 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)
Proposed SolutionFix the mapper expression
TagsNo tags attached.
Attached Filesdiff file icon build.xml.diff [^] (441 bytes) 2012-04-26 16:06 [Show Content]
zip file icon copying.zip [^] (601,918 bytes) 2012-04-30 12:55

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0048307)
hgbot (developer)
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 (manager)
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 (developer)
2012-05-10 09:08

Code reviewed and tested in pi@e720f25cba62
(0048996)
hudsonbot (developer)
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

- Issue History
Date Modified Username Field Change
2012-04-26 16:06 iperdomo New Issue
2012-04-26 16:06 iperdomo Assigned To => alostale
2012-04-26 16:06 iperdomo File Added: build.xml.diff
2012-04-26 16:06 iperdomo Web browser => Apple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
2012-04-26 16:06 iperdomo Modules => Core
2012-04-27 07:49 alostale Assigned To alostale => AugustoMauch
2012-04-30 12:55 AugustoMauch File Added: copying.zip
2012-05-03 10:44 hgbot Checkin
2012-05-03 10:44 hgbot Note Added: 0048307
2012-05-03 10:44 hgbot Status new => resolved
2012-05-03 10:44 hgbot Resolution open => fixed
2012-05-03 10:44 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9a7580f8f3584d69502b76ce80c2aae3667c3e3b [^]
2012-05-03 10:51 AugustoMauch Note Added: 0048308
2012-05-10 09:08 guilleaer Note Added: 0048534
2012-05-10 09:08 guilleaer Status resolved => closed
2012-05-10 09:09 guilleaer Fixed in Version => pi
2012-05-25 12:09 hudsonbot Checkin
2012-05-25 12:09 hudsonbot Note Added: 0048996


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker