You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2021/05/27 10:35:38 UTC
[camel-k] 10/11: chore(doc): modeline examples
This is an automated email from the ASF dual-hosted git repository.
nferraro pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 0533bf1454f0557112a87c87edfbb347cad98c68
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Wed May 26 14:02:46 2021 +0200
chore(doc): modeline examples
---
.../modeline-build-property-file-route.groovy | 31 ++++++++++++++++++++++
.../modeline/modeline-build-property-route.groovy | 31 ++++++++++++++++++++++
.../modeline/modeline-property-file-route.groovy | 29 ++++++++++++++++++++
examples/modeline/modeline-property-route.groovy | 29 ++++++++++++++++++++
examples/modeline/quarkus.properties | 3 +++
5 files changed, 123 insertions(+)
diff --git a/examples/modeline/modeline-build-property-file-route.groovy b/examples/modeline/modeline-build-property-file-route.groovy
new file mode 100644
index 0000000..6892235
--- /dev/null
+++ b/examples/modeline/modeline-build-property-file-route.groovy
@@ -0,0 +1,31 @@
+// camel-k: language=groovy
+/*
+ * 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.
+ */
+
+//
+// Provide a build time configuration property file
+//
+// To run this integrations use:
+//
+// kamel run modeline-build-property-file-route.groovy --dev
+//
+
+// camel-k: build-property=file:quarkus.properties
+
+from('timer:build-property')
+ .routeId('build-property')
+ .log('The application name: {{quarkus.application.name}}')
diff --git a/examples/modeline/modeline-build-property-route.groovy b/examples/modeline/modeline-build-property-route.groovy
new file mode 100644
index 0000000..749ad76
--- /dev/null
+++ b/examples/modeline/modeline-build-property-route.groovy
@@ -0,0 +1,31 @@
+// camel-k: language=groovy
+/*
+ * 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.
+ */
+
+//
+// Provide a build time configuration property (the application name)
+//
+// To run this integrations use:
+//
+// kamel run modeline-build-property-route.groovy --dev
+//
+
+// camel-k: build-property=quarkus.application.name=my-super-application
+
+from('timer:build-property')
+ .routeId('build-property')
+ .log('The application name: {{quarkus.application.name}}')
diff --git a/examples/modeline/modeline-property-file-route.groovy b/examples/modeline/modeline-property-file-route.groovy
new file mode 100644
index 0000000..e831e21
--- /dev/null
+++ b/examples/modeline/modeline-property-file-route.groovy
@@ -0,0 +1,29 @@
+// camel-k: language=groovy
+/*
+ * 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.
+ */
+
+//
+// To run this integrations use:
+//
+// kamel run modeline-property-file-route.groovy --dev
+//
+
+// camel-k: property=file:my.properties
+
+from('timer:property')
+ .routeId('property')
+ .log('property content is: {{my.key.1}} {{my.key.2}}')
diff --git a/examples/modeline/modeline-property-route.groovy b/examples/modeline/modeline-property-route.groovy
new file mode 100644
index 0000000..472096f
--- /dev/null
+++ b/examples/modeline/modeline-property-route.groovy
@@ -0,0 +1,29 @@
+// camel-k: language=groovy
+/*
+ * 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.
+ */
+
+//
+// To run this integrations use:
+//
+// kamel run modeline-property-route.groovy --dev
+//
+
+// camel-k: property=my.message=test-property
+
+from('timer:property')
+ .routeId('property')
+ .log('property content is: {{my.message}}')
diff --git a/examples/modeline/quarkus.properties b/examples/modeline/quarkus.properties
new file mode 100644
index 0000000..882e2ab
--- /dev/null
+++ b/examples/modeline/quarkus.properties
@@ -0,0 +1,3 @@
+quarkus.application.name = my-super-application
+quarkus.banner.enabled = true
+#some.other.configuration = commented!
\ No newline at end of file