carlosthe19916 commented on a change in pull request #835: Camel-freemarker component URL: https://github.com/apache/camel-quarkus/pull/835#discussion_r387662659
########## File path: extensions/freemarker/deployment/src/main/java/org/apache/camel/quarkus/component/freemarker/deployment/FreemarkerNativeImageProcessor.java ########## @@ -0,0 +1,136 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.component.freemarker.deployment; + +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.file.FileSystem; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import io.quarkus.deployment.annotations.BuildProducer; +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem; +import org.apache.camel.quarkus.component.freemarker.CamelFreemarkerConfig; +import org.apache.commons.io.FilenameUtils; +import org.jboss.logging.Logger; + +class FreemarkerNativeImageProcessor { + private static final String CLASSPATH_APPLICATION_MIGRATIONS_PROTOCOL = "classpath"; + private static final String JAR_APPLICATION_MIGRATIONS_PROTOCOL = "jar"; + private static final String FILE_APPLICATION_MIGRATIONS_PROTOCOL = "file"; + + private static final Logger LOGGER = Logger.getLogger(FreemarkerNativeImageProcessor.class); + + @BuildStep(loadsApplicationClasses = true) + void build( + BuildProducer<NativeImageResourceBuildItem> resourceProducer, + CamelFreemarkerConfig camelFreemarkerConfig) throws IOException, URISyntaxException { + registerNativeImageResources(resourceProducer, camelFreemarkerConfig); Review comment: Thanks for the good advice, I'll do it inline just like you suggested :) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services