Hello all,
While I feel this must be a very very basic question, I obviously do not find
the right search statement to spot any solution on the web. Hum. So apologies
for the spam if this is for you ,-)
I shall be happy to take any pointer to further reading or to example code for
this in order to do 'homework' offline.
Context and objective:
I do try to build a standalone component for inclusion as a plugin into the
OfBiz framework. I initialized the component using the framework’s Gradle task,
then copied only the contents of the plugin folder over into a dedicated
repository as my idea is to keep the code repo slim while then doing the
component integration in a CICD pipeline that will finally produce a docker
image that includes the component.
Integration steps in the pipeline:
My attempt to build (and then test) the component is the following:
- download the ofbiz framework from repository by cloning release22.01 from git
- create the plugin directory and copy my component code into it
- switch to ofbiz-framework folder and execute ./gradlew build
The issue:
When attempting to build, everything goes smoothly down to
Task :plugins:cdc-tickets:compileJava
where obviously the ofbiz packages are not found. Error message when compiling
my classes in the component is this:
error: package org.apache.ofbiz.base.util does not exist
My question is:
- am I missing something in the build.gradle? A dependency statement maybe?
I tried with a dependency on the main project (as classpath project (':ofbiz‘),
but that did not work out.
I checked most of the build.gradle configs in other plugins, but none mentions
the dependency on ofbiz explicitly it appears; maybe I misread?
Is my approach even correct? It is based on Dan Watford's docker image project
for OfBiz, so maybe not suited well for the component integration.
I also found nothing explicit in the OfBiz developer handbook or confluence
space either.
So if you can point me: Many many thanks in advance!
If you want to throw an eye on the code, let me please know you gitlab user id,
so I can grant you read access.
Warm regards
Carsten