Hi Pierre,

I did not see anything of your above recommendations that is not compatible
with the plugin system. Everything like repositories and adding and
removing is already there. The only difference I notice is your
recommandation to not have component-load.xml so people just download and
go. However this might have some drawbacks such as being unable to revert
installation tasks or activating deactivating components on demand.

Anyway, this discussion was too long and I got lost in some parts of it. I
will work on a new proposal with a supporting patch soon as the building
block with something more concrete.

Taher Alkhateeb

On Aug 2, 2016 8:22 PM, "Jacques Le Roux" <[email protected]>
wrote:

> I'd recommend an improvement or task Jira to remember and share the work ;)
>
> Jacques
>
>
> Le 02/08/2016 à 16:37, Taher Alkhateeb a écrit :
>
>> Hi Pierre, All
>>
>> I was looking through the code and with a little bit of work on
>> ComponentContainer, ComponentLoaderConfig I think we can fix this issue.
>>
>> So +1 for allowing zero components in specialpurpose. This is a good step
>> towards implementing the plugins logic as you stated.
>>
>> Taher Alkhateeb
>>
>> On Tue, Aug 2, 2016 at 12:51 PM, Taher Alkhateeb <
>> [email protected]
>>
>>> wrote:
>>> Hi Pierre,
>>>
>>> This is a minor issue that we can fix easily by looking at the XML
>>> parsing
>>> code I don't think it's a big deal.
>>>
>>> I am assuming you're working on the ecommerce demo data right? For
>>> testing
>>> purposes for now I would suggest that you enable the example component,
>>> it
>>> does not have anything required by the inner components.
>>>
>>> Taher Alkhateeb
>>>
>>> On Aug 2, 2016 12:30 PM, "Pierre Smits" <[email protected]> wrote:
>>>
>>> Hi all,
>>>>
>>>> While working on OFBIZ-7016 (removing dependencies on e-commerce), I
>>>> tested
>>>> also whether it was possible to do a deployment without any of the
>>>> special
>>>> purpose components activated.
>>>> First, I tested this by commenting out all components in the
>>>> component-load.xml file in the specialpurpose folder.
>>>>
>>>> This generated following error:
>>>>
>>>> 2016-08-02 11:18:38,224 |main                 |ComponentContainer
>>>>    |I| Auto-Loading component directory :
>>>> [/Users/pierre/dev/ofbiz/ofbiz-gradle/specialpurpose]
>>>>
>>>> Exception in thread "main" java.lang.NullPointerException
>>>>
>>>> at
>>>>
>>>> java.util.Collections$UnmodifiableCollection.<init>(Collections.java:1026)
>>>>
>>>> at java.util.Collections$UnmodifiableList.<init>(Collections.java:1302)
>>>>
>>>> at java.util.Collections.unmodifiableList(Collections.java:1287)
>>>>
>>>> at
>>>>
>>>>
>>>> org.apache.ofbiz.base.component.ComponentLoaderConfig.getComponentsFromConfig(ComponentLoaderConfig.java:105)
>>>>
>>>> at
>>>>
>>>>
>>>> org.apache.ofbiz.base.container.ComponentContainer.loadComponentDirectory(ComponentContainer.java:144)
>>>>
>>>> at
>>>>
>>>>
>>>> org.apache.ofbiz.base.container.ComponentContainer.loadComponentFromConfig(ComponentContainer.java:129)
>>>>
>>>> at
>>>>
>>>>
>>>> org.apache.ofbiz.base.container.ComponentContainer.loadComponents(ComponentContainer.java:95)
>>>>
>>>> at
>>>>
>>>>
>>>> org.apache.ofbiz.base.container.ComponentContainer.init(ComponentContainer.java:73)
>>>>
>>>> at
>>>>
>>>>
>>>> org.apache.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:186)
>>>>
>>>> at
>>>>
>>>>
>>>> org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:98)
>>>>
>>>> at
>>>>
>>>>
>>>> org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(StartupControlPanel.java:249)
>>>>
>>>> at
>>>>
>>>>
>>>> org.apache.ofbiz.base.start.StartupControlPanel.start(StartupControlPanel.java:72)
>>>>
>>>> at org.apache.ofbiz.base.start.Start.main(Start.java:84)
>>>>
>>>> I also tested with the component-load.xml file removed from the
>>>> specialpurpose folder.
>>>>
>>>> This generated the following build error:
>>>>
>>>> FAILURE: Build failed with an exception.
>>>>
>>>>
>>>> * Where:
>>>>
>>>> Script '/Users/pierre/dev/ofbiz/ofbiz-gradle/common.gradle' line: 22
>>>>
>>>>
>>>> * What went wrong:
>>>>
>>>> A problem occurred evaluating settings 'ofbiz'.
>>>>
>>>> /Users/pierre/dev/ofbiz/ofbiz-gradle/specialpurpose/component-load.xml
>>>>>
>>>> (No such file or directory)
>>>>
>>>> It seems to me there is - currently - a hard coded requirement on
>>>>
>>>>     1. the existence of component-load.xml in the special purpose
>>>> folder,
>>>> and
>>>>     2. at least 1 special purpose component listed in the
>>>> component-load.xml
>>>>     file
>>>>
>>>> However, it is very well possible that an adopter decides to *not* use
>>>> any
>>>> of the special purpose components. And also, the discussion of the
>>>> 'plugin
>>>> deployment/activation' solution seems to suggest that it is even
>>>> possible
>>>> to deactivate all special purpose components (remove from
>>>> component-load.xml?).
>>>>
>>>> I believe we should more carefully look into this regarding how we deal
>>>> with this scenario.
>>>>
>>>> WDYT?
>>>>
>>>> Best regards,
>>>>
>>>> Pierre Smits
>>>>
>>>> ORRTIZ.COM <http://www.orrtiz.com>
>>>> OFBiz based solutions & services
>>>>
>>>> OFBiz Extensions Marketplace
>>>> http://oem.ofbizci.net/oci-2/
>>>>
>>>>
>

Reply via email to