Commit Graph
1430 Commits
Author SHA1 Message Date
Erwan de Ferrieres 0b7c9aa68b Upgrading to latest ant version: 1.8.3
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1326132 13f79535-47bb-0310-9956-ffa450edef68
2012-04-14 15:38:17 +00:00
Erwan de Ferrieres 8b8f386f6a Upgrade to tomcat 7.0.27
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1326090 13f79535-47bb-0310-9956-ffa450edef68
2012-04-14 12:07:15 +00:00
Jacques Le Roux 50cbd9b4f3 Complete r1326064, moreover I forgot to save the others *-containers.xml
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1326080 13f79535-47bb-0310-9956-ffa450edef68
2012-04-14 09:59:33 +00:00
Jacques Le Roux 86ca2bcd04 Complete r1326064, I forgot to save ofbiz-containers.xml before committing and did not notice
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1326072 13f79535-47bb-0310-9956-ffa450edef68
2012-04-14 08:49:05 +00:00
Jacques Le Roux 8c481181d5 Adapted by hand from Lon F. Binder "CatalinaContainer Doesn't Respect <distributable/> Node for web.xml files." https://issues.apache.org/jira/browse/OFBIZ-4242
Per the servlet specification, the web.xml file should allow an optional <distributable/> node to indicate that the application is clusterable. Currently, OFBiz does not respect this setting and assumes all applications should be distributed if any cluster configuration is provided in the ofbiz-containers.xml file. As a result, if, for example, the DeltaManager is enable, all applications attempt to cluster and communicate via DeltaManager.

The expected and proper functionality is to check the individual application's web.xml file for the <distributable/> node and only use the DeltaManager if found; otherwise the StandardManager should be used for sessions.

jleroux: replaced some tabs, reformatted, added a comment about <distributable/> in the *-containers.file

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1326064 13f79535-47bb-0310-9956-ffa450edef68
2012-04-14 07:30:30 +00:00
Jacopo Cappellato 6558763ed6 Based on a suggestion by Adrian Crum, data preparation scripts can now be implemented with script methods that accept a Map context argument, for example:
def dataPreparationMethod(Map context) {
...
}



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1325750 13f79535-47bb-0310-9956-ffa450edef68
2012-04-13 13:10:59 +00:00
Jacopo Cappellato 6450c4f54d Modified Groovy util methods that prepares the binding to add the ScriptHelper object (to be consistent with the Groovy service engine and event handler and the "Script" JSR223 engine and handler): now Groovy scripts can execute the same exact Grrovy codes that can be executed when they are run thru JSR223.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1325620 13f79535-47bb-0310-9956-ffa450edef68
2012-04-13 05:53:54 +00:00
Jacopo Cappellato 4835731c9c Upgrade to the latest version of JUnit (4.10).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311221 13f79535-47bb-0310-9956-ffa450edef68
2012-04-09 13:37:18 +00:00
Jacques Le Roux ec788aa471 Adds 1 to all ports in order to be able to run concurrently an OFBiz instance and a test instance on the same machine.
This closes "set different ports for testing in a CI environment (e.g. Jenkins)" https://issues.apache.org/jira/browse/OFBIZ-4794

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311214 13f79535-47bb-0310-9956-ffa450edef68
2012-04-09 13:08:37 +00:00
Adrian Crum e93e73afaa ScriptUtil bug fix: the SCRIPT_NAMES field was initialized only when debug level was INFO. Removed enclosing debug level check so SCRIPT_NAMES will always be initialized.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311011 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 14:21:01 +00:00
Jacques Le Roux bf5a242cf0 Creates an ant task which uses YUICompressor (yuicompressor-2.4.6.jar) to dynamically minify our own (or custom for users) js and css files (most of the biggest external ones are already compressed)
More work is needed, this is just the the minimum with an example.

Related to https://issues.apache.org/jira/browse/OFBIZ-4792


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310983 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 12:12:07 +00:00
Jacques Le Roux 838c5c52c4 No functional change, just shift a line in proper place
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310978 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 11:25:35 +00:00
Jacques Le Roux 8b2bfe325f Groups Tomcat http/s connectors compression properties and adds text/javascript,text/css as new compressableMimeTypes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310975 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 10:51:02 +00:00
Adrian Crum 3348ba5734 Bug fix in ScriptUtil.java - create a local copy of the calling context so script local variables are not copied to it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310307 13f79535-47bb-0310-9956-ffa450edef68
2012-04-06 12:51:14 +00:00
Adrian Crum 533bd091b7 CVE-2012-1622: Disable support for nested scripts in FlexibleStringExpander.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309879 13f79535-47bb-0310-9956-ffa450edef68
2012-04-05 14:20:56 +00:00
Adrian Crum 99504db991 Added some static methods to FlexibleStringExpander that enable querying an expression about its component parts.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309360 13f79535-47bb-0310-9956-ffa450edef68
2012-04-04 12:49:12 +00:00
Adrian Crum e94ccd9369 Added a SCRIPT_NAMES field to ScriptUtil.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309359 13f79535-47bb-0310-9956-ffa450edef68
2012-04-04 12:47:30 +00:00
Erwan de Ferrieres e42a5f1c85 Reverting 1308301 as the commit could seems as a hack: ./ant can't find the class issue created for this: OFBIZ-4783
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309337 13f79535-47bb-0310-9956-ffa450edef68
2012-04-04 11:38:40 +00:00
Sascha Rodekamp ceb27828a7 Changed the FileReader to a BufferedReader during script loading. The file reader throws an exception when the file path contains spaces (which are encoded). The result was that scripts aren't loaded and pages only showed an error message. Working with an InputStream solves this issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308896 13f79535-47bb-0310-9956-ffa450edef68
2012-04-03 13:36:03 +00:00
Jacopo Cappellato 7e8d52d3bf Fixed path to svninfo.ftl file that was not working after the switch to freemarker 2.3.19
Thanks to Scott for the solution.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308817 13f79535-47bb-0310-9956-ffa450edef68
2012-04-03 11:09:54 +00:00
Jacopo Cappellato ec02e2ac4f this is a workaround to fix errors when loading included templates with a relative path after the migration to Freemarker 2.3.19; I am still investigating the root cause.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308734 13f79535-47bb-0310-9956-ffa450edef68
2012-04-03 07:46:12 +00:00
Jacopo Cappellato 66e063b126 Removed the last webslinger jar that I missed in my previous commits.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308359 13f79535-47bb-0310-9956-ffa450edef68
2012-04-02 14:09:22 +00:00
Jacopo Cappellato 6567fca33d Upgrade to latest stable release of Freemarker: 2.3.19
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308358 13f79535-47bb-0310-9956-ffa450edef68
2012-04-02 14:08:17 +00:00
Jacopo Cappellato 7bc6142674 Set log levels for Freemarker (to disable all log messages under warning) to resolve performance issue in newer releases of freemarker.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308355 13f79535-47bb-0310-9956-ffa450edef68
2012-04-02 13:58:14 +00:00
Erwan de Ferrieres c5c75df222 Seems using ./ant for running install and tests is not detecting the class for cobertura. Testing if the jar is present is making it right. Resolves OFBIZ-4757
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308301 13f79535-47bb-0310-9956-ffa450edef68
2012-04-02 11:16:10 +00:00
Adrian Crum e1a03aee17 Small code cleanup in ObjectType.simpleTypeConvert, added support for null target type (returns original object). Updated unit tests.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1307551 13f79535-47bb-0310-9956-ffa450edef68
2012-03-30 17:48:32 +00:00
Jacopo Cappellato 8c99e6b35e Upgrade to Groovy 1.8.6 (from Groovy 1.7.7).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1306769 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 09:43:54 +00:00
Erwan de Ferrieres 029f6e9410 Removing usage some more iterators
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1306568 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 20:18:13 +00:00
Joseph Eckard b4b7b1b0a5 fixed typos in example jetty config, NIO connectors did not have the correct types
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1305605 13f79535-47bb-0310-9956-ffa450edef68
2012-03-26 21:18:34 +00:00
Jacques Le Roux 8f6004c2eb This was missing in r1305004
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1305316 13f79535-47bb-0310-9956-ffa450edef68
2012-03-26 11:42:49 +00:00
Jacques Le Roux 7d943cb341 A patch from Anne Jessel "Support validation of resource xml files" https://issues.apache.org/jira/browse/OFBIZ-4723
The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard.

The attached patch:

    provides a valid xsd
    updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list
    includes simple unit tests for UtilProperties to ensure it does work with both formats
    changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file.

Some minor code cleanups to these files.

jleroux: the base test suite was successfully run locally once UtilIOTests have been commented out (still an issue with it on Windows)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1305004 13f79535-47bb-0310-9956-ffa450edef68
2012-03-25 11:07:57 +00:00
Jacques Le Roux 0c07b6df6f Revert r1304193 for now
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1304737 13f79535-47bb-0310-9956-ffa450edef68
2012-03-24 09:35:09 +00:00
Jacques Le Roux 1c5a0459c3 A patch from Anne Jessel "Support validation of resource xml files" https://issues.apache.org/jira/browse/OFBIZ-4723
The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard.

The attached patch:

    provides a valid xsd
    updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list
    includes simple unit tests for UtilProperties to ensure it does work with both formats
    changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file.

Some minor code cleanups to these files.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1304193 13f79535-47bb-0310-9956-ffa450edef68
2012-03-23 05:47:10 +00:00
Joseph Eckard ba4d9e2eee update jetty container to use the latest jetty-8 release, 8.1.2
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1303894 13f79535-47bb-0310-9956-ffa450edef68
2012-03-22 17:08:31 +00:00
Jacopo Cappellato dc4edc748e CVE-2012-1621: Removed the Webslinger component and all the framework dependencies on it; the reasons for this
* no active committer was maintaining the webslinger component
* the component was experimental and not really used by OFBiz
* the component was really big (lot of jars etc...) and we are trying to slim down the OFBiz framework and keep only the essential/useful features
* this fixes a security issue reported to the OFBiz PMC

The only Webslinger feature used by the OFBiz framework was the "service debug mode" (enabled by default with the property servicedispatcher.servicedebugmode): I have considered to keep it but it was impossible because it relied on Webslinger legacy code (in the org.webslinger.invoker.* package) that was never contributed as a source file to the OFBiz project; I have tried to review the source file from an external Webslinger repo but I couldn't find them; the only site about Webslinger I could find is this:
http://www.webslinger.org/Downloads
but the svn resources mentioned there are broken. The fact that the OFBiz frameework was dependent (for a feature useful only in development mode) on an external project that doesn't publish its source code (at least in an easy to find location) convinced me that it was better to clean up the dependency completely; on the bright side OFBiz should now use less memory.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1301866 13f79535-47bb-0310-9956-ffa450edef68
2012-03-17 05:35:45 +00:00
Jacopo Cappellato 4845c553ac The scripthelper object was created too early when the bindings were not set in the context; this caused the wrong scriptType to be set in the ContextHelper.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1300202 13f79535-47bb-0310-9956-ffa450edef68
2012-03-13 15:47:50 +00:00
Sascha Rodekamp dd3c285da8 JCR container definition was placed between the cataline container definition description and th definition itself. That doesn't looked good.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1300014 13f79535-47bb-0310-9956-ffa450edef68
2012-03-13 09:00:43 +00:00
Adrian Crum fda9bad4cf More JSR-223 work - added a ScriptHelper object to the bindings. Also added a demonstration to the JavaScript test service.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1299924 13f79535-47bb-0310-9956-ffa450edef68
2012-03-12 23:20:55 +00:00
Adrian Crum 1c162eb3d7 JSR-223 bug fix, added String constants for commonly used binding keys.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1299636 13f79535-47bb-0310-9956-ffa450edef68
2012-03-12 11:41:03 +00:00
Adrian Crum 7f15204b03 JSR-223 bug fixes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1299121 13f79535-47bb-0310-9956-ffa450edef68
2012-03-10 00:46:54 +00:00
Adrian Crum 484f0e6999 More JSR-223 work - added the ability to protect the bindings, plus some minor code formatting changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1299040 13f79535-47bb-0310-9956-ffa450edef68
2012-03-09 20:41:18 +00:00
Jacopo Cappellato c8323e7ab5 Enhanced Groovy Event Handler to support the execution of a method (as an event) inside of a groovy source file (script class): the method can be specified in the "invoke" attribute.
Similarly to Groovy services, the Groovy Events Handler sets the base script class containing helper methods; these helper methods have been enhanced in order to be used by groovy method executed as services or events in a transparent way.
 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1298908 13f79535-47bb-0310-9956-ffa450edef68
2012-03-09 16:34:18 +00:00
Jacopo Cappellato da59ea40b4 Enhanced Groovy service engine to inject a (configurable) script base class that provides a basic DSL language to the Groovy services; the DSL is still a work in progress but it is already enough to implement several services in Groovy following a programming style very close to Minilang.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1298461 13f79535-47bb-0310-9956-ffa450edef68
2012-03-08 16:36:18 +00:00
Hans Bakker aa355b8fb5 Upgrade tomcat to 7.0.26: solve javax.naming.NameNotFoundException: Resource /WEB-INF/classes not found problem when OFBiz started. A contribution of Chattree
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1298261 13f79535-47bb-0310-9956-ffa450edef68
2012-03-08 02:38:40 +00:00
Adrian Crum 2ba7468eff More JSR-223 work - added a bsh engine so that bsh-specific code can be eliminated. Bsh is now invoked using JSR-223.
The engine comes from http://java.net/projects/scripting. I had to modify the code slightly because the BshScriptEngine class implemented Compilable - but the Compilable methods were not implemented. So I removed implements Compilable. I renamed the jar to signify that the code has been modified.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1297478 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 14:06:13 +00:00
Adrian Crum 0a0903efb8 More JSR-223 work - added a generic script service engine.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1297323 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 02:16:29 +00:00
Adrian Crum 340e6c9d0a Added a helpful startup message to ScriptUtil.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1296978 13f79535-47bb-0310-9956-ffa450edef68
2012-03-05 09:43:54 +00:00
Adrian Crum deac392f10 Refactored ScriptUtil.java to use the javax.script package (JSR-223).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1296897 13f79535-47bb-0310-9956-ffa450edef68
2012-03-04 23:43:27 +00:00
Adrian Crum 6cb4c34e22 Minor changes to ScriptUtil.java: add private constructor, make class final, code format changes. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1296771 13f79535-47bb-0310-9956-ffa450edef68
2012-03-04 09:02:07 +00:00
Jacopo Cappellato f18d49458f First pass in the direction of the implementation of a more flexible mechanism to plugin different scripting technologies and in the same time being able to get rid of a lot of framework related custom code to support them.
In particular these chenges should make it easier to implement JSR-223 (even if I think that we should still treat Groovy in a special way).


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1296762 13f79535-47bb-0310-9956-ffa450edef68
2012-03-04 07:24:47 +00:00