Re: [VOTE] to use Lombok inside OFBiz

2020-09-10 Thread Rishi Solanki
-1.

Rishi Solanki
*CTO, Mindpath Technology*
Intelligent Solutions
cell: +91-98932-87847
LinkedIn 


On Tue, Sep 8, 2020 at 9:47 PM Mridul Pathak <
mridul.pat...@hotwaxsystems.com> wrote:

> -1
>
> Don’t think it’s of much use in OFBiz.
>
> Thanks.
> Mridul Pathak
>
> > On 08-Sep-2020, at 1:06 PM, Jacques Le Roux <
> jacques.le.r...@les7arts.com> wrote:
> >
> > Hi,
> >
> > Following our discussions about using Lombok inside OFBiz, as it's not
> clear if we should, here is a vote to decide about that.
> >
> > The question is: "should we use Lombok inside OFBiz?"
> >
> > Please cast your vote:
> >
> > [+1]  to use Lombok inside OFBiz
> > [0] to abstain
> > [-1]to not use Lombok inside OFBiz
> >
> > This vote will be open for a week.
> >
> > Thanks
> >
> > Jacques
> >
>
>


Re: public rest API

2020-09-10 Thread Hans Bakker

Thank you Girish,

look forward to your updates of this excellent and much needed addition 
to OFBiz.


Regars

Hans
www.antwebsystems.com

On 9/10/20 3:27 PM, Girish Vasmatkar wrote:
Thanks Hans, I will plan to include this change for the exportable 
services as well.


There is also OFBIZ-11995, where more RESTFul resources can be 
declared (development is undergoing) and bound to services where I had 
planned to include declarative authentication.

*
*
Best Regards,
Girish Vasmatkar
HotWax Systems




On Thu, Sep 10, 2020 at 12:08 PM Hans Bakker 
mailto:h.bak...@antwebsystems.com>> wrote:


Hi Girish,

how about ecommerce? you want to show the products without logging
in,
actually all information on the ecommerce frontend?

so yes, really required.

regards,

Hans


On 9/10/20 12:37 PM, Girish Vasmatkar wrote:
> Every REST endpoint, as it is implemented now, is secured by
default. I had
> not thought of a scenario where internal OFBiz services will
need to be
> invoked without authentication (externally)
>
> Yes, the services themselves can be specified to NOT require
auth but I had
> always thought that was applicable within internal execution. I
may be
> wrong here, so please correct me.
>
> auth and login-required are not taken into account yet, but can
certainly
> be, if some exportable services should be exposed as public APIs.
>
> Best Regards,
> Girish Vasmatkar
> HotWax Systems
>
>
>
> On Thu, Sep 10, 2020 at 5:55 AM Hans Bakker
mailto:h.bak...@antwebsystems.com>>
> wrote:
>
>> Hi, Girish,
>>
>> thanks again for your last reply it defenity helped, however i have
>> another question.
>>
>> I need to access certain services publicly without a token.
>>
>> I have put auth="false" on the service definition and
>> login-required="false" on the simple-method implementation
>>
>> still i get a 401 response.
>>
>> any suggestions?
>>
>> Regards,
>>
>> Hans
>>
>>



Re: Akamai and Janrain

2020-09-10 Thread Jacques Le Roux

I see

Jacques

Le 10/09/2020 à 12:21, Alex Bodnaru a écrit :

shiro is implementing sso.


alex

On Thu, Sep 10, 2020, 11:30 Jacques Le Roux 
wrote:


Hi Alex,

We use Shiro in OFBiz  but not for this reason, only in EntityCrypto.java.

How would you plan to use Shiro in this case?

Jacques

Le 10/09/2020 à 09:46, Alex Bodnaru a écrit :

have anybody thought of apache shiro?

https://shiro.apache.org/introduction.html


alex

On Thu, Sep 10, 2020, 10:00 Jacques Le Roux <

jacques.le.r...@les7arts.com>

wrote:


OK I guess it still works as is and the documentation don't need to be
changed, Akamai is used now

Anyway it's not enabled by default in OFBiz OOTB

Le 08/09/2020 à 11:11, Jacques Le Roux a écrit :

Hi,

Anybody aware and concerned about this feature?

Note: it has been introduced by Hans in 2011

Thanks

Jacques

Le 29/08/2020 à 11:31, Jacques Le Roux a écrit :

Hi,

Is the information in ecommerce.properties about Janrain still valid

since Akamai bought Janrain?

Thanks

Jacques



Re: buildbot failure in on ofbizTrunkFrameworkPlugins

2020-09-10 Thread Jacques Le Roux

Thanks Girish,

Ah, I did not get those locally (Windows)

So Buildbot mixed things (anticipated, obviously a Buildbot bug) and the problem was rather 
https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins/builds/1751 not 1750


Anyway It's OK now

Jacques

Le 10/09/2020 à 12:05, Girish Vasmatkar a écrit :

Hi Jacques

It is actually due to 2 errors reported under UtilHtmlTest.java. I just ran
it on my machine and it failed with this.
File
/Users/grv/workspace/OFBiz/community/ofbiz-framework/framework/base/src/test/java/org/apache/ofbiz/base/util/UtilHtmlTest.java
Error DescriptionLine
Name 'parseHtmlFragment_unclosedDiv' must match pattern
'^[a-z][a-zA-Z0-9]*$'. 30
Name 'parseHtmlFragment_multiRoot' must match pattern '^[a-z][a-zA-Z0-9]*$'.

Before committing, I did not face any build failure due to checkstyle.

Best Regards,
Girish


On Thu, Sep 10, 2020 at 3:16 PM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:


Hi Girish,

I had a quick look at this checkstyle issue, and it's weird.

It's due to
https://github.com/apache/ofbiz-plugins/commit/42192da7d3cc8bd979711e72a47b104dda0c25a3/

And I see no reason why we get

[...]
  > Task :checkstyleTest FAILED
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':checkstyleTest'.
  > Checkstyle rule violations were found. See the report at:
file:///C:/projectsASF/Git/ofbiz-framework/build/reports/checkstyle/test.html
Checkstyle files with violations: 1
Checkstyle violations by severity: [error:2]

Also

https://ci.apache.org/projects/ofbiz/logs/trunk/checkstyle.html#f-/home/buildslave/slave/ofbizTrunkFrameworkPlugins/build/plugins/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/resources/OFBizServiceResource.java
is useless

I'll have a look later, if you beat me on it I'll not be offended ;)

Jacques

Le 10/09/2020 à 08:17, build...@apache.org a écrit :

The Buildbot has detected a new failure on builder

ofbizTrunkFrameworkPlugins while building ofbiz-plugins. Full details are
available at:
https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins/builds/1750

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: asf945_ubuntu

Build Reason: The AnyBranchScheduler scheduler named

'onTrunkPluginsCommit' triggered this build

Build Source Stamp: [branch trunk]

42192da7d3cc8bd979711e72a47b104dda0c25a3

Blamelist: Girish Vasmatkar 

BUILD FAILED: failed check

Sincerely,
   -The Buildbot





Re: Akamai and Janrain

2020-09-10 Thread Alex Bodnaru
shiro is implementing sso.


alex

On Thu, Sep 10, 2020, 11:30 Jacques Le Roux 
wrote:

> Hi Alex,
>
> We use Shiro in OFBiz  but not for this reason, only in EntityCrypto.java.
>
> How would you plan to use Shiro in this case?
>
> Jacques
>
> Le 10/09/2020 à 09:46, Alex Bodnaru a écrit :
> > have anybody thought of apache shiro?
> >
> > https://shiro.apache.org/introduction.html
> >
> >
> > alex
> >
> > On Thu, Sep 10, 2020, 10:00 Jacques Le Roux <
> jacques.le.r...@les7arts.com>
> > wrote:
> >
> >> OK I guess it still works as is and the documentation don't need to be
> >> changed, Akamai is used now
> >>
> >> Anyway it's not enabled by default in OFBiz OOTB
> >>
> >> Le 08/09/2020 à 11:11, Jacques Le Roux a écrit :
> >>> Hi,
> >>>
> >>> Anybody aware and concerned about this feature?
> >>>
> >>> Note: it has been introduced by Hans in 2011
> >>>
> >>> Thanks
> >>>
> >>> Jacques
> >>>
> >>> Le 29/08/2020 à 11:31, Jacques Le Roux a écrit :
>  Hi,
> 
>  Is the information in ecommerce.properties about Janrain still valid
> >> since Akamai bought Janrain?
>  Thanks
> 
>  Jacques
> 
>


Re: buildbot failure in on ofbizTrunkFrameworkPlugins

2020-09-10 Thread Girish Vasmatkar
Hi Jacques

It is actually due to 2 errors reported under UtilHtmlTest.java. I just ran
it on my machine and it failed with this.
File
/Users/grv/workspace/OFBiz/community/ofbiz-framework/framework/base/src/test/java/org/apache/ofbiz/base/util/UtilHtmlTest.java
Error DescriptionLine
Name 'parseHtmlFragment_unclosedDiv' must match pattern
'^[a-z][a-zA-Z0-9]*$'. 30
Name 'parseHtmlFragment_multiRoot' must match pattern '^[a-z][a-zA-Z0-9]*$'.

Before committing, I did not face any build failure due to checkstyle.

Best Regards,
Girish


On Thu, Sep 10, 2020 at 3:16 PM Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:

> Hi Girish,
>
> I had a quick look at this checkstyle issue, and it's weird.
>
> It's due to
> https://github.com/apache/ofbiz-plugins/commit/42192da7d3cc8bd979711e72a47b104dda0c25a3/
>
> And I see no reason why we get
>
> [...]
>  > Task :checkstyleTest FAILED
> FAILURE: Build failed with an exception.
>
> * What went wrong:
> Execution failed for task ':checkstyleTest'.
>  > Checkstyle rule violations were found. See the report at:
> file:///C:/projectsASF/Git/ofbiz-framework/build/reports/checkstyle/test.html
>Checkstyle files with violations: 1
>Checkstyle violations by severity: [error:2]
>
> Also
>
> https://ci.apache.org/projects/ofbiz/logs/trunk/checkstyle.html#f-/home/buildslave/slave/ofbizTrunkFrameworkPlugins/build/plugins/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/resources/OFBizServiceResource.java
> is useless
>
> I'll have a look later, if you beat me on it I'll not be offended ;)
>
> Jacques
>
> Le 10/09/2020 à 08:17, build...@apache.org a écrit :
> > The Buildbot has detected a new failure on builder
> ofbizTrunkFrameworkPlugins while building ofbiz-plugins. Full details are
> available at:
> >
> https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins/builds/1750
> >
> > Buildbot URL: https://ci.apache.org/
> >
> > Buildslave for this Build: asf945_ubuntu
> >
> > Build Reason: The AnyBranchScheduler scheduler named
> 'onTrunkPluginsCommit' triggered this build
> > Build Source Stamp: [branch trunk]
> 42192da7d3cc8bd979711e72a47b104dda0c25a3
> > Blamelist: Girish Vasmatkar 
> >
> > BUILD FAILED: failed check
> >
> > Sincerely,
> >   -The Buildbot
> >
> >
> >
>


Re: buildbot failure in on ofbizTrunkFrameworkPlugins

2020-09-10 Thread Jacques Le Roux

Hi Girish,

I had a quick look at this checkstyle issue, and it's weird.

It's due to 
https://github.com/apache/ofbiz-plugins/commit/42192da7d3cc8bd979711e72a47b104dda0c25a3/

And I see no reason why we get

[...]
> Task :checkstyleTest FAILED
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':checkstyleTest'.
> Checkstyle rule violations were found. See the report at: 
file:///C:/projectsASF/Git/ofbiz-framework/build/reports/checkstyle/test.html
  Checkstyle files with violations: 1
  Checkstyle violations by severity: [error:2]

Also 
https://ci.apache.org/projects/ofbiz/logs/trunk/checkstyle.html#f-/home/buildslave/slave/ofbizTrunkFrameworkPlugins/build/plugins/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/resources/OFBizServiceResource.java

is useless

I'll have a look later, if you beat me on it I'll not be offended ;)

Jacques

Le 10/09/2020 à 08:17, build...@apache.org a écrit :

The Buildbot has detected a new failure on builder ofbizTrunkFrameworkPlugins 
while building ofbiz-plugins. Full details are available at:
 https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins/builds/1750

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: asf945_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'onTrunkPluginsCommit' 
triggered this build
Build Source Stamp: [branch trunk] 42192da7d3cc8bd979711e72a47b104dda0c25a3
Blamelist: Girish Vasmatkar 

BUILD FAILED: failed check

Sincerely,
  -The Buildbot





Re: Akamai and Janrain

2020-09-10 Thread Jacques Le Roux

Hi Alex,

We use Shiro in OFBiz  but not for this reason, only in EntityCrypto.java.

How would you plan to use Shiro in this case?

Jacques

Le 10/09/2020 à 09:46, Alex Bodnaru a écrit :

have anybody thought of apache shiro?

https://shiro.apache.org/introduction.html


alex

On Thu, Sep 10, 2020, 10:00 Jacques Le Roux 
wrote:


OK I guess it still works as is and the documentation don't need to be
changed, Akamai is used now

Anyway it's not enabled by default in OFBiz OOTB

Le 08/09/2020 à 11:11, Jacques Le Roux a écrit :

Hi,

Anybody aware and concerned about this feature?

Note: it has been introduced by Hans in 2011

Thanks

Jacques

Le 29/08/2020 à 11:31, Jacques Le Roux a écrit :

Hi,

Is the information in ecommerce.properties about Janrain still valid

since Akamai bought Janrain?

Thanks

Jacques



Re: public rest API

2020-09-10 Thread Girish Vasmatkar
Thanks Hans, I will plan to include this change for the exportable services
as well.

There is also OFBIZ-11995, where more RESTFul resources can be declared
(development is undergoing) and bound to services where I had planned to
include declarative authentication.

Best Regards,
Girish Vasmatkar
HotWax Systems




On Thu, Sep 10, 2020 at 12:08 PM Hans Bakker 
wrote:

> Hi Girish,
>
> how about ecommerce? you want to show the products without logging in,
> actually all information on the ecommerce frontend?
>
> so yes, really required.
>
> regards,
>
> Hans
>
>
> On 9/10/20 12:37 PM, Girish Vasmatkar wrote:
> > Every REST endpoint, as it is implemented now, is secured by default. I
> had
> > not thought of a scenario where internal OFBiz services will need to be
> > invoked without authentication (externally)
> >
> > Yes, the services themselves can be specified to NOT require auth but I
> had
> > always thought that was applicable within internal execution. I may be
> > wrong here, so please correct me.
> >
> > auth and login-required are not taken into account yet, but can certainly
> > be, if some exportable services should be exposed as public APIs.
> >
> > Best Regards,
> > Girish Vasmatkar
> > HotWax Systems
> >
> >
> >
> > On Thu, Sep 10, 2020 at 5:55 AM Hans Bakker 
> > wrote:
> >
> >> Hi, Girish,
> >>
> >> thanks again for your last reply it defenity helped, however i have
> >> another question.
> >>
> >> I need to access certain services publicly without a token.
> >>
> >> I have put auth="false" on the service definition and
> >> login-required="false" on the simple-method implementation
> >>
> >> still i get a 401 response.
> >>
> >> any suggestions?
> >>
> >> Regards,
> >>
> >> Hans
> >>
> >>
>


Re: Akamai and Janrain

2020-09-10 Thread Alex Bodnaru
have anybody thought of apache shiro?

https://shiro.apache.org/introduction.html


alex

On Thu, Sep 10, 2020, 10:00 Jacques Le Roux 
wrote:

> OK I guess it still works as is and the documentation don't need to be
> changed, Akamai is used now
>
> Anyway it's not enabled by default in OFBiz OOTB
>
> Le 08/09/2020 à 11:11, Jacques Le Roux a écrit :
> > Hi,
> >
> > Anybody aware and concerned about this feature?
> >
> > Note: it has been introduced by Hans in 2011
> >
> > Thanks
> >
> > Jacques
> >
> > Le 29/08/2020 à 11:31, Jacques Le Roux a écrit :
> >> Hi,
> >>
> >> Is the information in ecommerce.properties about Janrain still valid
> since Akamai bought Janrain?
> >>
> >> Thanks
> >>
> >> Jacques
> >>
>


Re: Akamai and Janrain

2020-09-10 Thread Jacques Le Roux

OK I guess it still works as is and the documentation don't need to be changed, 
Akamai is used now

Anyway it's not enabled by default in OFBiz OOTB

Le 08/09/2020 à 11:11, Jacques Le Roux a écrit :

Hi,

Anybody aware and concerned about this feature?

Note: it has been introduced by Hans in 2011

Thanks

Jacques

Le 29/08/2020 à 11:31, Jacques Le Roux a écrit :

Hi,

Is the information in ecommerce.properties about Janrain still valid since 
Akamai bought Janrain?

Thanks

Jacques



Re: Behavior of Groovy vs JUnit tests with test data

2020-09-10 Thread Jacques Le Roux

Hi Carsten,

Inline...

Le 08/09/2020 à 12:46, Carsten Schinzer a écrit :

Hello Jacques,


Thanks for the pointer.

My issue is that I find the XML test cases not good enough as e.g. the 
updateCustRequest service has special behaviors when cancelling or adding 
stories to a custRequest which are currently not covered by the test in XML.
Similar for the transitions between custRequestStatusIds some are forbidden and 
some are not and the test cases did not cover either.


+1 for improvement (did not review)



The issue is really that in Groovy when starting from a given data load, the 
data is not refreshed/reset after a test case is run and hence I decided to do 
the testing of services in full and plain JUnit. Others apparently have decided 
the same.


I guess those persons did that long ago and not related to the move from 
Minilang to Groovy



In the subtasks you pointed me to, the problem is circumvented by creating the 
data in a common method before running a test against it. So the data load does 
not occur via the tested location. I wanted to re-use existing test data for 
custRequest.


I was not aware of the issue refreshed/reset after a test case. Indeed we don't use that in Goovy test. Did you have a look at 
https://issues.apache.org/jira/browse/OFBIZ-9996 and http://groovy-lang.org/testing.html?




If you tell me that the intent is to also get rid of the test data defined in 
the tested, then I would be on the wrong track and need to change my code to be 
like the one you pointed me to. Is there any decision made to also get rid of 
the test data loads when migrating minilang to groovy?


I don't think a such decision has been made. Nicolas started with OFBIZ-9996. Since then few improvement has been made, but nothing related to what 
you are looking for.




Warm regards

Carsten

PS: I also find it a pity that the JIRA tickets that are distributed are 
already subtasks in Stories instead of Stories in Epics. It disallows me to 
track the work done in sufficient detail other than commenting on the subtask. 
Do you know why that has been done like this? I should possibly rather discuss 
with Pierre Smits I guess?


We don't follow Scrum in Jira. We don't use Stories and Epics. We simply create tasks to be done. Sometimes subtasks are an easy way to group the 
actions, that's it. I don't know about Pierre's availability, what would you want to discuss exactly?


HTH

Jacques






Am 08.09.2020 um 11:54 schrieb Jacques Le Roux :

Hi Carsten,

Did you have a look at the WIP under 
https://issues.apache.org/jira/browse/OFBIZ-11232 and how it's done in subtasks?

Jacques

Le 03/09/2020 à 13:43, Carsten Schinzer a écrit :

Hi all,


I did find and try the following from google search:

- wrap all the tests in a class
- tag the class with @RunWith(SpringRunner.class)
- tag every method that manipulates the entity data with 
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)

This has NOT been successful, hence a strong indication that running the cases 
in Groovy will make entity data manipulations to be sticky and not reverted for 
the subsequent test case run.
I am going to rework my cases to run as JUnit test cases in a Java class.

Warm regards


Carsten


Am 03.09.2020 um 13:13 schrieb Carsten Schinzer 
:

Hi everyone,


Recently, I did find that test cases actually are much easier to write in 
Groovy and hence I started doing that, but now I stumble across the fact that 
some of the Groovy tests seem to find changes applied to entities from previous 
tests. The behavior is the following:

- I load the test data with instructions given in the tested XML
- I manipulate data in the first test data, e.g. a status on an entity
- when I run the next test case I do not get the originally loaded entity but 
the manipulated one from the previous test

This is different from JUnit in Java where the entities seem to exist as loaded 
from the testdata XML with every new test case.
It would obviously mean that I we need to implement my testing in JUnit (Java) 
rather when we want extensive testing of the services and need to start from 
the loaded data every time.

Can anyone confirm this behavior of Groovy over JUnit?
Warm regards


Carsten



Re: public rest API

2020-09-10 Thread Hans Bakker

Hi Girish,

how about ecommerce? you want to show the products without logging in, 
actually all information on the ecommerce frontend?


so yes, really required.

regards,

Hans


On 9/10/20 12:37 PM, Girish Vasmatkar wrote:

Every REST endpoint, as it is implemented now, is secured by default. I had
not thought of a scenario where internal OFBiz services will need to be
invoked without authentication (externally)

Yes, the services themselves can be specified to NOT require auth but I had
always thought that was applicable within internal execution. I may be
wrong here, so please correct me.

auth and login-required are not taken into account yet, but can certainly
be, if some exportable services should be exposed as public APIs.

Best Regards,
Girish Vasmatkar
HotWax Systems



On Thu, Sep 10, 2020 at 5:55 AM Hans Bakker 
wrote:


Hi, Girish,

thanks again for your last reply it defenity helped, however i have
another question.

I need to access certain services publicly without a token.

I have put auth="false" on the service definition and
login-required="false" on the simple-method implementation

still i get a 401 response.

any suggestions?

Regards,

Hans