Hi Michael,

Thanks to have a look and respond.
Here is the console output that a gives me trouble:

$ ./gradlew build
190 
<https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L190>Welcome 
to Gradle 7.6!
191 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L191>Here 
are the highlights of this release:
192 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L192> - 
Added support for Java 19.
193 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L193> - 
Introduced `--rerun` flag for individual task rerun.
194 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L194> - 
Improved dependency block for test suites to be strongly typed.
195 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L195> - 
Added a pluggable system for Java toolchains provisioning.
196 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L196>For 
more details see https://docs.gradle.org/7.6/release-notes.html
197 
<https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L197>Starting 
a Gradle Daemon (subsequent builds will be faster)
198 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L198>> 
Task :buildSrc:extractPluginRequests
199 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L199>> 
Task :buildSrc:generatePluginAdapters
200 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L200>> 
Task :buildSrc:compileJava
201 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L201>> 
Task :buildSrc:compileGroovy NO-SOURCE
202 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L202>> 
Task :buildSrc:compileGroovyPlugins
203 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L203>> 
Task :buildSrc:pluginDescriptors
204 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L204>> 
Task :buildSrc:processResources
205 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L205>> 
Task :buildSrc:classes
206 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L206>> 
Task :buildSrc:jar
207 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L207>> 
Task :buildSrc:assemble
208 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L208>> 
Task :buildSrc:compileTestJava NO-SOURCE
209 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L209>> 
Task :buildSrc:compileTestGroovy NO-SOURCE
210 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L210>> 
Task :buildSrc:pluginUnderTestMetadata
211 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L211>> 
Task :buildSrc:processTestResources NO-SOURCE
212 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L212>> 
Task :buildSrc:testClasses UP-TO-DATE
213 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L213>> 
Task :buildSrc:test NO-SOURCE
214 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L214>> 
Task :buildSrc:validatePlugins
215 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L215>> 
Task :buildSrc:check
216 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L216>> 
Task :buildSrc:build
217 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L217>> 
Task :compileJava
218 
<https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L218>/builds/dcs-ofbiz/cdc-ofbiz-tickets/ofbiz-framework/framework/common/src/main/java/org/apache/ofbiz/common/authentication/AuthHelper.java:132:
 warning: [removal] AccessController in java.security has been deprecated and 
marked for removal
219 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L219>     
   return AccessController.doPrivileged(
220 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L220>     
          ^
221 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L221>1 
warning
222 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L222>> 
Task :compileGroovy
223 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L223>> 
Task :processResources
224 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L224>> 
Task :themes:common-theme:nodeSetup
225 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L225>> 
Task :themes:common-theme:npmSetup SKIPPED
226 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L226>> 
Task :themes:common-theme:npmInstall
227 
<https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L227>added 8 
packages, and audited 9 packages in 910ms
228 
<https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L228>found 0 
vulnerabilities
229 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L229>> 
Task :classes
230 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L230>> 
Task :jar
231 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L231>> 
Task :startScripts
232 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L232>> 
Task :distTar
233 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L233>> 
Task :distZip
234 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L234>> 
Task :assemble
235 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L235>> 
Task :compileGroovyScriptsJava NO-SOURCE
236 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L236>> 
Task :compileGroovyScriptsGroovy SKIPPED
237 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L237>> 
Task :processGroovyScriptsResources NO-SOURCE
238 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L238>> 
Task :groovyScriptsClasses UP-TO-DATE
239 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L239>> 
Task :checkstyleGroovyScripts NO-SOURCE
240 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L240>> 
Task :compileTestJava
241 
<https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L241>/builds/dcs-ofbiz/cdc-ofbiz-tickets/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-api/5.4.2/665d1c0daecb26c6210c872768000b417e7e52b6/junit-jupiter-api-5.4.2.jar(/org/junit/jupiter/api/Test.class):
 warning: Cannot find annotation method 'status()' in type 'API': class file 
for org.apiguardian.api.API not found
242 
<https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L242>warning: 
unknown enum constant Status.STABLE
243 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L243>  
reason: class file for org.apiguardian.api.API$Status not found
244 
<https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L244>/builds/dcs-ofbiz/cdc-ofbiz-tickets/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-api/5.4.2/665d1c0daecb26c6210c872768000b417e7e52b6/junit-jupiter-api-5.4.2.jar(/org/junit/jupiter/api/Test.class):
 warning: Cannot find annotation method 'since()' in type 'API'
245 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L245>3 
warnings
246 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L246>> 
Task :compileTestGroovy
247 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L247>> 
Task :processTestResources
248 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L248>> 
Task :testClasses
249 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L249>> 
Task :checkstyleTest
250 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L250>> 
Task :checkstyleMain
251 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L251>> 
Task :test
252 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L252>> 
Task :check
253 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L253>> 
Task :build
254 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L254>> 
Task :plugins:cdc-tickets:compileJava
255 
<https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L255>/builds/dcs-ofbiz/cdc-ofbiz-tickets/ofbiz-framework/plugins/cdc-tickets/src/main/java/de/dcs/ofbiz/event/reservation/services/AuthServices.java:23:
 error: package org.apache.ofbiz.base.util does not exist
256 
<https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L256>import 
org.apache.ofbiz.base.util.Debug;
257 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L257>     
                            ^
258 
<https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4869902126#L258>/builds/dcs-ofbiz/cdc-ofbiz-tickets/ofbiz-framework/plugins/cdc-tickets/src/main/java/de/dcs/ofbiz/event/reservation/services/AuthServices.java:24:
 error: package org.apache.ofbiz.base.util does not exist
… etc throughout all my custom classes whenever I import ofbiz components.

Here are the last tasks for a console output of a build w/o plugins:

(…)
245 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4896131253#L245>> 
Task :check
246 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4896131253#L246>> 
Task :build
247 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4896131253#L247>> 
Task :themes:common-theme:assemble UP-TO-DATE
248 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4896131253#L248>> 
Task :themes:common-theme:check UP-TO-DATE
249 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4896131253#L249>> 
Task :themes:common-theme:build UP-TO-DATE
250 
<https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4896131253#L250>Deprecated
 Gradle features were used in this build, making it incompatible with Gradle 
8.0.
251 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4896131253#L251>You 
can use '--warning-mode all' to show the individual deprecation warnings and 
determine if they come from your own scripts or plugins.
252 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4896131253#L252>See 
https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings
253 
<https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4896131253#L253>BUILD 
SUCCESSFUL in 3m 7s
254 <https://gitlab.com/dcs-ofbiz/cdc-ofbiz-tickets/-/jobs/4896131253#L254>24 
actionable tasks: 24 executed

Warm regards


Carsten

> Am 15.08.2023 um 22:17 schrieb Michael Brohl <[email protected]>:
> 
> Hi Carsten,
> 
> hard to say without seeing what's in your plugin.
> 
> Integration of plugins is straightforward. You can even make a symlink to an 
> external plugin repo and it normally works.
> 
> It sounds like everything is setup ok, the plugin code can be found. Does 
> compilation work if you don't have the plugin code under /plugins?
> 
> Everything else under /plugins except you plugin folder (the plugin needs a 
> separate folder, e.g. /plugins/my-plugin/)?
> 
> Maybe you can post the relevant part of the console.log to see more.
> 
> Best regards,
> 
> Michael Brohl
> 
> ecomify GmbH - www.ecomify.de
> 
> 
> Am 14.08.23 um 18:29 schrieb Carsten Schinzer:
>> 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
>> 
>> 

Reply via email to