Re: camel-component-maven-plugin not hooked to the correct maven phase

2022-04-05 Thread Claus Ibsen
Hi Yeah lets add this to the docs https://issues.apache.org/jira/browse/CAMEL-17903 On Tue, Mar 29, 2022 at 11:18 AM Minh Tran wrote: > > This workaround does the job. Thank you Claus. > > On Mon, 28 Mar 2022 at 23:16, Claus Ibsen wrote: > > > It is a plugin to assist when building custom camel

Re: camel-component-maven-plugin not hooked to the correct maven phase

2022-03-29 Thread Minh Tran
This workaround does the job. Thank you Claus. On Mon, 28 Mar 2022 at 23:16, Claus Ibsen wrote: > It is a plugin to assist when building custom camel components, not to > use for end user applications. > > It is currently two-step as I said. Its not an easy fix. > > In the camel project we have

Re: camel-component-maven-plugin not hooked to the correct maven phase

2022-03-28 Thread Claus Ibsen
It is a plugin to assist when building custom camel components, not to use for end user applications. It is currently two-step as I said. Its not an easy fix. In the camel project we have a re-compile step maven-compiler-plugin

Re: camel-component-maven-plugin not hooked to the correct maven phase

2022-03-28 Thread Minh Tran
Are you suggesting we should really be executing the build like this? mvn clean process-classes test It works I guess but highly unconventional compared to other maven code generation plugins. It could also potentially be a big overhead as you're running the all the phases prior to process-classe

Re: camel-component-maven-plugin not hooked to the correct maven phase

2022-03-28 Thread Claus Ibsen
Yes it is. You need to run the camel plugin in its own maven execution first so the source is generated prior to running maven again to test or compile or whatever. You cannot run this in a single maven command from clean. On Mon, Mar 28, 2022 at 12:18 PM Minh Tran wrote: > > Hi > > This is not

Re: camel-component-maven-plugin not hooked to the correct maven phase

2022-03-28 Thread Minh Tran
Hi This is not a chicken and egg problem. I've recreated a basic project illustrating the problem git clone https://bitbucket.org/minh_tran__/camel_plugin_bug.git mvn clean test. -> will always fail. I've ensured clean will always remove the autogenerated classes mvn test -> second attempt witho

Re: camel-component-maven-plugin not hooked to the correct maven phase

2022-03-28 Thread Claus Ibsen
Hi Its a chicken and egg situation. Therefore its best to use the plugin to generate the source code ahead of time, eg in src/generated or directly into the source folder - as shown in the doc page. On Mon, Mar 28, 2022 at 10:24 AM Minh Tran wrote: > > On Mon, 28 Mar 2022 at 18:14, Claus Ibsen

Re: camel-component-maven-plugin not hooked to the correct maven phase

2022-03-28 Thread Minh Tran
On Mon, 28 Mar 2022 at 18:14, Claus Ibsen wrote: > 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 Yes you can change the defaults but the problem is that t

Re: camel-component-maven-plugin not hooked to the correct maven phase

2022-03-28 Thread Claus Ibsen
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 wrote: > > Hi > > Accor

camel-component-maven-plugin not hooked to the correct maven phase

2022-03-26 Thread Minh Tran
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 test