"Shortlist the needed resources to start OFBiz in the sourcesets block in
Gradle"
(OFBIZ-8321)(OFBIZ-7937)
While working on OFBIZ-7798 I noticed an issue with labels cache clearing.
It still worked correctly in R15.12 and pre-Gradle version
To test it, load a page with a label, change the label in file, clear all caches
in webtools, the new label value should appear, it does not.
The same issue exists for properties.
This fixes both and while at it fixes also OFBIZ-7937 "Shortlist the needed
resources to start OFBiz in the sourcesets block in Gradle"
I also removed the DTDs from the resources, they seems useless there.
There area also some trailing blanks removed, my Eclipse is set like that.
Thanks: Taher for OFBIZ-7937 description of the issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1764280 13f79535-47bb-0310-9956-ffa450edef68
of the legacy implementation from Javolution; removed a bunch of unused or
deprecated methods; created some unit tests to test the EntitySaxReader in
isolation. Removed the dependency from Javolution since this was the last class
dependent on it.
(OFBIZ-5169)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1762079 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7798)
We slightly changed the old format of the footer. The old format used only the
translated words _uiLabelMap.CommonBuiltOn_ and _uiLabelMap.CommonWith_.
On the other hand, the new format contains the words Branch, Revision,
Built On and Java Version.
We need to translate all four words in the CommonUiLabels.xml and then
incorporate them
old version:
" - Release-revision : ${releasePath}-r${info.entry.commit(revision)},
${uiLabelMap.CommonBuiltOn} ${dateTime} ${uiLabelMap.CommonWith}
Java ${java.version}
new version:
"Branch: ${info.entry.url.text()}" + System.lineSeparator()
"Revision: ${info.entry.commit.@revision}" + System.lineSeparator()
"Built on: ${timestamp}" + System.lineSeparator()
"Java Version: ${org.gradle.internal.jvm.Jvm.current()}"
Thanks: Taher Alkhateeb for the 1st patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1762077 13f79535-47bb-0310-9956-ffa450edef68
Adopters noted that some components ship with their jars, and it would be
much more convenient to keep the jar with the component than to copy it
to the top level /lib directory. Hence we re-introduce the code snippet
to iterate over all components and load any jars found in ${component}/lib
Thanks: Scott Gray for highlighting and guiding on this issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761708 13f79535-47bb-0310-9956-ffa450edef68
The files were created because of a bug in the TemplateLoader for Freemarker, see OFBIZ-8292. This is fixed so this is not needed anymore.
Thanks: Jacopo for the TemplateLoader fix.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761591 13f79535-47bb-0310-9956-ffa450edef68
No functional changes but some code cleanup. The file checks are not needed when using delete from the Gradle DSL.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761533 13f79535-47bb-0310-9956-ffa450edef68
Refactor the eclipse classpath settings in build.gradle and substantially
improve it by making it denser with only one loop to remove entries. We
also added an exclusion pattern for 'dtd' directories as they were added
recently to the sourcesets block by Jacopo Capellato.
This makes the code block for eclipse settings easier to reason about
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761519 13f79535-47bb-0310-9956-ffa450edef68
the initialization of the ControlFilter.
These unit tests are experimental but interesting because they provide test
coverage in isolation for some aspect of the framework that were not covered
before or only covered by integration tests.
The tests for the ControlFilter are particularly interesting because they
leverage Mockito to run the test in isolation by mocking the FilterConfig
object.
Please review and run these tests in your local environment, provide your
feedback and report any issues you may find: this will help to define a pattern
for the definition of unit tests that could be applied more extensively.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761440 13f79535-47bb-0310-9956-ffa450edef68
In reference to the below discussion thread, this commit removes a task
which generates the above mentioned jar file which holds a service
definition. The fix is replace the gradle task which automatically
generates service with a flat directiory (META-INF) that defines the
service provides. All tests pass.
Thread: http://markmail.org/message/wzmw2qbacg4hup7r
Thanks: Jacques Le Roux for reporting this issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761421 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8250)
The two files are not generated as empty files when building which results in an FTL stacktrace in the footer of the backend applications.
This had been somehow reported at OFBIZ-7942 which I closed not understanding completely the problem
Thanks: Michael, Taher for fixing this issue and Wai for reporting OFBIZ-7942
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761385 13f79535-47bb-0310-9956-ffa450edef68
Now that all local jars are removed from OFBiz, there is no need to either
keep the "lib" directory in components or to automatically load these libs
if they exist. If users want to add custom libraries, then can place them
directly in the top level directory "lib".
Hence this commit removes the remaining lib directories in the accounting,
example and ldap components and fixes build.gradle to not iterate the lib
directories in components for loading jars inside of them.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761302 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8251)
Attached is a simple and clean fix. Essentially, it's better to just use Xlint which is equal to Xlint:all to show everything and you can dig through it for whatever you want.
What this fix requires is only passing a project property called Xlint. So .. the syntax is ./gradlew -PXlint build
This adds also the documentation for both this issue and the OWASP-DC task
Thanks: Taher
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761131 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7798)
We slightly changed the old format of the footer. The old format used only the translated words _uiLabelMap.CommonBuiltOn_ and _uiLabelMap.CommonWith_. On the other hand, the new format contains the words Branch, Revision, Built On and Java Version.
We need to translate all four words in the CommonUiLabels.xml and then incorporate them
This also adds a small commented out snippet in build.gradle for when Xlint:unchecked and -Xlint:deprecation are needed; to be replaced by a task with OFBIZ-8251
Thanks: Taher
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761076 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7972)
This commit creates a basic plugin API for OFBiz that interoperates
with maven repositories. We are committing this code as "experimental"
to allow contributors to start experimenting with this system easily
as per the discussion on the above JIRA and in ML in the below thread.
This new plugin API is documented in README.md and provides the following
new gradle tasks for managing plugins:
- createPlugin: creates a new plugin based on templates, place it in
the plugins directory and activate it (add to component-load.xml)
- installPlugin: Activate a plugin and run its Install task. Plugin
must exist already in /specialpurpose
- uninstallPlugin: Deactivate a plugin and run its uninstall task
- removePlugin: Uninstall a plugin and then delete it from the filesystem
- pushPlugin: publish a plugin to local maven repository
- pullPlugin: download a plugin with its dependencies (plugins) from
a repository and install them
Discussion: http://markmail.org/message/h7fiicba2rtyl6cb
Thanks: Jacopo Capellato, Michael Brohl, Gil Portenseigne for feedback
and testing
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760917 13f79535-47bb-0310-9956-ffa450edef68
OFBIZ-8241
We decided to no longer support notsoserial because we not only have no longer issues OOTB, but also because the classes protected by default are now also covered by the external libs themselves, even those we don't use OOTB.
Those who use RMI, JNDI, JMX or Spring and maybe other Java classes OFBiz does not use OOTB would still be at risk if they don't use a tool like notsoserial.
So we will amend the https://cwiki.apache.org/confluence/display/OFBIZ/The+infamous+Java+serialization+vulnerability Wiki page to let them know about that.
The main OFBiz README.MD file is also modified to be sure this is known by our users. BTW adding a security section is certainly a good idea.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760484 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8224)
This commit removes the support for the Bean Scripting Framework (BSF) from the OFBiz framework:
no application code was using this since several years and there are better and more modern tools at the present time.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760384 13f79535-47bb-0310-9956-ffa450edef68
Using OWASP-DC with Gradle was impossible w/o the corresponding plugin. Unfortunately using the suggested way at https://plugins.gradle.org/plugin/org.owasp.dependencycheck loads a lot of dependencies which are only needed by OWASP-DC. So Taher wrote a specific solution to avoid downloading useless libs to a normal use of OFBiz, there it is.
jleroux: I have simply formatted the "if(" to "if ("
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759250 13f79535-47bb-0310-9956-ffa450edef68
"Character encoding issue found in file build.gradle" - https://issues.apache.org/jira/browse/OFBIZ-8119
I cann't build ofbiz when I run gradlew.
I found utf-8 should be the default character encoding used by the comipiling work.
eg.
def defaultEncoding = 'UTF-8'
tasks.withType(AbstractCompile)*.options*.encoding = defaultEncoding
tasks.withType(GroovyCompile)*.groovyOptions*.encoding = defaultEncoding
AND--------------------------------
"testFopMacroLibrary fails on Windows" - https://issues.apache.org/jira/browse/OFBIZ-7938
When running tests on Windows I get this error
Response contentType isn't good : text/html;charset=UTF-8 expected:<[application/pdf];charset=UTF-8> but was:<[text/html];charset=UTF-8>
junit.framework.ComparisonFailure: Response contentType isn't good : text/html;charset=UTF-8 expected:<[application/pdf];charset=UTF-8> but wwas:<[text/html];charset=UTF-8>
at org.apache.ofbiz.widget.test.WidgetMacroLibraryTests.testFopMacroLibrary(WidgetMacroLibraryTests.java:123)
at org.apache.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:146)
at org.apache.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:237)
at org.apache.ofbiz.base.start.StartupControlPanel.startStartupLoaders(StartupControlPanel.java:274)
at org.apache.ofbiz.base.start.StartupControlPanel.start(StartupControlPanel.java:73)
at org.apache.ofbiz.base.staart.Start.main(Start.java:84)
All tests pass on BuildBot.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759092 13f79535-47bb-0310-9956-ffa450edef68
This is a bug in which createTenant crashes due to groovy gstring
evaluation where a string is needed. The fix is simple by removing
gstring and passing variables directly.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1758662 13f79535-47bb-0310-9956-ffa450edef68
For some reason we completely forgot to add the themes as gradle sub projects.
The current implementation of gradle treats every component as a sub project
and all themes are ofbiz components, and as such should be sub projects as well.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1758102 13f79535-47bb-0310-9956-ffa450edef68
Apply the following changes to the gradle build script:
- Make only the "componentName" argument mandatory for the createComponent
task and all other arguments are optional.
- Make only the "tenantId" argument mandatory for the createTenant task
and all other arguments are optional
- update the documentation accordingly in README.md
This simplifies the calls to these tasks and relives us from the need to
create any interactive tasks in the build system.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1757359 13f79535-47bb-0310-9956-ffa450edef68
This is a security issue which was pending for too long. It only updates Tomcat to 8.0.36 because I got issues with 8.5.3 when just changing to 8.0.36 in build.gradle files worked.
I also changed the version number in LICENSE, even if some libs are only downloaded by Gradle as dependencies of the main present in build.gradle, this is a WIP.
I have investigated if we really need to have all the external jar libs in LICENSE even if we don't deliver them in 1st place, but are still used when building, see http://markmail.org/message/emnu6s5wu2yuyith
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1757318 13f79535-47bb-0310-9956-ffa450edef68
This commit has no effect on the used libraries in OFBiz. It simply removes
libraries that are pulled automatically as dependencies from other libraries
and hence not needed to be declared explicitly.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1757074 13f79535-47bb-0310-9956-ffa450edef68
To resolve this issue we can convert the current use for import/export vcard by an other api ez-vcard (https://github.com/mangstadt/ez-vcard) under bsd licence and present on jcenter.
The refactoring raise some problem on existant code, we will try with Gil to improve the import/export to grow data conversion to functional framework.
Some improve on import :
* check if more than one email is present before check the prefered else take the one
* check if more than one phone is present before check the prefered else take the one
* check if more than one address is present before check the prefered else take the one
* When you load a party by vcard, initialize a reference by fn attribute on PartyIndentification to escape the second loading
Will need continue improve the import like correct Organization loading, update process, add service to detect already party present
I also improve the screen result to display all parties loaded by the import and all already present.
The solution isn't perfect but it's work and compile, first purpose to delete jpim.jar is done :)
Related issue OFBIZ-7961
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1756949 13f79535-47bb-0310-9956-ffa450edef68
I am attaching a patch that creates a custom libs folder in OFBiz top level directory where people can keep their jars and update the master script build.gradle accordingly.
jleroux: I svn:ignore the libs folder since only specific users libs will get there
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1756515 13f79535-47bb-0310-9956-ffa450edef68
The property used to be hidden from certain functions in the build
script making the system crash. Changing the definition from def to
ext.os fixes the issue and renders all functions operational. Thank
you Jacques Le Roux for reporting this.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1756407 13f79535-47bb-0310-9956-ffa450edef68
Many places exist in build.gradle in which checking for the operating system
happens, where each time a variable is declared. This commit unifies all OS
checks in one variable
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1756310 13f79535-47bb-0310-9956-ffa450edef68
Removes the ofbizSecure and ofbizBackgroundSecure and makes all OFBiz server tasks
secure by default. Also, update the documentation of README.md and the StartupCommandUtil
to remove these entries from the documentation.
This has reference to a thread discussion here -> http://markmail.org/message/zbbun7zrzdrtxavv
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1756305 13f79535-47bb-0310-9956-ffa450edef68
When running loadTenant task without passing the tenantId
property then gradle would run the task to full and only
complain of missing property at the end.
This fix ensures that the task fails before running anything
if the tenantId is missing
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1754773 13f79535-47bb-0310-9956-ffa450edef68