Hi The docs tells you where it outputs and how you can add plugins to include the src/generated folder https://camel.apache.org/manual/camel-component-maven-plugin.html#_generate
You can also set which phase to execute the plugin On Sat, Mar 26, 2022 at 1:18 PM Minh Tran <minh.tran...@gmail.com> wrote: > > Hi > > According to the docs, this plugin is meant to execute on > the process-classes phase. However this phase executes after the compile > phase so the autogenerated class never gets compiled. > > If you subsequently run the maven execution again, the compiler picks it up > the second time around. Unit tests that rely on the generated class will > always fail the first time and pass on the second. Compounding the issue is > that the default output directory is src/generated which does not get > cleaned up when running "mvn clean". If you add this directory to be > cleaned up by maven-clean-plugin then you can consistently reproduce this > bug. IMO, camel should be defaulting to generating sources in the target > directory so it would get cleaned up by default. > > I have attempted to change the phase that camel-component-maven-plugin gets > executed but no classes seem to get generated at all. I tried > generate-sources and compile phase, neither worked. > > This bug pretty much prevents any correct builds happening in the cloud > (like Bitbucket/Azure pipelines) as everything starts from scratch. If you > have unit tests that rely on it, the build will fail. If you don't have > unit tests, then you end up with a jar missing the autogenerated class in > it. > > I am using Camel 3.15.0 and JDK 11 -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2