-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #1017 Do not hardcode the TransformerFactory implementation irrev…
…ersibly
- Loading branch information
Showing
4 changed files
with
79 additions
and
37 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
...ain/java/org/apache/camel/quarkus/support/xalan/deployment/CamelXalanBuildTimeConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* 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.support.xalan.deployment; | ||
|
||
import java.util.Optional; | ||
|
||
import io.quarkus.runtime.annotations.ConfigItem; | ||
import io.quarkus.runtime.annotations.ConfigPhase; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
|
||
@ConfigRoot(name = "camel.xalan", phase = ConfigPhase.BUILD_TIME) | ||
public class CamelXalanBuildTimeConfig { | ||
|
||
/** | ||
* A fully qualified class name to set as the {@code javax.xml.transform.TransformerFactory} system property early | ||
* at the application startup. | ||
* <p> | ||
* The system property effectively overrides any service providers defined in | ||
* {@code META-INF/services/javax.xml.transform.TransformerFactory} files available in the class path. If the option | ||
* is not present in your {@code application.properties}, the default value is used and the service providers are | ||
* overridden anyway. To avoid overriding the service providers, set it to an empty value in | ||
* {@code application.properties}: | ||
* | ||
* <pre> | ||
* quarkus.camel.xalan.transformer-factory = | ||
* </pre> | ||
* <p> | ||
* Note that any custom transformer factory you pass will only work in native mode if all necessary classes are | ||
* registered for reflection and all necessary resources are included in the native image. This may already be the | ||
* case for {@code com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl} if you depend on | ||
* {@code io.quarkus:quarkus-jaxb} or {@code org.apache.xalan.xsltc.trax.TransformerFactoryImpl} if you depend on | ||
* {@code org.apache.camel.quarkus:camel-quarkus-support-xalan}. | ||
*/ | ||
@ConfigItem(defaultValue = "org.apache.camel.quarkus.support.xalan.XalanTransformerFactory") | ||
public Optional<String> transformerFactory; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 0 additions & 37 deletions
37
...ain/java/org/apache/camel/quarkus/support/xalan/graal/TransformerFactorySubstitution.java
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...xalan/runtime/src/main/resources/META-INF/services/javax.xml.transform.TransformerFactory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.apache.camel.quarkus.support.xalan.XalanTransformerFactory |