Revert "Create substitutions for jsch"
This reverts commit da0a462f17652b199ab8d3097783c4efdd5a290d.
diff --git a/extensions/ftp/deployment/src/main/java/org/apache/camel/quarkus/component/ftp/deployment/FtpProcessor.java b/extensions/ftp/deployment/src/main/java/org/apache/camel/quarkus/component/ftp/deployment/FtpProcessor.java
index cdda9b9..9190080 100644
--- a/extensions/ftp/deployment/src/main/java/org/apache/camel/quarkus/component/ftp/deployment/FtpProcessor.java
+++ b/extensions/ftp/deployment/src/main/java/org/apache/camel/quarkus/component/ftp/deployment/FtpProcessor.java
@@ -16,20 +16,16 @@
*/
package org.apache.camel.quarkus.component.ftp.deployment;
-import java.util.Arrays;
-import java.util.List;
+import org.apache.camel.component.file.remote.FtpConfiguration;
+import org.apache.camel.component.file.remote.FtpsConfiguration;
+import org.apache.camel.component.file.remote.RemoteFileConfiguration;
+import org.apache.camel.component.file.remote.SftpConfiguration;
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
-import org.apache.camel.component.file.remote.FtpConfiguration;
-import org.apache.camel.component.file.remote.FtpsConfiguration;
-import org.apache.camel.component.file.remote.RemoteFileConfiguration;
-import org.apache.camel.component.file.remote.SftpConfiguration;
-import org.apache.camel.quarkus.component.ftp.graal.AnyLocalAddress;
class FtpProcessor {
@@ -104,10 +100,4 @@
ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
return new ExtensionSslNativeSupportBuildItem(FEATURE);
}
-
- @BuildStep
- List<RuntimeInitializedClassBuildItem> runtimeInitializedClasses() {
- return Arrays.asList(
- new RuntimeInitializedClassBuildItem(AnyLocalAddress.class.getName()));
- }
}
diff --git a/extensions/ftp/runtime/pom.xml b/extensions/ftp/runtime/pom.xml
index 6708eb2..74211d6 100644
--- a/extensions/ftp/runtime/pom.xml
+++ b/extensions/ftp/runtime/pom.xml
@@ -54,10 +54,6 @@
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-core</artifactId>
</dependency>
- <dependency>
- <groupId>com.oracle.substratevm</groupId>
- <artifactId>svm</artifactId>
- </dependency>
</dependencies>
<build>
diff --git a/extensions/ftp/runtime/src/main/java/org/apache/camel/quarkus/component/ftp/graal/AnyLocalAddress.java b/extensions/ftp/runtime/src/main/java/org/apache/camel/quarkus/component/ftp/graal/AnyLocalAddress.java
deleted file mode 100644
index cc631c5..0000000
--- a/extensions/ftp/runtime/src/main/java/org/apache/camel/quarkus/component/ftp/graal/AnyLocalAddress.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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.ftp.graal;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-public class AnyLocalAddress {
- public static InetAddress address;
-
- static {
- try {
- address = InetAddress.getByName("0.0.0.0");
- } catch (UnknownHostException e) {
- }
- }
-}
diff --git a/extensions/ftp/runtime/src/main/java/org/apache/camel/quarkus/component/ftp/graal/AnyLocalAddressAccessor.java b/extensions/ftp/runtime/src/main/java/org/apache/camel/quarkus/component/ftp/graal/AnyLocalAddressAccessor.java
deleted file mode 100644
index dbf03c5..0000000
--- a/extensions/ftp/runtime/src/main/java/org/apache/camel/quarkus/component/ftp/graal/AnyLocalAddressAccessor.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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.ftp.graal;
-
-import java.net.InetAddress;
-
-final class AnyLocalAddressAccessor {
- static InetAddress get() {
- return AnyLocalAddress.address;
- }
-}
diff --git a/extensions/ftp/runtime/src/main/java/org/apache/camel/quarkus/component/ftp/graal/Flags.java b/extensions/ftp/runtime/src/main/java/org/apache/camel/quarkus/component/ftp/graal/Flags.java
deleted file mode 100644
index 94139a6..0000000
--- a/extensions/ftp/runtime/src/main/java/org/apache/camel/quarkus/component/ftp/graal/Flags.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.ftp.graal;
-
-import java.util.function.BooleanSupplier;
-
-public final class Flags {
- private Flags() {
- }
-
- public static final class JGitIsNotOnClasspath implements BooleanSupplier {
- @Override
- public boolean getAsBoolean() {
- try {
- Class.forName("io.quarkus.jgit.runtime.Target_com_jcraft_jsch_PortWatcher");
- return false;
- } catch (ClassNotFoundException e) {
- return true;
- }
- }
- }
-}
diff --git a/extensions/ftp/runtime/src/main/java/org/apache/camel/quarkus/component/ftp/graal/PortWatcherSubstitution.java b/extensions/ftp/runtime/src/main/java/org/apache/camel/quarkus/component/ftp/graal/PortWatcherSubstitution.java
deleted file mode 100644
index 1c436a2..0000000
--- a/extensions/ftp/runtime/src/main/java/org/apache/camel/quarkus/component/ftp/graal/PortWatcherSubstitution.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.ftp.graal;
-
-import java.net.InetAddress;
-
-import com.oracle.svm.core.annotate.Alias;
-import com.oracle.svm.core.annotate.InjectAccessors;
-import com.oracle.svm.core.annotate.TargetClass;
-
-/*
- * We need to exclude this substitution if JGit is present as substitutions will collide
- *
- * https://github.com/quarkusio/quarkus/blob/0be78a6813db0d3be7d8e43ac76ace2b808433ef/extensions/jgit/runtime/src/main/java/io/quarkus/jgit/runtime/PortWatcherSubstitutions.java#L14-L20
- */
-@TargetClass(className = "com.jcraft.jsch.PortWatcher", onlyWith = Flags.JGitIsNotOnClasspath.class)
-final class PortWatcherSubstitution {
- @Alias
- @InjectAccessors(AnyLocalAddressAccessor.class)
- private static InetAddress anyLocalAddress;
-}