67.2. 编译
				csimple 语言被解析为常规 Java 源代码,并与所有其他源代码一起编译,也可以在通过 camel-csimple-joor 模块引导期间编译一次。
			
有两种编译方法
- 
						使用 camel-csimple-maven-plugin在构建时生成源代码。
- 
						使用 camel-csimple-joor,在 Camel 引导期间执行运行时内存编译。
67.2.1. 使用 camel-csimple-maven-plugin
					camel-csimple-maven-plugin Maven 插件用于从源代码发现所有 csimple 脚本,然后在 src/generated/java 文件夹中自动生成源代码,然后与所有其他源一起编译。
				
					maven 插件将对 .java 和 .xml 文件(Java 和 XML DSL)进行源代码扫描。扫描程序限制了检测某些代码模式,如果以不常/使用,则可能会发现一些简单脚本。
				
					使用 camel-csimple-joor 的运行时编译没有这个限制。
				
					好处是使用常规 Java 编译器编译的,因此在应用 JAR 文件中以 .class 文件的形式包括一切都作为 .class 文件,且在运行时不需要额外的依赖项。
				
					要使用 camel-csimple-maven-plugin,您需要将其添加到 pom.xml 文件中,如下所示:
				
					然后,您还必须添加 build-helper-maven-plugin Maven 插件,使其包含 src/generated 到 Java 编译器的源文件夹列表中,以确保生成的源代码已编译并包含在应用程序 JAR 文件中。
				
					请参阅 Camel Examples 的 camel-example-csimple 示例,它使用 maven 插件。
				
67.2.2. 使用 camel-csimple-joor
jOOR 库与 Java 编译器集成,并执行 Java 代码运行时编译。
					使用 camel-simple-joor 时支持的运行时适用于 Java 独立、Spring Boot、Camel Quarkus 和其他微服务运行时。OSGi、Camel Karaf 或任何种类的 Java Application Server 运行时不支持它。
				
JOOR 不支持使用 fat jar 打包(https://github.com/jOOQ/jOOR/issues/69)来编译 Spring Boot,它与展开的类路径一起工作。
					要使用 camel-simple-joor,只需将它作为依赖项添加到 classpath 中:
				
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-csimple-joor</artifactId> <version>3.14.5.redhat-00032</version> </dependency>
<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-csimple-joor</artifactId>
  <version>3.14.5.redhat-00032</version>
</dependency>
					不需要将 Maven 插件添加到 pom.xml 文件中。
				
					请参阅 camel-example-csimple-joor 示例(Camel Examples),它使用 jOOR 编译器。