Skip to content

Commit

Permalink
Fixed: Convert PeriodServices.xml mini lang to groovy (OFBIZ-12962)
Browse files Browse the repository at this point in the history
We have a Gradle redundant classes clash

Because there is already a PeriodServices Java class and we compile also Groovy
we can't create a PeriodServices.groovy class as pointed by GH actions, and
clearly by BB
https://ci2.apache.org/#/builders/49/builds/826/steps/2/logs/stdio
Caused by: org.gradle.api.InvalidUserCodeException:
Entry org/apache/ofbiz/accounting/period/PeriodServices.class
is a duplicate but no duplicate handling strategy has been set.

This is a workaround. We can use a better name for GPeriodServices.groovy
And maybe use a duplicate handling strategy (complicated?)
  • Loading branch information
JacquesLeRoux committed Mar 26, 2024
1 parent c7b1a4b commit 62ebc55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions applications/accounting/servicedef/services_ledger.xml
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ under the License.

<!-- CustomTimePeriod Services -->
<service name="findCustomTimePeriods" engine="groovy" invoke="findCustomTimePeriods" auth="true"
location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/period/PeriodServices.groovy">
location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/period/GPeriodServices.groovy">
<description>Find CustomTimePeriod records, returns both general ones and those for the organizationPartyId passed</description>
<attribute name="findDate" type="Timestamp" mode="IN"/>
<attribute name="organizationPartyId" type="String" mode="IN" optional="true"/>
Expand All @@ -558,7 +558,7 @@ under the License.
<attribute name="lastClosedTimePeriod" type="org.apache.ofbiz.entity.GenericValue" mode="OUT" optional="true"/>
</service>
<service name="getPreviousTimePeriod" engine="groovy" invoke="getPreviousTimePeriod" auth="true"
location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/period/PeriodServices.groovy">
location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/period/GPeriodServices.groovy">
<description>Return previous year with respect to the given year and if none found then return null.</description>
<attribute name="customTimePeriodId" mode="IN" type="String"/>
<attribute name="previousTimePeriod" mode="OUT" type="Map" optional="true"/>
Expand Down

0 comments on commit 62ebc55

Please sign in to comment.