[jira] [Commented] (OFBIZ-7749) iterateOverActiveComponents exists twice

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-7749) iterateOverActiveComponents exists twice

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-7749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15369867#comment-15369867 ]

Pierre Smits commented on OFBIZ-7749:
-------------------------------------

Taher created the duplicate code. Before jumping to conclusions I suggest you read all first.

in *build.gradle*:
{code}
def iterateOverActiveComponents(applyFunction) {
    def frameworkComponents = new XmlParser().parse('framework/component-load.xml')
    def applicationsComponents = new XmlParser().parse('applications/component-load.xml')
    def specialpurposeComponents = new XmlParser().parse('specialpurpose/component-load.xml')

    applyFunction file('framework/start')

    frameworkComponents.children().each { component ->
        applyFunction file("framework/"+component.@"component-location")
    }
    applicationsComponents.children().each { component ->
        applyFunction file("applications/"+component.@"component-location")
    }
    specialpurposeComponents.children().each { component ->
        applyFunction file("specialpurpose/"+component.@"component-location")
    }

    file('hot-deploy').eachDir { component ->
        applyFunction(component)
    }
}
{code}

and in *settings.gradle*:
{code}
def iterateOverActiveComponents(applyFunction) {
    def frameworkComponents = new XmlParser().parse('framework/component-load.xml')
    def applicationsComponents = new XmlParser().parse('applications/component-load.xml')
    def specialpurposeComponents = new XmlParser().parse('specialpurpose/component-load.xml')

    applyFunction file('framework/start')

    frameworkComponents.children().each { component ->
        applyFunction file("framework/"+component.@"component-location")
    }
    applicationsComponents.children().each { component ->
        applyFunction file("applications/"+component.@"component-location")
    }
    specialpurposeComponents.children().each { component ->
        applyFunction file("specialpurpose/"+component.@"component-location")
    }

    file('hot-deploy').eachDir { component ->
        applyFunction(component)
    }
}
{code}

> iterateOverActiveComponents exists twice
> ----------------------------------------
>
>                 Key: OFBIZ-7749
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7749
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Pierre Smits
>            Assignee: Jacques Le Roux
>              Labels: gradle
>
> Currently the iterateOverActiveComponents function or tasks exists both in build.gradle and settings.gradle.
> Do we need both? Which one is superfluous?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)