Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-19379

EndpointSchemaGeneratorMojo: Improve "Could not find component java type" error message

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.20.4
    • 3.21.0, 4.0-RC1, 4.0.0
    • build system, camel-core
    • None
    • Windows

    • Novice

    Description

      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)

      Attachments

        Activity

          People

            Unassigned Unassigned
            pkuzel Petr Kuzel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified