You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/06/15 19:44:56 UTC
[camel] branch main updated: Remove camel-uberjar-main as its no longer needed.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new cbfc5655dcb Remove camel-uberjar-main as its no longer needed.
cbfc5655dcb is described below
commit cbfc5655dcb7c8b0fde146910d07540fff257844
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Jun 15 21:44:14 2022 +0200
Remove camel-uberjar-main as its no longer needed.
---
bom/camel-bom/pom.xml | 5 -
.../org/apache/camel/catalog/others.properties | 1 -
.../apache/camel/catalog/others/uberjar-main.json | 15 ---
docs/components/modules/others/nav.adoc | 1 -
dsl/camel-uberjar-main/pom.xml | 83 ------------
.../services/org/apache/camel/other.properties | 7 -
.../src/generated/resources/uberjar-main.json | 15 ---
.../src/main/docs/uberjar-main.adoc | 13 --
.../org/apache/camel/main/uberjar/RuntimeUtil.java | 64 ---------
.../org/apache/camel/main/uberjar/UberJarMain.java | 146 ---------------------
dsl/pom.xml | 1 -
parent/pom.xml | 5 -
12 files changed, 356 deletions(-)
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index 33f51b48f56..1935e31f6bf 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -2048,11 +2048,6 @@
<artifactId>camel-twitter</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-uberjar-main</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-undertow</artifactId>
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
index f6df51c849f..6f96ca78b03 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
@@ -56,7 +56,6 @@ test-spring
test-spring-junit5
threadpoolfactory-vertx
tracing
-uberjar-main
undertow-spring-security
xml-io-dsl
xml-jaxb-dsl
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/uberjar-main.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/uberjar-main.json
deleted file mode 100644
index ecf54c05101..00000000000
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/uberjar-main.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "other": {
- "kind": "other",
- "name": "uberjar-main",
- "title": "Uberjar Main",
- "description": "Main to run Camel as Uber-Jar standalone",
- "deprecated": false,
- "firstVersion": "3.17.0",
- "label": "jbang",
- "supportLevel": "Experimental",
- "groupId": "org.apache.camel",
- "artifactId": "camel-uberjar-main",
- "version": "3.18.0-SNAPSHOT"
- }
-}
diff --git a/docs/components/modules/others/nav.adoc b/docs/components/modules/others/nav.adoc
index e17893afe54..a08b9c66c90 100644
--- a/docs/components/modules/others/nav.adoc
+++ b/docs/components/modules/others/nav.adoc
@@ -21,7 +21,6 @@
*** xref:java-xml-jaxb-dsl.adoc[Jaxb XML Dsl]
*** xref:kamelet-main.adoc[Kamelet Main]
*** xref:kotlin-dsl.adoc[Kotlin DSL]
-*** xref:uberjar-main.adoc[Uberjar Main]
*** xref:java-xml-io-dsl.adoc[XML Io Dsl]
*** xref:yaml-dsl.adoc[YAML DSL]
** xref:elytron.adoc[Elytron]
diff --git a/dsl/camel-uberjar-main/pom.xml b/dsl/camel-uberjar-main/pom.xml
deleted file mode 100644
index e1d95288c2c..00000000000
--- a/dsl/camel-uberjar-main/pom.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel</groupId>
- <artifactId>dsl</artifactId>
- <version>3.18.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-uberjar-main</artifactId>
- <packaging>jar</packaging>
-
- <name>Camel :: Uber-JAR Main</name>
- <description>Main to run Camel as Uber-Jar standalone</description>
-
- <properties>
- <firstVersion>3.17.0</firstVersion>
- <supportLevel>Experimental</supportLevel>
- <label>jbang</label>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-kamelet-main</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <mainClass>org.apache.camel.main.uberjar.UberJarMain</mainClass>
- </manifest>
- </archive>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-package-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>generate</id>
- <goals>
- <goal>generate-others-list</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/dsl/camel-uberjar-main/src/generated/resources/META-INF/services/org/apache/camel/other.properties b/dsl/camel-uberjar-main/src/generated/resources/META-INF/services/org/apache/camel/other.properties
deleted file mode 100644
index a806f7d16ff..00000000000
--- a/dsl/camel-uberjar-main/src/generated/resources/META-INF/services/org/apache/camel/other.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-name=uberjar-main
-groupId=org.apache.camel
-artifactId=camel-uberjar-main
-version=3.18.0-SNAPSHOT
-projectName=Camel :: Uber-JAR Main
-projectDescription=Main to run Camel as Uber-Jar standalone
diff --git a/dsl/camel-uberjar-main/src/generated/resources/uberjar-main.json b/dsl/camel-uberjar-main/src/generated/resources/uberjar-main.json
deleted file mode 100644
index ecf54c05101..00000000000
--- a/dsl/camel-uberjar-main/src/generated/resources/uberjar-main.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "other": {
- "kind": "other",
- "name": "uberjar-main",
- "title": "Uberjar Main",
- "description": "Main to run Camel as Uber-Jar standalone",
- "deprecated": false,
- "firstVersion": "3.17.0",
- "label": "jbang",
- "supportLevel": "Experimental",
- "groupId": "org.apache.camel",
- "artifactId": "camel-uberjar-main",
- "version": "3.18.0-SNAPSHOT"
- }
-}
diff --git a/dsl/camel-uberjar-main/src/main/docs/uberjar-main.adoc b/dsl/camel-uberjar-main/src/main/docs/uberjar-main.adoc
deleted file mode 100644
index e34e6828935..00000000000
--- a/dsl/camel-uberjar-main/src/main/docs/uberjar-main.adoc
+++ /dev/null
@@ -1,13 +0,0 @@
-= Uberjar Main Component
-:doctitle: Uberjar Main
-:shortname: uberjar-main
-:artifactid: camel-uberjar-main
-:description: Main to run Camel as Uber-Jar standalone
-:since: 3.17
-:supportlevel: Experimental
-//Manually maintained attributes
-:group: DSL
-
-*Since Camel {since}*
-
-Main to run Camel as Uber-Jar standalone
diff --git a/dsl/camel-uberjar-main/src/main/java/org/apache/camel/main/uberjar/RuntimeUtil.java b/dsl/camel-uberjar-main/src/main/java/org/apache/camel/main/uberjar/RuntimeUtil.java
deleted file mode 100644
index 15ce60ea2a8..00000000000
--- a/dsl/camel-uberjar-main/src/main/java/org/apache/camel/main/uberjar/RuntimeUtil.java
+++ /dev/null
@@ -1,64 +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.main.uberjar;
-
-import org.apache.logging.log4j.Level;
-import org.apache.logging.log4j.core.config.Configurator;
-import org.slf4j.LoggerFactory;
-
-public final class RuntimeUtil {
-
- static {
- Configurator.initialize("CamelFatJar", "log4j2.properties");
- }
-
- private RuntimeUtil() {
- }
-
- public static void configureLog(String level) {
- level = level.toLowerCase();
-
- switch (level) {
- case "off":
- Configurator.setRootLevel(Level.OFF);
- break;
- case "trace":
- Configurator.setRootLevel(Level.TRACE);
- break;
- case "debug":
- Configurator.setRootLevel(Level.DEBUG);
- break;
- case "info":
- Configurator.setRootLevel(Level.INFO);
- break;
- case "warn":
- Configurator.setRootLevel(Level.WARN);
- break;
- case "error":
- Configurator.setRootLevel(Level.ERROR);
- break;
- case "fatal":
- Configurator.setRootLevel(Level.FATAL);
- break;
- default: {
- Configurator.setRootLevel(Level.INFO);
- LoggerFactory.getLogger(RuntimeUtil.class).warn("Invalid logging level: {}", level);
- }
- }
- }
-
-}
diff --git a/dsl/camel-uberjar-main/src/main/java/org/apache/camel/main/uberjar/UberJarMain.java b/dsl/camel-uberjar-main/src/main/java/org/apache/camel/main/uberjar/UberJarMain.java
deleted file mode 100644
index 2b14e46b1e7..00000000000
--- a/dsl/camel-uberjar-main/src/main/java/org/apache/camel/main/uberjar/UberJarMain.java
+++ /dev/null
@@ -1,146 +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.main.uberjar;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.nio.file.FileSystems;
-import java.util.LinkedList;
-
-import org.apache.camel.main.KameletMain;
-import org.apache.camel.util.OrderedProperties;
-import org.apache.camel.util.StringHelper;
-
-/**
- * Main class to run Camel as an uber-jar packaged by camel-jbang
- */
-public class UberJarMain extends KameletMain {
-
- public static final String RUN_SETTINGS_FILE = "camel-jbang-run.properties";
-
- private UberJarMain main;
-
- public static void main(String[] args) throws Exception {
- UberJarMain main = new UberJarMain();
- main.main = main;
- int code = main.run(args);
- if (code != 0) {
- System.exit(code);
- }
- // normal exit
- }
-
- @Override
- public void showOptionsHeader() {
- System.out.println("Apache Camel (UberJar) takes the following options");
- System.out.println();
- }
-
- @Override
- protected void addInitialOptions() {
- addOption(new Option("h", "help", "Displays the help screen") {
- protected void doProcess(String arg, LinkedList<String> remainingArgs) {
- showOptions();
- completed();
- }
- });
- addOption(new ParameterOption("prop", "property", "Additional properties (override existing)", "property") {
- @Override
- protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
- if (arg.equals("-prop") || arg.equals("-property")) {
- String k = StringHelper.before(parameter, "=");
- String v = StringHelper.after(parameter, "=");
- if (k != null && v != null) {
- main.addArgumentProperty(k, v);
- }
- }
- }
- });
- addOption(new ParameterOption(
- "properties", "properties",
- "Load properties file for route placeholders (ex. /path/to/file.properties",
- "properties") {
- protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
- if (arg.equals("-properties") && parameter != null) {
- String[] filesLocation = parameter.split(",");
- StringBuilder locations = new StringBuilder();
- for (String file : filesLocation) {
- if (!file.startsWith("file:")) {
- if (!file.startsWith("/")) {
- file = FileSystems.getDefault().getPath("").toAbsolutePath() + File.separator + file;
- }
- file = "file://" + file;
- }
- locations.append(file).append(",");
- }
- // there may be existing properties
- String loc = main.getInitialProperties().getProperty("camel.component.properties.location");
- if (loc != null) {
- loc = loc + "," + locations;
- } else {
- loc = locations.toString();
- }
- main.addInitialProperty("camel.component.properties.location", loc);
- }
- }
- });
- }
-
- @Override
- protected ClassLoader createApplicationContextClassLoader() {
- // use the classloader that loaded this class
- return this.getClass().getClassLoader();
- }
-
- @Override
- protected void doBuild() throws Exception {
- setAppName("Apache Camel (UberJar)");
- setDownload(false); // no need for download as all is included in uber-jar
-
- // load configuration file
- OrderedProperties prop = new OrderedProperties();
- File f = new File(RUN_SETTINGS_FILE);
- if (f.exists()) {
- prop.load(new FileInputStream(f));
- } else {
- InputStream is = UberJarMain.class.getClassLoader().getResourceAsStream("/" + RUN_SETTINGS_FILE);
- if (is != null) {
- prop.load(is);
- }
- }
-
- // setup embedded log4j logging
- String loggingLevel = prop.getProperty("loggingLevel", "info");
- RuntimeUtil.configureLog(loggingLevel);
-
- // setup configurations
- for (String key : prop.stringPropertyNames()) {
- if ("camel.main.routesReloadEnabled".equals(key)) {
- // skip reload as this is not possible in uber-jar mode
- continue;
- }
- if (key.startsWith("camel.")) {
- String value = prop.getProperty(key);
- addInitialProperty(key, value);
- }
- }
-
- super.doBuild();
- }
-
-}
diff --git a/dsl/pom.xml b/dsl/pom.xml
index 006dc918287..3c003adb5c0 100644
--- a/dsl/pom.xml
+++ b/dsl/pom.xml
@@ -49,7 +49,6 @@
<module>camel-jsh-dsl</module>
<module>camel-kotlin-dsl</module>
<module>camel-kamelet-main</module>
- <module>camel-uberjar-main</module>
<module>camel-jbang</module>
</modules>
diff --git a/parent/pom.xml b/parent/pom.xml
index 3a66994be74..c0aa77cbd7f 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -2802,11 +2802,6 @@
<artifactId>camel-groovy-dsl-common</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-uberjar-main</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-kamelet-main</artifactId>