Re: maven generate questions
Hi Yes it works and builds fine. On Wed, May 24, 2023 at 1:54 PM Petr Kuzel wrote: > Hi Claus, > > Thx for your peek. > > My env is {Windows, JDK 11 + JDK 8, eclipse 2023-03, camel-3.x}. > > If I recursively delete src/generated/ then maven install fails: > > [ [1;31mERROR [m] Failed to execute goal > [32morg.apache.camel:camel-package-maven-plugin:3.21.0-SNAPSHOT:generate > [m [1m(generate) [m on project [36mcamel-azure-files [m: [1;31mError > generating data org.apache.maven.plugin.MojoExecutionException: Error > loading other model. Reason: java.lang.IllegalArgumentException: > FirstVersion is not specified. This can be done in @UriEndpoint or in > pom.xml file. [m -> [1m[Help 1] [m > > A workaround is to introduce the marker file under generated: > > > camel-azure-files/src/generated/resources/META-INF/services/org/apache/camel/component/generate-meta-please > > Then maven install passes: > > [ [1;34mINFO [m] [1;32mBUILD SUCCESS > > > At the end of a day, we have the same expectation: > src/generated/ should be removable and rebuildable > anytime (& consequently no value to add generated/ > to Git, right?). > > I'm just a bit puzzled that at your end: > > cd components/camel-azure/camel-azure-files > rm -rf src/generated > > followed by maven install does not fail. > > Hope it helps > Cc. > > -- > Mr. Petr Kužel, Software Engineer > Eurofins International Support Services s.à r.l. > Val Fleuri 23 > L-1526 LUXEMBOURG > > -Original Message- > From: Claus Ibsen > Sent: Wednesday, May 24, 2023 11:55 > To: dev@camel.apache.org > Subject: Re: maven generate questions > > > > CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not formally > trusted by Eurofins. > > Do not click on links or open attachments unless you recognise the sender > and are certain that the content is safe. > > Hi > > Okay so its a bit weird. What OS are you using? > > You should always be able to do > > rm -rf src/generated > > and rebuild all files again, and have the same result as before if no > changes. > > > On Wed, May 24, 2023 at 11:17 AM Petr Kuzel .invalid> > wrote: > > > Hi Claus, > > > > meanwhile at my side, I have put the build under debugger > > to understand the root cause of my problems. > > > > My conclusion is commited in > > > > > https://github.com/pekuz/camel/commit/bad98a275c4cf23532f14c1d0f84bcde28ba9059#diff-4d8489aba647b70b97a7528b634ef5ac309ed85c1d433a7f6e6eaf00f987f219 > > > > I could create an issue as IMHO it's a trap > > for newcomers and it reveals fuzziness > > around the generated/ dir. The below #1 was > > just a code smell... but with hours spent > > on overcoming its consequences a relevant one. > > > > Hope it helps > > Cc. > > > > -- > > Mr. Petr Kužel, Software Engineer > > Eurofins International Support Services s.à r.l. > > Val Fleuri 23 > > L-1526 LUXEMBOURG > > > > -Original Message- > > From: Claus Ibsen > > Sent: Wednesday, May 24, 2023 09:44 > > To: dev@camel.apache.org > > Subject: Re: maven generate questions > > > > > > > > CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not formally > > trusted by Eurofins. > > > > Do not click on links or open attachments unless you recognise the sender > > and are certain that the content is safe. > > > > Hi > > > > I can build your project and the code in camel-azure-files > > > > mvn -V > > Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) > > Maven home: /opt/homebrew/Cellar/maven/3.8.6/libexec > > Java version: 17.0.5, vendor: Azul Systems, Inc., runtime: > > /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home > > Default locale: en_DK, platform encoding: UTF-8 > > OS name: "mac os x", version: "13.3.1", arch: "aarch64", family: "mac" > > > > And it generates some files for src/generated that you didnt have yet > > > > > > > > On Tue, May 23, 2023 at 11:30 AM Petr Kuzel > .invalid> > > wrote: > > > > > Hi Claus, > > > > > > I have pushed a wet source in my fork at (deep link): > > > > > > > > > https://github.com/pekuz/camel/tree/camel-3.x/components/camel-azure/camel-azure-files > > > > > > For #1, in the fork, src/generated/ is versioned, > > > despite I'm not convinced about adding into Git > > > build-generated sources. > > >
RE: maven generate questions
Hi Claus, Thx for your peek. My env is {Windows, JDK 11 + JDK 8, eclipse 2023-03, camel-3.x}. If I recursively delete src/generated/ then maven install fails: [[1;31mERROR[m] Failed to execute goal [32morg.apache.camel:camel-package-maven-plugin:3.21.0-SNAPSHOT:generate[m [1m(generate)[m on project [36mcamel-azure-files[m: [1;31mError generating data org.apache.maven.plugin.MojoExecutionException: Error loading other model. Reason: java.lang.IllegalArgumentException: FirstVersion is not specified. This can be done in @UriEndpoint or in pom.xml file.[m -> [1m[Help 1][m A workaround is to introduce the marker file under generated: camel-azure-files/src/generated/resources/META-INF/services/org/apache/camel/component/generate-meta-please Then maven install passes: [[1;34mINFO[m] [1;32mBUILD SUCCESS At the end of a day, we have the same expectation: src/generated/ should be removable and rebuildable anytime (& consequently no value to add generated/ to Git, right?). I'm just a bit puzzled that at your end: cd components/camel-azure/camel-azure-files rm -rf src/generated followed by maven install does not fail. Hope it helps Cc. -- Mr. Petr Kužel, Software Engineer Eurofins International Support Services s.à r.l. Val Fleuri 23 L-1526 LUXEMBOURG -Original Message- From: Claus Ibsen Sent: Wednesday, May 24, 2023 11:55 To: dev@camel.apache.org Subject: Re: maven generate questions CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not formally trusted by Eurofins. Do not click on links or open attachments unless you recognise the sender and are certain that the content is safe. Hi Okay so its a bit weird. What OS are you using? You should always be able to do rm -rf src/generated and rebuild all files again, and have the same result as before if no changes. On Wed, May 24, 2023 at 11:17 AM Petr Kuzel wrote: > Hi Claus, > > meanwhile at my side, I have put the build under debugger > to understand the root cause of my problems. > > My conclusion is commited in > > https://github.com/pekuz/camel/commit/bad98a275c4cf23532f14c1d0f84bcde28ba9059#diff-4d8489aba647b70b97a7528b634ef5ac309ed85c1d433a7f6e6eaf00f987f219 > > I could create an issue as IMHO it's a trap > for newcomers and it reveals fuzziness > around the generated/ dir. The below #1 was > just a code smell... but with hours spent > on overcoming its consequences a relevant one. > > Hope it helps > Cc. > > -- > Mr. Petr Kužel, Software Engineer > Eurofins International Support Services s.à r.l. > Val Fleuri 23 > L-1526 LUXEMBOURG > > -Original Message- > From: Claus Ibsen > Sent: Wednesday, May 24, 2023 09:44 > To: dev@camel.apache.org > Subject: Re: maven generate questions > > > > CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not formally > trusted by Eurofins. > > Do not click on links or open attachments unless you recognise the sender > and are certain that the content is safe. > > Hi > > I can build your project and the code in camel-azure-files > > mvn -V > Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) > Maven home: /opt/homebrew/Cellar/maven/3.8.6/libexec > Java version: 17.0.5, vendor: Azul Systems, Inc., runtime: > /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home > Default locale: en_DK, platform encoding: UTF-8 > OS name: "mac os x", version: "13.3.1", arch: "aarch64", family: "mac" > > And it generates some files for src/generated that you didnt have yet > > > > On Tue, May 23, 2023 at 11:30 AM Petr Kuzel .invalid> > wrote: > > > Hi Claus, > > > > I have pushed a wet source in my fork at (deep link): > > > > > https://github.com/pekuz/camel/tree/camel-3.x/components/camel-azure/camel-azure-files > > > > For #1, in the fork, src/generated/ is versioned, > > despite I'm not convinced about adding into Git > > build-generated sources. > > > > For #2, there must be some overlook, but I'm > > in a state where the error message fails to guide > > me further, the same for your hint... because I had > > literally copy-and-pasted the FTPS component > > and then started adapting it for Azure Files > > while using the Azure blob component > > as a secondary source of interesting sources. > > > > If you spot a bad or missing annotation > > that could be at cause let me know, please. > > > > Best regards > > Cc. > > > > (BTW, there might also a false pull request right on the Camel repo, > > I used GitHub Desktop in the "to contribute" mode > > and it by-passed the fork, I tried to reconfigure but ended > > i
Re: maven generate questions
Hi Okay so its a bit weird. What OS are you using? You should always be able to do rm -rf src/generated and rebuild all files again, and have the same result as before if no changes. On Wed, May 24, 2023 at 11:17 AM Petr Kuzel wrote: > Hi Claus, > > meanwhile at my side, I have put the build under debugger > to understand the root cause of my problems. > > My conclusion is commited in > > https://github.com/pekuz/camel/commit/bad98a275c4cf23532f14c1d0f84bcde28ba9059#diff-4d8489aba647b70b97a7528b634ef5ac309ed85c1d433a7f6e6eaf00f987f219 > > I could create an issue as IMHO it's a trap > for newcomers and it reveals fuzziness > around the generated/ dir. The below #1 was > just a code smell... but with hours spent > on overcoming its consequences a relevant one. > > Hope it helps > Cc. > > -- > Mr. Petr Kužel, Software Engineer > Eurofins International Support Services s.à r.l. > Val Fleuri 23 > L-1526 LUXEMBOURG > > -Original Message- > From: Claus Ibsen > Sent: Wednesday, May 24, 2023 09:44 > To: dev@camel.apache.org > Subject: Re: maven generate questions > > > > CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not formally > trusted by Eurofins. > > Do not click on links or open attachments unless you recognise the sender > and are certain that the content is safe. > > Hi > > I can build your project and the code in camel-azure-files > > mvn -V > Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) > Maven home: /opt/homebrew/Cellar/maven/3.8.6/libexec > Java version: 17.0.5, vendor: Azul Systems, Inc., runtime: > /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home > Default locale: en_DK, platform encoding: UTF-8 > OS name: "mac os x", version: "13.3.1", arch: "aarch64", family: "mac" > > And it generates some files for src/generated that you didnt have yet > > > > On Tue, May 23, 2023 at 11:30 AM Petr Kuzel .invalid> > wrote: > > > Hi Claus, > > > > I have pushed a wet source in my fork at (deep link): > > > > > https://github.com/pekuz/camel/tree/camel-3.x/components/camel-azure/camel-azure-files > > > > For #1, in the fork, src/generated/ is versioned, > > despite I'm not convinced about adding into Git > > build-generated sources. > > > > For #2, there must be some overlook, but I'm > > in a state where the error message fails to guide > > me further, the same for your hint... because I had > > literally copy-and-pasted the FTPS component > > and then started adapting it for Azure Files > > while using the Azure blob component > > as a secondary source of interesting sources. > > > > If you spot a bad or missing annotation > > that could be at cause let me know, please. > > > > Best regards > > Cc. > > > > (BTW, there might also a false pull request right on the Camel repo, > > I used GitHub Desktop in the "to contribute" mode > > and it by-passed the fork, I tried to reconfigure but ended > > in an uncertain state, my GitHub Desktop offers Preview PR > > which includes some parasite commits..., while > > the fork already contains exactly my two commits.) > > > > -- > > Mr. Petr Kužel, Software Engineer > > Eurofins International Support Services s.à r.l. > > Val Fleuri 23 > > L-1526 LUXEMBOURG > > > > -Original Message- > > From: Claus Ibsen > > Sent: Monday, May 22, 2023 21:00 > > To: dev@camel.apache.org > > Subject: Re: maven generate questions > > > > > > > > CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not formally > > trusted by Eurofins. > > > > Do not click on links or open attachments unless you recognise the sender > > and are certain that the content is safe. > > > > Hi > > > > When it says "other" then the plugin has not detected that its an > endpoint > > component. > > > > There are a ton of existing components you can copy from. If you just add > > the component to camel-3.x branch or main branch etc then its should be > > easier. > > > > > > On Mon, May 22, 2023 at 6:19 PM Petr Kuzel > .invalid> > > wrote: > > > > > Hi Camel devs, > > > > > > While trying to develop a new Camel component > > > I’d need an advise, again, on the generate. > > > > > > #1 > > > The generate generates a code under src/generated/. > > > Should it be committed to Git and why, please? > > > I have seen it committe
RE: maven generate questions
Hi Claus, meanwhile at my side, I have put the build under debugger to understand the root cause of my problems. My conclusion is commited in https://github.com/pekuz/camel/commit/bad98a275c4cf23532f14c1d0f84bcde28ba9059#diff-4d8489aba647b70b97a7528b634ef5ac309ed85c1d433a7f6e6eaf00f987f219 I could create an issue as IMHO it's a trap for newcomers and it reveals fuzziness around the generated/ dir. The below #1 was just a code smell... but with hours spent on overcoming its consequences a relevant one. Hope it helps Cc. -- Mr. Petr Kužel, Software Engineer Eurofins International Support Services s.à r.l. Val Fleuri 23 L-1526 LUXEMBOURG -Original Message- From: Claus Ibsen Sent: Wednesday, May 24, 2023 09:44 To: dev@camel.apache.org Subject: Re: maven generate questions CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not formally trusted by Eurofins. Do not click on links or open attachments unless you recognise the sender and are certain that the content is safe. Hi I can build your project and the code in camel-azure-files mvn -V Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: /opt/homebrew/Cellar/maven/3.8.6/libexec Java version: 17.0.5, vendor: Azul Systems, Inc., runtime: /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home Default locale: en_DK, platform encoding: UTF-8 OS name: "mac os x", version: "13.3.1", arch: "aarch64", family: "mac" And it generates some files for src/generated that you didnt have yet On Tue, May 23, 2023 at 11:30 AM Petr Kuzel wrote: > Hi Claus, > > I have pushed a wet source in my fork at (deep link): > > https://github.com/pekuz/camel/tree/camel-3.x/components/camel-azure/camel-azure-files > > For #1, in the fork, src/generated/ is versioned, > despite I'm not convinced about adding into Git > build-generated sources. > > For #2, there must be some overlook, but I'm > in a state where the error message fails to guide > me further, the same for your hint... because I had > literally copy-and-pasted the FTPS component > and then started adapting it for Azure Files > while using the Azure blob component > as a secondary source of interesting sources. > > If you spot a bad or missing annotation > that could be at cause let me know, please. > > Best regards > Cc. > > (BTW, there might also a false pull request right on the Camel repo, > I used GitHub Desktop in the "to contribute" mode > and it by-passed the fork, I tried to reconfigure but ended > in an uncertain state, my GitHub Desktop offers Preview PR > which includes some parasite commits..., while > the fork already contains exactly my two commits.) > > -- > Mr. Petr Kužel, Software Engineer > Eurofins International Support Services s.à r.l. > Val Fleuri 23 > L-1526 LUXEMBOURG > > -Original Message- > From: Claus Ibsen > Sent: Monday, May 22, 2023 21:00 > To: dev@camel.apache.org > Subject: Re: maven generate questions > > > > CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not formally > trusted by Eurofins. > > Do not click on links or open attachments unless you recognise the sender > and are certain that the content is safe. > > Hi > > When it says "other" then the plugin has not detected that its an endpoint > component. > > There are a ton of existing components you can copy from. If you just add > the component to camel-3.x branch or main branch etc then its should be > easier. > > > On Mon, May 22, 2023 at 6:19 PM Petr Kuzel .invalid> > wrote: > > > Hi Camel devs, > > > > While trying to develop a new Camel component > > I’d need an advise, again, on the generate. > > > > #1 > > The generate generates a code under src/generated/. > > Should it be committed to Git and why, please? > > I have seen it committed for other components > > but I do not understand why. I have also observed > > the generated code is not updated (e.g. after > > retyping endpoint URI params) unless I manually delete > > previously generated configurers (mvn clean is not enough). > > > > > > #2 > > I face: > > > > generate_[m _[1m(generate)_[m on project _[36mcamel-azure-files_[m: > > _[1;31mError generating data > > org.apache.maven.plugin.MojoExecutionException: > > Error loading other model. Reason: java.lang.IllegalArgumentException: > > FirstVersion is not specified. This can be done in @UriEndpoint or in > > pom.xml file. > > > > my endpoint code reads: > > > > @UriEndpoint(firstVersion = "3.21.0", ... > > public class FilesEndpoint > > extends RemoteFileEndpoint { > > &
Re: maven generate questions
Hi I can build your project and the code in camel-azure-files mvn -V Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: /opt/homebrew/Cellar/maven/3.8.6/libexec Java version: 17.0.5, vendor: Azul Systems, Inc., runtime: /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home Default locale: en_DK, platform encoding: UTF-8 OS name: "mac os x", version: "13.3.1", arch: "aarch64", family: "mac" And it generates some files for src/generated that you didnt have yet On Tue, May 23, 2023 at 11:30 AM Petr Kuzel wrote: > Hi Claus, > > I have pushed a wet source in my fork at (deep link): > > https://github.com/pekuz/camel/tree/camel-3.x/components/camel-azure/camel-azure-files > > For #1, in the fork, src/generated/ is versioned, > despite I'm not convinced about adding into Git > build-generated sources. > > For #2, there must be some overlook, but I'm > in a state where the error message fails to guide > me further, the same for your hint... because I had > literally copy-and-pasted the FTPS component > and then started adapting it for Azure Files > while using the Azure blob component > as a secondary source of interesting sources. > > If you spot a bad or missing annotation > that could be at cause let me know, please. > > Best regards > Cc. > > (BTW, there might also a false pull request right on the Camel repo, > I used GitHub Desktop in the "to contribute" mode > and it by-passed the fork, I tried to reconfigure but ended > in an uncertain state, my GitHub Desktop offers Preview PR > which includes some parasite commits..., while > the fork already contains exactly my two commits.) > > -- > Mr. Petr Kužel, Software Engineer > Eurofins International Support Services s.à r.l. > Val Fleuri 23 > L-1526 LUXEMBOURG > > -Original Message- > From: Claus Ibsen > Sent: Monday, May 22, 2023 21:00 > To: dev@camel.apache.org > Subject: Re: maven generate questions > > > > CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not formally > trusted by Eurofins. > > Do not click on links or open attachments unless you recognise the sender > and are certain that the content is safe. > > Hi > > When it says "other" then the plugin has not detected that its an endpoint > component. > > There are a ton of existing components you can copy from. If you just add > the component to camel-3.x branch or main branch etc then its should be > easier. > > > On Mon, May 22, 2023 at 6:19 PM Petr Kuzel .invalid> > wrote: > > > Hi Camel devs, > > > > While trying to develop a new Camel component > > I’d need an advise, again, on the generate. > > > > #1 > > The generate generates a code under src/generated/. > > Should it be committed to Git and why, please? > > I have seen it committed for other components > > but I do not understand why. I have also observed > > the generated code is not updated (e.g. after > > retyping endpoint URI params) unless I manually delete > > previously generated configurers (mvn clean is not enough). > > > > > > #2 > > I face: > > > > generate_[m _[1m(generate)_[m on project _[36mcamel-azure-files_[m: > > _[1;31mError generating data > > org.apache.maven.plugin.MojoExecutionException: > > Error loading other model. Reason: java.lang.IllegalArgumentException: > > FirstVersion is not specified. This can be done in @UriEndpoint or in > > pom.xml file. > > > > my endpoint code reads: > > > > @UriEndpoint(firstVersion = "3.21.0", ... > > public class FilesEndpoint > > extends RemoteFileEndpoint { > > > > > > Maven debug reports more details: > > > > [1mCaused by [m: java.lang.IllegalArgumentException: [1;31mFirstVersion > > is not specified. This can be done in @UriEndpoint or in pom.xml file. [m > > [1mat [m > > org.apache.camel.maven.packaging.SupportLevelHelper.defaultSupportLevel ( > > [1mSupportLevelHelper.java:30 [m) > > [1mat [m > > org.apache.camel.maven.packaging.PackageOtherMojo.prepareOthers ( > > [1mPackageOtherMojo.java:132 [m) > > [1mat [m > > org.apache.camel.maven.packaging.PrepareComponentMojo.execute ( > > [1mPrepareComponentMojo.java:152 [m) > > [1mat [m > > org.apache.camel.maven.packaging.AbstractGeneratorMojo.execute ( > > [1mAbstractGeneratorMojo.java:98 [m) > > [1mat [m > > org.apache.camel.maven.packaging.PrepareComponentMojo.execute ( > > [1mPrepareComponentMojo.java:122 [m) > > [1mat [m > org.apache.camel.maven.packag
RE: maven generate questions
Hi Claus, I have pushed a wet source in my fork at (deep link): https://github.com/pekuz/camel/tree/camel-3.x/components/camel-azure/camel-azure-files For #1, in the fork, src/generated/ is versioned, despite I'm not convinced about adding into Git build-generated sources. For #2, there must be some overlook, but I'm in a state where the error message fails to guide me further, the same for your hint... because I had literally copy-and-pasted the FTPS component and then started adapting it for Azure Files while using the Azure blob component as a secondary source of interesting sources. If you spot a bad or missing annotation that could be at cause let me know, please. Best regards Cc. (BTW, there might also a false pull request right on the Camel repo, I used GitHub Desktop in the "to contribute" mode and it by-passed the fork, I tried to reconfigure but ended in an uncertain state, my GitHub Desktop offers Preview PR which includes some parasite commits..., while the fork already contains exactly my two commits.) -- Mr. Petr Kužel, Software Engineer Eurofins International Support Services s.à r.l. Val Fleuri 23 L-1526 LUXEMBOURG -Original Message- From: Claus Ibsen Sent: Monday, May 22, 2023 21:00 To: dev@camel.apache.org Subject: Re: maven generate questions CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not formally trusted by Eurofins. Do not click on links or open attachments unless you recognise the sender and are certain that the content is safe. Hi When it says "other" then the plugin has not detected that its an endpoint component. There are a ton of existing components you can copy from. If you just add the component to camel-3.x branch or main branch etc then its should be easier. On Mon, May 22, 2023 at 6:19 PM Petr Kuzel wrote: > Hi Camel devs, > > While trying to develop a new Camel component > I’d need an advise, again, on the generate. > > #1 > The generate generates a code under src/generated/. > Should it be committed to Git and why, please? > I have seen it committed for other components > but I do not understand why. I have also observed > the generated code is not updated (e.g. after > retyping endpoint URI params) unless I manually delete > previously generated configurers (mvn clean is not enough). > > > #2 > I face: > > generate_[m _[1m(generate)_[m on project _[36mcamel-azure-files_[m: > _[1;31mError generating data > org.apache.maven.plugin.MojoExecutionException: > Error loading other model. Reason: java.lang.IllegalArgumentException: > FirstVersion is not specified. This can be done in @UriEndpoint or in > pom.xml file. > > my endpoint code reads: > > @UriEndpoint(firstVersion = "3.21.0", ... > public class FilesEndpoint > extends RemoteFileEndpoint { > > > Maven debug reports more details: > > [1mCaused by [m: java.lang.IllegalArgumentException: [1;31mFirstVersion > is not specified. This can be done in @UriEndpoint or in pom.xml file. [m > [1mat [m > org.apache.camel.maven.packaging.SupportLevelHelper.defaultSupportLevel ( > [1mSupportLevelHelper.java:30 [m) > [1mat [m > org.apache.camel.maven.packaging.PackageOtherMojo.prepareOthers ( > [1mPackageOtherMojo.java:132 [m) > [1mat [m > org.apache.camel.maven.packaging.PrepareComponentMojo.execute ( > [1mPrepareComponentMojo.java:152 [m) > [1mat [m > org.apache.camel.maven.packaging.AbstractGeneratorMojo.execute ( > [1mAbstractGeneratorMojo.java:98 [m) > [1mat [m > org.apache.camel.maven.packaging.PrepareComponentMojo.execute ( > [1mPrepareComponentMojo.java:122 [m) > [1mat [m org.apache.camel.maven.packaging.AbstractGenerateMojo.invoke > ( [1mAbstractGenerateMojo.java:96 [m) > [1mat [m org.apache.camel.maven.packaging.AbstractGenerateMojo.invoke > ( [1mAbstractGenerateMojo.java:75 [m) > [1mat [m org.apache.camel.maven.packaging.GenerateMojo.doExecute ( > [1mGenerateMojo.java:54 [m) > [1mat [m > org.apache.camel.maven.packaging.AbstractGenerateMojo.execute ( > [1mAbstractGenerateMojo.java:64 [m) > [1mat [m > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo ( > [1mDefaultBuildPluginManager.java:137 [m) > > The error message does not help me to identify > what "other" class it found and fails to process. > > Any clues, please? > > Regards > Cc. > > -- > Mr. Petr Kužel, Software Engineer > Eurofins International Support Services s.à r.l. > Val Fleuri 23 > L-1526 LUXEMBOURG > > -- Claus Ibsen - @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
Re: maven generate questions
Hi When it says "other" then the plugin has not detected that its an endpoint component. There are a ton of existing components you can copy from. If you just add the component to camel-3.x branch or main branch etc then its should be easier. On Mon, May 22, 2023 at 6:19 PM Petr Kuzel wrote: > Hi Camel devs, > > While trying to develop a new Camel component > I’d need an advise, again, on the generate. > > #1 > The generate generates a code under src/generated/. > Should it be committed to Git and why, please? > I have seen it committed for other components > but I do not understand why. I have also observed > the generated code is not updated (e.g. after > retyping endpoint URI params) unless I manually delete > previously generated configurers (mvn clean is not enough). > > > #2 > I face: > > generate_[m _[1m(generate)_[m on project _[36mcamel-azure-files_[m: > _[1;31mError generating data > org.apache.maven.plugin.MojoExecutionException: > Error loading other model. Reason: java.lang.IllegalArgumentException: > FirstVersion is not specified. This can be done in @UriEndpoint or in > pom.xml file. > > my endpoint code reads: > > @UriEndpoint(firstVersion = "3.21.0", ... > public class FilesEndpoint > extends RemoteFileEndpoint { > > > Maven debug reports more details: > > [1mCaused by [m: java.lang.IllegalArgumentException: [1;31mFirstVersion > is not specified. This can be done in @UriEndpoint or in pom.xml file. [m > [1mat [m > org.apache.camel.maven.packaging.SupportLevelHelper.defaultSupportLevel ( > [1mSupportLevelHelper.java:30 [m) > [1mat [m > org.apache.camel.maven.packaging.PackageOtherMojo.prepareOthers ( > [1mPackageOtherMojo.java:132 [m) > [1mat [m > org.apache.camel.maven.packaging.PrepareComponentMojo.execute ( > [1mPrepareComponentMojo.java:152 [m) > [1mat [m > org.apache.camel.maven.packaging.AbstractGeneratorMojo.execute ( > [1mAbstractGeneratorMojo.java:98 [m) > [1mat [m > org.apache.camel.maven.packaging.PrepareComponentMojo.execute ( > [1mPrepareComponentMojo.java:122 [m) > [1mat [m org.apache.camel.maven.packaging.AbstractGenerateMojo.invoke > ( [1mAbstractGenerateMojo.java:96 [m) > [1mat [m org.apache.camel.maven.packaging.AbstractGenerateMojo.invoke > ( [1mAbstractGenerateMojo.java:75 [m) > [1mat [m org.apache.camel.maven.packaging.GenerateMojo.doExecute ( > [1mGenerateMojo.java:54 [m) > [1mat [m > org.apache.camel.maven.packaging.AbstractGenerateMojo.execute ( > [1mAbstractGenerateMojo.java:64 [m) > [1mat [m > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo ( > [1mDefaultBuildPluginManager.java:137 [m) > > The error message does not help me to identify > what "other" class it found and fails to process. > > Any clues, please? > > Regards > Cc. > > -- > Mr. Petr Kužel, Software Engineer > Eurofins International Support Services s.à r.l. > Val Fleuri 23 > L-1526 LUXEMBOURG > > -- Claus Ibsen - @davsclaus Camel in Action 2: https://www.manning.com/ibsen2