You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Petr Kuzel (Jira)" <ji...@apache.org> on 2023/05/24 07:38:00 UTC
[jira] [Closed] (CAMEL-19379) EndpointSchemaGeneratorMojo: Improve "Could not find component java type" error message
[ https://issues.apache.org/jira/browse/CAMEL-19379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Petr Kuzel closed CAMEL-19379.
------------------------------
thank you, verified in 3.21.x:
{color:#000000}[{color}{color:#c50f1f}[1;31m{color}{color:#c50f1f}ERROR{color}{color:#000000}[m{color}{color:#000000}] Failed to execute goal {color}{color:#13a10e}[32m{color}{color:#13a10e}org.apache.camel:camel-package-maven-plugin:3.21.0-SNAPSHOT:generate{color}{color:#000000}[m{color}{color:#000000} {color}{color:#000000}[1m{color}{color:#000000}(generate){color}{color:#000000}[m{color}{color:#000000} on project {color}{color:#3a96dd}[36m{color}{color:#3a96dd}camel-azure-files{color}{color:#000000}[m{color}{color:#000000}: {color}{color:#c50f1f}[1;31m{color}{color:#c50f1f}Error generating data org.apache.maven.plugin.MojoFailureException: Unable to create mojo{color}{color:#000000}[m{color}{color:#000000}: Could not find @Component("azure-files") annotated class.{color}
> EndpointSchemaGeneratorMojo: Improve "Could not find component java type" error message
> ---------------------------------------------------------------------------------------
>
> Key: CAMEL-19379
> URL: https://issues.apache.org/jira/browse/CAMEL-19379
> Project: Camel
> Issue Type: Improvement
> Components: build system, camel-core
> Affects Versions: 3.20.4
> Environment: Windows
> Reporter: Petr Kuzel
> Priority: Minor
> Fix For: 3.21.0, 4.0-RC1, 4.0
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> As a newcomer, trying to develop a Camel component, my maven build failed with:
>
> {{Error generating data org.apache.maven.plugin.MojoFailureException: Unable to create mojo [m: Could not find component java type}}
>
> I had to ask dev mailing list because the error message puzzled me.
>
> Proposing to improve error message to something alike:
>
> {{throw new IllegalStateException("Could not find @Component(\"" + scheme + "\") annotated class.");}}
>
> Maven stack trace in debug mode reveals the method:
>
> {{{}...{}}}{{{}[1mCaused by[m: org.apache.maven.plugin.MojoFailureException: [1;31mError generating data org.apache.maven.plugin.MojoFailureException: Unable to create mojo[m{}}}{{{}...{}}}{{{}[1mCaused by[m: org.apache.maven.plugin.MojoFailureException: [1;31mUnable to create mojo[m{}}}{{{}...{}}}{{{}[1mCaused by[m: java.lang.IllegalStateException: [1;31mCould not find component java type[m{}}}{{ [1mat[m org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo.{*}findComponentProperties{*} ([1mEndpointSchemaGeneratorMojo.java:872[m)}}{{ [1mat[m org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo.writeJSonSchemeAndPropertyConfigurer ([1mEndpointSchemaGeneratorMojo.java:257[m)}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)