[ https://issues.apache.org/jira/browse/OFBIZ-11976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17186294#comment-17186294 ] Jacques Le Roux edited comment on OFBIZ-11976 at 8/28/20, 7:04 AM: ------------------------------------------------------------------- We got an explanation from [~grv] at https://markmail.org/message/4y2qg2lgxox2jddy: {quote} When you run "gradlew generateAllPluginsDocumentation", all "actions" defined in the task '"generateAllPluginsDocumentation" get executed as part of execution phase. doFirst and doLast are the actions defined hence they get executed. And when you run any other tasks, all tasks present in the project (including subprojects) are just configured not executed*. *So when we run say ./gradlew config, everything that is not defined an an action (doFirst, doLast or any other action) gets executed as part of configuration phase for generateAllPluginsDocumentation task. doLast { delete "${component}/src/docs/asciidoc/images/OFBiz-Logo.svg" } Above is supposed to be executed during execution phase of the task because doLast is an action for the task. If you define your print statements inside doLast, you won't see it printed if you run any other task. The problem is the part that is generating the docs, should be defined in an action but at present is part of configuration. That's why when other tasks run, docs are generated but never deleted (deletion part being defined in doLast). {quote} was (Author: jacques.le.roux): We got an exaplantion from [~grv] at https://markmail.org/message/4y2qg2lgxox2jddy: {quote} When you run "gradlew generateAllPluginsDocumentation", all "actions" defined in the task '"generateAllPluginsDocumentation" get executed as part of execution phase. doFirst and doLast are the actions defined hence they get executed. And when you run any other tasks, all tasks present in the project (including subprojects) are just configured not executed*. *So when we run say ./gradlew config, everything that is not defined an an action (doFirst, doLast or any other action) gets executed as part of configuration phase for generateAllPluginsDocumentation task. doLast { delete "${component}/src/docs/asciidoc/images/OFBiz-Logo.svg" } Above is supposed to be executed during execution phase of the task because doLast is an action for the task. If you define your print statements inside doLast, you won't see it printed if you run any other task. The problem is the part that is generating the docs, should be defined in an action but at present is part of configuration. That's why when other tasks run, docs are generated but never deleted (deletion part being defined in doLast). {quote} > svg files not removed on clean > ------------------------------ > > Key: OFBIZ-11976 > URL: https://issues.apache.org/jira/browse/OFBIZ-11976 > Project: OFBiz > Issue Type: Bug > Components: ALL PLUGINS > Affects Versions: Release Branch 17.12, Trunk > Reporter: Alex Bodnaru > Assignee: Jacques Le Roux > Priority: Major > Fix For: 18.12.01, 17.12.05 > > > files like birt/src/docs/asciidoc/images/OFBiz-Logo.svg, > in many plugins, don't get removed on clean. -- This message was sent by Atlassian Jira (v8.3.4#803005) |
Free forum by Nabble | Edit this page |