Re: SonarQube plugin for Gradle

2021-06-01 Thread Jacques Le Roux

Hi Pierre,

I'm not sure. I think it's an Infra thing, I'll check that.

Jacques

Le 01/06/2021 à 10:12, Pierre Smits a écrit :

Hi Jacques,

Did we implement a GitHub action to invoke the SonarQube analysis?

Best regards,
Pierre Smits

On Mon, May 31, 2021 at 6:02 PM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:


Hi,

Just stumbled upon this :

 <>


https://github.com/SonarSource/sonarcloud-github-action#user-content-do-not-use-this-github-action-if-you-are-in-the-following-situations

So I think we should remove it from GH and rather use it with Gradle. Not
sure about all that though...

Opinions ?

Jacques




Re: [ofbiz-framework] branch trunk updated: Improved: Convert EntitySyncServices.xml mini-lang to groovy

2021-06-01 Thread Jacques Le Roux

Hi Aayush,

Please help yourself: https://ofbiz.apache.org/mailing-lists.html

Jacques

Le 30/05/2021 à 09:17, Aayush Gupta a écrit :

Hello guys
Please unsubscribe from these mails
Thanks

On Sun, 30 May 2021, 12:43 pm ,  wrote:


This is an automated email from the ASF dual-hosted git repository.

danwatford pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
  new c654d9b  Improved: Convert EntitySyncServices.xml mini-lang to
groovy
c654d9b is described below

commit c654d9bbcc31f2b3ea218914a56a9569c21d0f8d
Author: Daniel Watford 
AuthorDate: Sun May 30 08:13:23 2021 +0100

 Improved: Convert EntitySyncServices.xml mini-lang to groovy

 (OFBIZ-11660)

 removed: EntitySyncServices.xml
 added: EntitySyncServices.groovy
 modified: services.xml to reflect the change from minilang to groovy
for:
 - entitySyncPermissionCheck
 - resetEntitySyncStatus
 modified: webtools/controller.xml to reflect changed request-map and
event type regarding reset of EntitySyncStatus
 modified: webtools/widget/EntitySyncForms.xml to reflect changed
target regarding reset of EntitySyncStatus

 Thanks: Pierre Smits for implementation
---
  .../groovyScripts/EntitySyncServices.groovy| 32
+++
  .../entityext/minilang/EntitySyncServices.xml  | 36
--
  framework/entityext/servicedef/services.xml|  8 ++---
  .../webapp/webtools/WEB-INF/controller.xml |  4 +--
  framework/webtools/widget/EntitySyncForms.xml  |  2 +-
  5 files changed, 39 insertions(+), 43 deletions(-)

diff --git a/framework/entityext/groovyScripts/EntitySyncServices.groovy
b/framework/entityext/groovyScripts/EntitySyncServices.groovy
new file mode 100644
index 000..8acea4e
--- /dev/null
+++ b/framework/entityext/groovyScripts/EntitySyncServices.groovy
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+def entitySyncPermissionCheck() {
+parameters.primaryPermission = "ENTITY_SYNC"
+Map serviceResult = run service: "genericBasePermissionCheck", with:
parameters
+return serviceResult
+}
+
+def resetEntitySyncStatus() {
+   entitySyncRecord = from("EntitySync").where("entitySyncId",
parameters.entitySyncId).queryOne()
+if(entitySyncRecord &&
"ESR_RUNNING".equals(entitySyncRecord.runStatusId)) {
+entitySyncRecord.runStatusId = "ESR_NOT_STARTED"
+entitySyncRecord.store()
+}
+}
diff --git a/framework/entityext/minilang/EntitySyncServices.xml
b/framework/entityext/minilang/EntitySyncServices.xml
deleted file mode 100644
index a134c26..000
--- a/framework/entityext/minilang/EntitySyncServices.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-http://www.w3.org/2001/XMLSchema-instance;
-xmlns="http://ofbiz.apache.org/Simple-Method;
xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method
http://ofbiz.apache.org/dtds/simple-methods.xsd;>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/framework/entityext/servicedef/services.xml
b/framework/entityext/servicedef/services.xml
index 7d0951e..b95fc2d 100644
--- a/framework/entityext/servicedef/services.xml
+++ b/framework/entityext/servicedef/services.xml
@@ -224,8 +224,8 @@ under the License.

  location="org.apache.ofbiz.entityext.synchronization.EntitySyncServices"
invoke="cleanSyncRemoveInfo" auth="true" transaction-timeout="600">
  Clean EntitySyncRemove Info - Generally should be
run asynchronously after each sync run, or periodically run on a
schedule
  
-
+
  Generally run manually to reset the status of an
EntitySync when it has "crashed". Update a EntitySync, set the Status to
ESR_NOT_STARTED, but ONLY if running (ie in ESR_RUNNING)
  
  
@@ -446,8 +446,8 @@ under the License.
  Delete a ServerHitType
  
  
-
+
  Entity sync permission Checking Logic
  
  
diff --git a/framework/webtools/webapp/webtools/WEB-INF/controller.xml
b/framework/webtools/webapp/webtools/WEB-INF/controller.xml
index 

Re: SonarQube plugin for Gradle

2021-06-01 Thread Pierre Smits
Hi Jacques,

Did we implement a GitHub action to invoke the SonarQube analysis?

Best regards,
Pierre Smits

On Mon, May 31, 2021 at 6:02 PM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> Hi,
>
> Just stumbled upon this :
>
> <
>   * Your code is built with Gradle: use the SonarQube plugin for
> Gradle during the build>>
>
>
> https://github.com/SonarSource/sonarcloud-github-action#user-content-do-not-use-this-github-action-if-you-are-in-the-following-situations
>
> So I think we should remove it from GH and rather use it with Gradle. Not
> sure about all that though...
>
> Opinions ?
>
> Jacques
>
>