You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Jacques Le Roux <ja...@les7arts.com> on 2024/01/02 19:01:23 UTC

Re: SvnCheckout Gradle plugin soon no longer usable with GitHub

Hi Daniel, All,

It's now used in necessary places: GH actions (Build, Docker and so Demos) and BB. So far all works as expected for all branches (18.12 being really a 
weight)

Note: with
https://github.com/apache/ofbiz-framework/commit/c7f606fe98621b8233d70e1c1f9793c525117c4c
I have updated AccountingDemoData.xml. Last time, in 2013, I put 10 years ahead.
This time, lazy, I put only 1 year, so it will need to be updated each new year (not needed in R18)...

There is still a minor issue with pullAllPluginsSource.sh when the releases branches don't exist. I'll fix it soon...

Jacques

Le 31/12/2023 à 11:41, Jacques Le Roux a écrit :
> Hi Daniel,
>
> There is a huge performance difference in favour of scripts and I found difficult to use the scripts from Gradle.
> As you may have seen, I already crossed an issue (access denied) with BB I reported to Infra with https://issues.apache.org/jira/browse/INFRA-25327
>
> This said it may certainly be possible to call the scripts from Gradle. I have tried that w/o success so far:
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
> task pullPluginSource(group: ofbizPlugin, description: 'Download and install a plugin from source control') {
>
> task pullPluginFromGit() {
>
> if (project.hasProperty('pluginId')) {
>
> if (os.contains('windows')) {
>
> exec { commandLine 'cmd', '/c', 'pullPluginSource.bat', "${pluginId}" }
>
> } else {
>
> exec { commandLine './pullPluginSource.sh', "${pluginId}" }
>
> }
>
> }
>
> }
>
> dependsOn pullPluginFromGit
>
> doLast {
>
> gradlewSubprocess(['installPlugin', "-PpluginId=${pluginId}"])
>
> }
>
> }
>
> task pullAllPluginsSource(group: ofbizPlugin,
>
> description: 'Download and install all plugins from source control. Warning! deletes existing plugins') {
>
> task pullAllPluginsFromGit() {
>
> if (os.contains('windows')) {
>
> exec { commandLine 'cmd', '/c', 'pullAllPluginsSource.bat' }
>
> } else {
>
> exec { commandLine './pullAllPluginsSource.sh' }
>
> }
>
> }
>
> dependsOn pullAllPluginsFromGit
>
> task installAllPlugins {
>
> subdirs(file("${pluginsDir}"))
>
> .filter(this.isComponentEnabled)
>
> .filter { taskExistsInproject(":plugins:${it.name}", 'install') }
>
> .forEach({ plugin ->
>
> dependsOn ":plugins:${plugin.name}:install"
>
> doLast { println "installed plugin ${plugin.name}" }
>
> })
>
> }
>
> doLast {
>
> gradlewSubprocess(['installAllPlugins'])
>
> }
>
> }
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
> The scripts are at https://issues.apache.org/jira/browse/OFBIZ-12868
>
> I know that "dependsOn" is no longer recommended with recent versions of Gradle, maybe the reason.
>
> We have still a week before it will be a real blocker.
>
> Jacques
>
> Le 31/12/2023 à 11:13, Daniel Watford a écrit :
>> Hi Jacques,
>>
>> Please could you confirm that the project's intention is to remove
>> the pullAllPluginsSource gradle task, rather than replace the components of
>> that task that fetch the source via SVN with something similar that fetches
>> via Git?
>>
>> The reason for asking is that you mentioned in a comment on
>> https://issues.apache.org/jira/browse/OFBIZ-12868  that we might still use
>> the gradle tasks:
>>
>>> "To minimise the change, we could decide to still use the scripts but
>>> called from Gradle... I have not yes tested the performance differences..."
>>
>> If the intention is to keep the gradle tasks related to retrieving plugin
>> sources, but have those tasks call external scripts, then we should close
>> https://issues.apache.org/jira/browse/OFBIZ-12876  and have the docker image
>> builds continue to leverage gradle.
>>
>> Thanks,
>>
>> Dan.
>>
>> On Tue, 26 Dec 2023 at 09:49, Jacques Le Roux<ja...@les7arts.com>
>> wrote:
>>
>>> Hi,
>>>
>>> Though I believe we should get rid of the Gradle pullPluginSource and
>>> pullAllPluginsSource tasks, this morning I tried to implement them using
>>> the OS
>>> scripts for pullPluginSource and pullAllPluginsSource w/o success.
>>>
>>> If someone is interested I can put the diff at OFBIZ-12868
>>>
>>> Juste let me know...
>>>
>>> Jacques
>>>
>>> Le 23/12/2023 à 12:13, Jacques Le Roux a écrit :
>>>> Hi,
>>>>
>>>> OK, we need more effort here because GH and BB will break at January 8,
>>> 2024 and we need to test the changes before... In other words we have at
>>>> most 2 weeks available...
>>>>
>>>> I have one question. It seems to me that the Gradle "installPlugin"
>>> task, called by the pullPluginSource and pullAllPluginsSource tasks, is not
>>>> implement in any OOTB plugin.
>>>>
>>>> I ask this question because, if it eventually unused, it's quite easier
>>> and especially efficient/faster to use simple OS scripts than Gradle tasks
>>>> for pullPluginSource and pullAllPluginsSource
>>>>
>>>> Jacques
>>>>
>>>> Le 01/12/2023 à 11:18, Jacques Le Roux a écrit :
>>>>> Hi,
>>>>>
>>>>> I have createdhttps://issues.apache.org/jira/browse/OFBIZ-12868 for
>>> that... WIP...
>>>>> HTH
>>>>>
>>>>> Jacques
>>>>>
>>>>> Le 27/11/2023 à 13:41, Jacques Le Roux a écrit :
>>>>>> Hi,
>>>>>>
>>>>>> As you may have noticed*, the SvnCheckout Gradle plugin will not be
>>> usable after January 8, 2024.
>>>>>> So we need a replacement and it's clearly suggested by GitHub in the
>>> link below
>>>>>> Jacques
>>>>>>
>>>>>> *https://lists.apache.org/thread/08kwg2ovjt4qyfybhf1qzsvq42jsy2wz
>>