This is an automated email from the ASF dual-hosted git repository.
bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git
The following commit(s) were added to refs/heads/master by this push:
new 9e70e78 Experimenting with a jbang catalog
9e70e78 is described below
commit 9e70e78a82caae4d784c1cccd2697dcace96b0f4
Author: Bertrand Delacretaz <[email protected]>
AuthorDate: Tue Dec 7 09:38:28 2021 +0100
Experimenting with a jbang catalog
---
jbang-catalog.json | 13 +++++++++++++
start.java | 40 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+)
diff --git a/jbang-catalog.json b/jbang-catalog.json
new file mode 100644
index 0000000..77c74e8
--- /dev/null
+++ b/jbang-catalog.json
@@ -0,0 +1,13 @@
+{
+ "catalogs": {},
+ "aliases": {
+ "start": {
+ "script-ref": "start.java",
+ "description": "Start Apache Sling"
+ },
+ "repoinitValidator": {
+ "script-ref": "jbang/RepoinitValidator.java",
+ "description": "Validate a Repoinit script"
+ }
+ }
+}
diff --git a/start.java b/start.java
new file mode 100644
index 0000000..2d37531
--- /dev/null
+++ b/start.java
@@ -0,0 +1,40 @@
+//usr/bin/env jbang "$0" "$@" ; exit $?
+// //DEPS <dependency1> <dependency2>
+
+/*
+ * 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.
+ */
+
+import java.util.Arrays;
+
+/* Minimal example that can be started from jbang using
+ * jbang start@apache/sling-whiteboard
+ */
+public class start {
+
+ public static void main(String... args) {
+ System.out.print("This is just a stub for now but could start Apache
Sling");
+ if(args.length > 0) {
+ System.out.print(
+ String.format(
+ " with the following arguments: %s",
+ Arrays.asList(args)
+ )
+ );
+ }
+ System.out.println();
+ }
+}