Claus Ibsen created CAMEL-26892:
-----------------------------------

             Summary: Remove Roaster from the build tooling and 
camel-route-parser: stages 3 and 4
                 Key: CAMEL-26892
                 URL: https://issues.apache.org/jira/browse/CAMEL-26892
             Project: Camel
          Issue Type: Task
          Components: camel-catalog, tooling, camel-package-maven-plugin
            Reporter: Claus Ibsen
             Fix For: 4.25.0


Stages 3 and 4 of removing Roaster (with the shaded Eclipse JDT, a 12 MB jar) 
from the build tooling and camel-route-parser. Stages 1 and 2 were done in 
CAMEL-26694 for 4.24.0 (#29342): camel-report-maven-plugin no longer declares 
Roaster, and PrepareCamelJBangMojo reads @Metadata from the compiled classes.

h3. Where Roaster is still used
||Module||Files||What it is used for||
|camel-package-maven-plugin|7|*javadoc* for the option descriptions 
(EndpointSchemaGeneratorMojo, SchemaGeneratorMojo, PackageDataFormatMojo, 
UpdateReadmeMojo, PrepareCamelMainMojo, JavadocUtil); *annotation values* of 
test sources in DstWorldsHelper|
|camel-route-parser|8|the old Java DSL route parser (RouteBuilderParser, 
RestDslParser, CamelJavaParserHelper and the other helpers)|
|camel-api-component-maven-plugin|1|JavaSourceParser: the javadoc of API 
classes|

h3. Stage 3: deprecate the Java route parser of camel-route-parser
{{LwJavaParser}} (design/java-dsl-parser.adoc) replaced it inside Camel; 
nothing in the repository uses RouteBuilderParser, RestDslParser and their 
helpers except their own tests. camel-route-parser is a public artifact (in the 
BOM) and may have users outside Camel, so: deprecate the Java parsers in 4.25 
with an entry in the upgrade guide (pointing at {{LwJavaParser}}), keep 
{{XmlRouteParser}} and the model, and remove the Java parsers in a later 
release. Then camel-route-parser no longer needs Roaster.

h3. Stage 4: read the javadoc with the JDK's own parser
Replace the javadoc readers in camel-package-maven-plugin, DstWorldsHelper (the 
{{@DstWorld}} annotations of test sources, which are not compiled when the 
component JSON is generated) and JavaSourceParser of 
camel-api-component-maven-plugin with the javac tree API of the JDK 
({{javax.tools}} and {{com.sun.source}} Trees / DocTrees, in the 
{{jdk.compiler}} module of every JDK): no third-party dependency, and always 
the Java version that builds Camel. JavaParser is an alternative if that API is 
awkward, at the cost of another dependency. One mojo at a time: the check of 
each PR is that regenerating the whole catalog (components, EIPs, data formats, 
Main options) gives no diff. Then remove {{roaster-version}} from 
parent/pom.xml.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to