This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 2f4df3cabebc89b31f66d164e4f77692c73a5fc1 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Wed Jun 19 06:50:16 2019 +0200 CAMEL-13663: camel-main-maven-plugin to generte spring-boot tooling metadata to fool Java editors to have code completions for Camel Main application.properties files. --- examples/camel-example-main-artemis/pom.xml | 9 +++++++++ .../META-INF/spring-configuration-metadata.json | 22 ++++++++++++++++++++++ .../src/main/resources/application.properties | 3 ++- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/examples/camel-example-main-artemis/pom.xml b/examples/camel-example-main-artemis/pom.xml index b0132bb..0ef866f 100644 --- a/examples/camel-example-main-artemis/pom.xml +++ b/examples/camel-example-main-artemis/pom.xml @@ -39,6 +39,14 @@ <dependencies> + <!-- Spring Boot --> + <!-- <dependency> --> + <!-- <groupId>org.springframework.boot</groupId> --> + <!-- <artifactId>spring-boot-starter</artifactId> --> + <!-- <scope>provided</scope> --> + <!-- <optional>true</optional> --> + <!-- </dependency> --> + <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> @@ -93,6 +101,7 @@ <artifactId>camel-maven-plugin</artifactId> <version>${project.version}</version> <configuration> + <logClasspath>true</logClasspath> <mainClass>org.apache.camel.example.MyApplication</mainClass> </configuration> </plugin> diff --git a/examples/camel-example-main-artemis/src/main/resources/META-INF/spring-configuration-metadata.json b/examples/camel-example-main-artemis/src/main/resources/META-INF/spring-configuration-metadata.json new file mode 100644 index 0000000..8381531 --- /dev/null +++ b/examples/camel-example-main-artemis/src/main/resources/META-INF/spring-configuration-metadata.json @@ -0,0 +1,22 @@ +{ + "properties": [ + { + "name": "camel.main.name", + "type": "java.lang.String", + "description": "Sets the main name of the CamelContext.", + "sourceType": "org.apache.camel.spring.boot.CamelConfigurationProperties" + }, + { + "name": "camel.main.jmx-enabled", + "type": "java.lang.Boolean", + "description": "Whether to JMX is enabled or not", + "sourceType": "org.apache.camel.spring.boot.CamelConfigurationProperties" + }, + { + "name": "camel.main.foo", + "type": "java.lang.Boolean", + "description": "Whether foo is there", + "sourceType": "org.apache.camel.spring.boot.CamelConfigurationProperties" + } + ] +} \ No newline at end of file diff --git a/examples/camel-example-main-artemis/src/main/resources/application.properties b/examples/camel-example-main-artemis/src/main/resources/application.properties index dd773ef..ee0d1b2 100644 --- a/examples/camel-example-main-artemis/src/main/resources/application.properties +++ b/examples/camel-example-main-artemis/src/main/resources/application.properties @@ -20,6 +20,7 @@ camel.main.name = MyCamelJmsClient camel.main.jmx-enabled = false + # you can configure whether OS environment should override (=2 which is default) or as fallback (=1) ### camel.component.properties.environment-variable-mode=1 @@ -30,7 +31,7 @@ camel.main.jmx-enabled = false camel.component.jms.connection-factory.brokerURL=tcp://localhost:61616 # in case you want to use Spring's CachingConnectionFactory, you can configure it as follows: -# (then you don't need the camel-main-mavenn-plugin, as you can explicit configure it all here) +# (then you don't need the camel-main-maven-plugin, as you can explicit configure it all here) ### camel.component.jms.connectionFactory=#class:org.springframework.jms.connection.CachingConnectionFactory ### camel.component.jms.connection-factory.session-cache-size=5 ### camel.component.jms.connection-factory.target-connection-factory=#class:org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory