[
https://issues.apache.org/jira/browse/OFBIZ-7910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15418980#comment-15418980 ]
Wai commented on OFBIZ-7910:
----------------------------
Hello Taher, Jacques
Here are my findings.
My source tree contains the following relevant details...
/ofbiz
/ofbiz/lib
/ofbiz/hot-deploy/mycomponent1
/ofbiz/hot-deploy/mycomponent1/lib
mycomponent1 references a class in myInHouse.jar
Try1:
I placed the myInHouse.jar in /ofbiz/lib
Modified /ofbiz/build.gradle and added the following to dependencies
compile files('lib')
Ran $gradlew cleanAll build
The compilation failed on mycomponent1.
-the failure is due to mycomponent1 referencing a class that is not found. This class is in myInHouse.jar
Try2:
I placed the myInHouse.jar into /ofbiz/hot-deploy/mycomponent1/lib
Ran $gradlew cleanAll build
The compilation was sucessful.
Conclusion:
My findinds corroborates Taher's comment about searching in the local 'lib' directory of each component to locate the custom jars.
I also noticed a deficiency with the build script. Consider a developer creates multiple hot-deploy components. Each component references classes from the same myInHouse.jar. This would require a copy of the same jar in each of the components 'lib' directory. This is very inconvenient.
I suggest to modify the script so that each hot-deploy component can reference one myInHouse.jar located in /ofbiz/lib.
I hope this helps.
Wai
> Improve component template(s) to work with the Gradle solution
> --------------------------------------------------------------
>
> Key: OFBIZ-7910
> URL:
https://issues.apache.org/jira/browse/OFBIZ-7910> Project: OFBiz
> Issue Type: Sub-task
> Components: framework
> Reporter: Pierre Smits
> Assignee: Jacques Le Roux
> Priority: Trivial
> Attachments: OFBIZ-7910-Resources-build.gradle.patch
>
>
> Currently the component generated with the createComponent task doesn't have the means to work with the Gradle build solution visavis dependency management.
> The reason for this is that no build.gradle template exists that need to be copied into the new component.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)