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

Daniel Watford commented on OFBIZ-12888:
----------------------------------------

[~jleroux] - regarding INFRA-25456:

Codenarc runs tests on any groovy files it find in any source sets defined in a 
gradle build. It produces a report for each source set.

Removing the groovyScripts source set from the build.gradle means codenarc will 
no longer produce groovyScripts.html. Any files that were analysed in 
groovyScripts are being analysed in the main source set and so will appear in 
build/reports/codenarc/main.html.

The BuildBot definition currently copies file 
build/reports/codenarc/groovyScripts.html to another location, but since that 
report is no longer produced by codenarc, the BuildBot build fails.

We need to amend the BuildBot definition to remove the copy of the 
build/reports/codenarc/groovyScripts.html file.

> Gradle eclipse target produces duplicate build path entries in .classpath
> -------------------------------------------------------------------------
>
>                 Key: OFBIZ-12888
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12888
>             Project: OFBiz
>          Issue Type: Bug
>          Components: Gradle
>    Affects Versions: Upcoming Branch
>            Reporter: Michael Brohl
>            Assignee: Michael Brohl
>            Priority: Major
>
> I'm currently working on a solution for this.
> Maybe someone can explain why we use the GroovyScripts source set for the 
> codenarc checks in the pre-push hook:
>  
> {code:java}
> gitHooks {
>    hooks = ['pre-push': 'checkstyleMain codenarcGroovyScripts']
> }
> {code}
> That target seems to be automatically defined through the source set 
> definition for groovyScripts.
> If I remove that source set and the following task configuration:
>  
> {code:java}
> tasks.named('compileGroovyScriptsGroovy') {
> // We don't want to build groovyScripts as they should be considered as 
> standalone elements executed in
> // isolation by ofbiz. Building them will result in numerous error due to 
> duplicated classes.
> enabled = false
> }
> {code}
>  
> And change the git hooks to
>  
> {code:java}
> }
> gitHooks {
> hooks = ['pre-push': 'checkstyleMain codenarcMain codenarcTest']
> }
> {code}
>  
> (which is accoring to the pre-push hook definition in .git/hooks/pre-push) 
> everything seems to work fine, tests are working and the codenarc Main and 
> Test reports are build.
> I provide a PR for it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to