You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Jacques Le Roux (Jira)" <ji...@apache.org> on 2019/09/14 15:51:00 UTC

[jira] [Commented] (OFBIZ-10226) Adds groovyScripts in the Gradle sourceSets

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

Jacques Le Roux commented on OFBIZ-10226:
-----------------------------------------

Actually when I wrote that after setting few Without putting much brain in it, I today tried to set things in build.gradle and added

srcDirs = getDirectoryInActiveComponentsIfExists('/groovyScripts')

{code}
in
        groovy {
            srcDirs = getDirectoryInActiveComponentsIfExists('src/main/groovy')
            srcDirs = getDirectoryInActiveComponentsIfExists('/groovyScripts')
        }
{code}

Not a good idea, I got this in my continuous build:


{noformat}
> Task :compileGroovy
startup failed:
C:\projectsASF\ofbiz\applications\accounting\groovyScripts\payment\ListNotAppliedPayments.groovy: 26: Invalid duplicate class definition of class ListNotAppliedPayments : The sources C:\projectsASF\ofbiz\applications\accounting\groovyScr
ipts\payment\ListNotAppliedPayments.groovy and C:\projectsASF\ofbiz\applications\accounting\groovyScripts\invoice\ListNotAppliedPayments.groovy each contain a class with the name ListNotAppliedPayments.
 @ line 26, column 1.
   basePaymentId = parameters.paymentId
   ^

C:\projectsASF\ofbiz\applications\content\groovyScripts\contentsetup\UserPermPrep.groovy: 24: Invalid duplicate class definition of class UserPermPrep : The sources C:\projectsASF\ofbiz\applications\content\groovyScripts\contentsetup\Use
rPermPrep.groovy and C:\projectsASF\ofbiz\applications\content\groovyScripts\cms\UserPermPrep.groovy each contain a class with the name UserPermPrep.
 @ line 24, column 1.
   paramMap = UtilHttp.getParameterMap(request)
   ^

C:\projectsASF\ofbiz\applications\product\groovyScripts\catalog\category\CategoryTree.groovy: 46: Invalid duplicate class definition of class CategoryTree : The sources C:\projectsASF\ofbiz\applications\product\groovyScripts\catalog\cate
gory\CategoryTree.groovy and C:\projectsASF\ofbiz\applications\humanres\groovyScripts\category\CategoryTree.groovy each contain a class with the name CategoryTree.
 @ line 46, column 1.
   completedTree =  []
   ^

C:\projectsASF\ofbiz\applications\product\groovyScripts\catalog\find\AdvancedSearchOptions.groovy: 25: Invalid duplicate class definition of class AdvancedSearchOptions : The sources C:\projectsASF\ofbiz\applications\product\groovyScript
s\catalog\find\AdvancedSearchOptions.groovy and C:\projectsASF\ofbiz\applications\order\groovyScripts\entry\catalog\AdvancedSearchOptions.groovy each contain a class with the name AdvancedSearchOptions.
 @ line 25, column 1.
   searchCategoryId = parameters.SEARCH_CATEGORY_ID
   ^

C:\projectsASF\ofbiz\applications\product\groovyScripts\catalog\find\KeywordSearch.groovy: 24: Invalid duplicate class definition of class KeywordSearch : The sources C:\projectsASF\ofbiz\applications\product\groovyScripts\catalog\find\K
eywordSearch.groovy and C:\projectsASF\ofbiz\applications\order\groovyScripts\entry\catalog\KeywordSearch.groovy each contain a class with the name KeywordSearch.
 @ line 24, column 1.
   module = "KeywordSearch.groovy"
   ^

C:\projectsASF\ofbiz\applications\product\groovyScripts\catalog\find\SideDeepCategory.groovy: 25: Invalid duplicate class definition of class SideDeepCategory : The sources C:\projectsASF\ofbiz\applications\product\groovyScripts\catalog\
find\SideDeepCategory.groovy and C:\projectsASF\ofbiz\applications\order\groovyScripts\entry\catalog\SideDeepCategory.groovy each contain a class with the name SideDeepCategory.
 @ line 25, column 1.
   state = request.getParameter("BrowseCategoriesState")
   ^

C:\projectsASF\ofbiz\applications\product\groovyScripts\facility\facility\EditContactMech.groovy: 22: Invalid duplicate class definition of class EditContactMech : The sources C:\projectsASF\ofbiz\applications\product\groovyScripts\facil
ity\facility\EditContactMech.groovy and C:\projectsASF\ofbiz\applications\party\groovyScripts\party\EditContactMech.groovy each contain a class with the name EditContactMech.
 @ line 22, column 1.
   facilityId = parameters.facilityId
   ^

C:\projectsASF\ofbiz\applications\product\groovyScripts\facility\facility\FindFacility.groovy: 21: Invalid duplicate class definition of class FindFacility : The sources C:\projectsASF\ofbiz\applications\product\groovyScripts\facility\fa
cility\FindFacility.groovy and C:\projectsASF\ofbiz\applications\commonext\groovyScripts\ofbizsetup\FindFacility.groovy each contain a class with the name FindFacility.
 @ line 21, column 1.
   findResult = from("Facility").queryList()
   ^

C:\projectsASF\ofbiz\framework\webtools\groovyScripts\geo\GetGeoLocation.groovy: 20: Invalid duplicate class definition of class GetGeoLocation : The sources C:\projectsASF\ofbiz\framework\webtools\groovyScripts\geo\GetGeoLocation.groovy
 and C:\projectsASF\ofbiz\applications\party\groovyScripts\party\GetGeoLocation.groovy each contain a class with the name GetGeoLocation.
 @ line 20, column 1.
   context.geoPointId = geoPoint.geoPointId
   ^

C:\projectsASF\ofbiz\plugins\birt\groovyScripts\accounting\InvoiceAcctgTransEntryParameters.groovy: 20: Invalid duplicate class definition of class InvoiceAcctgTransEntryParameters : The sources C:\projectsASF\ofbiz\plugins\birt\groovySc
ripts\accounting\InvoiceAcctgTransEntryParameters.groovy and C:\projectsASF\ofbiz\applications\accounting\groovyScripts\reports\InvoiceAcctgTransEntryParameters.groovy each contain a class with the name InvoiceAcctgTransEntryParameters.
 @ line 20, column 1.
   def module = "InvoiceAcctgTransEntryParameters.groovy"
   ^

C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\cart\ShowCart.groovy: 29: Invalid duplicate class definition of class ShowCart : The sources C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\cart\ShowCart.groovy and C:\projectsAS
F\ofbiz\applications\order\groovyScripts\entry\ShowCart.groovy each contain a class with the name ShowCart.
 @ line 29, column 1.
   shoppingCart = ShoppingCartEvents.getCartObject(request)
   ^

C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\cart\ShowPromoText.groovy: 23: Invalid duplicate class definition of class ShowPromoText : The sources C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\cart\ShowPromoText.groovy an
d C:\projectsASF\ofbiz\applications\order\groovyScripts\entry\ShowPromoText.groovy each contain a class with the name ShowPromoText.
 @ line 23, column 1.
   promoShowLimit = 3
   ^

C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\customer\EditContactMech.groovy: 30: Invalid duplicate class definition of class EditContactMech : The sources C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\customer\EditContact
Mech.groovy and C:\projectsASF\ofbiz\applications\product\groovyScripts\facility\facility\EditContactMech.groovy each contain a class with the name EditContactMech.
 @ line 30, column 1.
   target = [:]
   ^

C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\customer\EditPaymentMethod.groovy: 25: Invalid duplicate class definition of class EditPaymentMethod : The sources C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\customer\EditPay
mentMethod.groovy and C:\projectsASF\ofbiz\applications\party\groovyScripts\party\EditPaymentMethod.groovy each contain a class with the name EditPaymentMethod.
 @ line 25, column 1.
   paymentResults = PaymentWorker.getPaymentMethodAndRelated(request, userLogin.partyId)
   ^

C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\customer\ViewProfile.groovy: 30: Invalid duplicate class definition of class ViewProfile : The sources C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\customer\ViewProfile.groovy
and C:\projectsASF\ofbiz\applications\party\groovyScripts\party\ViewProfile.groovy each contain a class with the name ViewProfile.
 @ line 30, column 1.
   productStoreId = ProductStoreWorker.getProductStoreId(request)
   ^

C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\forum\ContentPrep.groovy: 40: Invalid duplicate class definition of class ContentPrep : The sources C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\forum\ContentPrep.groovy and C:
\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\content\ContentPrep.groovy each contain a class with the name ContentPrep.
 @ line 40, column 1.
   rootPubPt = parameters.webSiteId
   ^

C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\order\BillSettings.groovy: 27: Invalid duplicate class definition of class BillSettings : The sources C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\order\BillSettings.groovy and
 C:\projectsASF\ofbiz\applications\order\groovyScripts\entry\BillSettings.groovy each contain a class with the name BillSettings.
 @ line 27, column 1.
   cart = session.getAttribute("shoppingCart")
   ^

C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\order\CheckoutReview.groovy: 30: Invalid duplicate class definition of class CheckoutReview : The sources C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\order\CheckoutReview.groo
vy and C:\projectsASF\ofbiz\applications\order\groovyScripts\entry\CheckoutReview.groovy each contain a class with the name CheckoutReview.
 @ line 30, column 1.
   cart = session.getAttribute("shoppingCart")
   ^

C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\order\OptionSettings.groovy: 27: Invalid duplicate class definition of class OptionSettings : The sources C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\order\OptionSettings.groo
vy and C:\projectsASF\ofbiz\applications\order\groovyScripts\entry\OptionSettings.groovy each contain a class with the name OptionSettings.
 @ line 27, column 1.
   shoppingCart = session.getAttribute("shoppingCart")
   ^

C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\order\OrderHistory.groovy: 25: Invalid duplicate class definition of class OrderHistory : The sources C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\order\OrderHistory.groovy and
 C:\projectsASF\ofbiz\applications\order\groovyScripts\order\OrderHistory.groovy each contain a class with the name OrderHistory.
 @ line 25, column 1.
   partyRole = from("PartyRole").where("partyId", userLogin.partyId, "roleTypeId", "SUPPLIER").queryOne()
   ^

C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\order\ShipSettings.groovy: 27: Invalid duplicate class definition of class ShipSettings : The sources C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\order\ShipSettings.groovy and
 C:\projectsASF\ofbiz\applications\order\groovyScripts\entry\ShipSettings.groovy each contain a class with the name ShipSettings.
 @ line 27, column 1.
   cart = session.getAttribute("shoppingCart")
   ^

C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\shoppinglist\EditShoppingList.groovy: 35: Invalid duplicate class definition of class EditShoppingList : The sources C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\shoppinglist\E
ditShoppingList.groovy and C:\projectsASF\ofbiz\applications\party\groovyScripts\party\EditShoppingList.groovy each contain a class with the name EditShoppingList.
 @ line 35, column 1.
   if (userLogin)
   ^

C:\projectsASF\ofbiz\plugins\lucene\groovyScripts\content\AdvancedSearchPrep.groovy: 23: Invalid duplicate class definition of class AdvancedSearchPrep : The sources C:\projectsASF\ofbiz\plugins\lucene\groovyScripts\content\AdvancedSearc
hPrep.groovy and C:\projectsASF\ofbiz\plugins\ecommerce\groovyScripts\content\AdvancedSearchPrep.groovy each contain a class with the name AdvancedSearchPrep.
 @ line 23, column 1.
   productFeaturesByTypeMap = ParametricSearch.getAllFeaturesByType(delegator, 2000)
   ^

C:\projectsASF\ofbiz\plugins\lucene\groovyScripts\content\Search.groovy: 32: Invalid duplicate class definition of class Search : The sources C:\projectsASF\ofbiz\plugins\lucene\groovyScripts\content\Search.groovy and C:\projectsASF\ofbi
z\plugins\ecommerce\groovyScripts\content\Search.groovy each contain a class with the name Search.
 @ line 32, column 1.
   queryLine = parameters.queryLine
   ^

C:\projectsASF\ofbiz\plugins\scrum\groovyScripts\EditWeekTimesheet.groovy: 29: Invalid duplicate class definition of class EditWeekTimesheet : The sources C:\projectsASF\ofbiz\plugins\scrum\groovyScripts\EditWeekTimesheet.groovy and C:\p
rojectsASF\ofbiz\plugins\projectmgr\groovyScripts\EditWeekTimesheet.groovy each contain a class with the name EditWeekTimesheet.
 @ line 29, column 1.
   uiLabelMap = UtilProperties.getResourceBundleMap("scrumUiLabels", locale)
   ^

C:\projectsASF\ofbiz\plugins\webpos\groovyScripts\cart\ShowCart.groovy: 23: Invalid duplicate class definition of class ShowCart : The sources C:\projectsASF\ofbiz\plugins\webpos\groovyScripts\cart\ShowCart.groovy and C:\projectsASF\ofbi
z\plugins\ecommerce\groovyScripts\cart\ShowCart.groovy each contain a class with the name ShowCart.
 @ line 23, column 1.
   webPosSession = WebPosEvents.getWebPosSession(request, null);
   ^

C:\projectsASF\ofbiz\plugins\webpos\groovyScripts\catalog\Category.groovy: 28: Invalid duplicate class definition of class Category : The sources C:\projectsASF\ofbiz\plugins\webpos\groovyScripts\catalog\Category.groovy and C:\projectsAS
F\ofbiz\applications\order\groovyScripts\entry\catalog\Category.groovy each contain a class with the name Category.
 @ line 28, column 1.
   detailScreen = "categorydetail"
   ^

C:\projectsASF\ofbiz\plugins\webpos\groovyScripts\catalog\SideDeepCategory.groovy: 22: Invalid duplicate class definition of class SideDeepCategory : The sources C:\projectsASF\ofbiz\plugins\webpos\groovyScripts\catalog\SideDeepCategory.
groovy and C:\projectsASF\ofbiz\applications\product\groovyScripts\catalog\find\SideDeepCategory.groovy each contain a class with the name SideDeepCategory.
 @ line 22, column 1.
   CategoryWorker.getRelatedCategories(request, "topLevelList", CatalogWorker.getCatalogTopCategoryId(request, CatalogWorker.getCurrentCatalogId(request)), true)
   ^

C:\projectsASF\ofbiz\plugins\webpos\groovyScripts\Login.groovy: 23: Invalid duplicate class definition of class Login : The sources C:\projectsASF\ofbiz\plugins\webpos\groovyScripts\Login.groovy and C:\projectsASF\ofbiz\plugins\ecommerce
\groovyScripts\Login.groovy each contain a class with the name Login.
 @ line 23, column 1.
   context.autoUserLogin = session.getAttribute("autoUserLogin")
   ^

29 errors

> Task :compileGroovy FAILED
{noformat}

I did not even try to understand anything. It's not the way, I don't know what the way is and I don't want to search. So I'll close here as won't do and will continue to manuall add source paths in Eclipse when needed.

[~mthl], maybe you want to follow your idea and create a Jira for it?


> Adds groovyScripts in the Gradle sourceSets
> -------------------------------------------
>
>                 Key: OFBIZ-10226
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10226
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: Gradle
>    Affects Versions: Trunk
>            Reporter: Jacques Le Roux
>            Priority: Major
>
> With the Eclipse Groovy Development Tools plugin installed, we can use the Eclipe debugger with Groovy files if we provide source paths for them. So we need to improve the sourceSets defined in the main build.gradle file.
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)