You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by pa...@apache.org on 2021/12/01 16:21:23 UTC
[sling-org-apache-sling-feature-launcher] 01/01: Revert "Revert "SLING-10956: provide an assembly for the launcher and make the dependencies explicit.""
This is an automated email from the ASF dual-hosted git repository.
pauls pushed a commit to branch issues/SLING-10956
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-launcher.git
commit ba442421e3e75df52a05cf912706d31dabbac14f
Author: Karl Pauls <pa...@apache.org>
AuthorDate: Wed Dec 1 17:20:56 2021 +0100
Revert "Revert "SLING-10956: provide an assembly for the launcher and make the dependencies explicit.""
This reverts commit 0e457f03727c38e324f93a4f3363b1229892d7a4.
---
pom.xml | 175 ++++++++-------
src/main/assembly/README.md | 99 ++++++++
src/main/assembly/bin.xml | 69 ++++++
src/main/docker/Dockerfile | 5 +-
src/main/java/javax/json/spi/JsonProvider.java | 298 -------------------------
src/main/legal/LICENSE-with-deps | 233 +++++++++++++++++++
src/main/legal/NOTICE-with-deps | 5 +
src/main/legal/license-header | 14 ++
8 files changed, 514 insertions(+), 384 deletions(-)
diff --git a/pom.xml b/pom.xml
index 136136d..4d3ba1d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,6 +31,8 @@
<properties>
<sling.java.version>8</sling.java.version>
<bnd.version>5.3.0</bnd.version>
+ <license-maven-plugin.version>1.16</license-maven-plugin.version>
+ <appassembler-maven-plugin.version>2.0.0</appassembler-maven-plugin.version>
<project.build.outputTimestamp>1</project.build.outputTimestamp>
</properties>
@@ -44,52 +46,6 @@
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>unpack</id>
- <phase>compile</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-text</artifactId>
- <version>1.9</version>
- <type>jar</type>
- <overWrite>false</overWrite>
- <outputDirectory>${project.build.directory}/classes</outputDirectory>
- <includes>
- org/apache/commons/text/Builder*,
- org/apache/commons/text/StringSubstitutor*,
- org/apache/commons/text/StringTokenizer*,
- org/apache/commons/text/TextStringBuilder*,
- org/apache/commons/text/lookup/StringLookup*,
- org/apache/commons/text/matcher/*
- </includes>
- </artifactItem>
- <artifactItem>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- <version>3.12.0</version>
- <type>jar</type>
- <overWrite>false</overWrite>
- <outputDirectory>${project.build.directory}/classes</outputDirectory>
- <includes>
- org/apache/commons/lang3/ArrayUtils*,
- org/apache/commons/lang3/StringUtils*,
- org/apache/commons/lang3/Validate*
- </includes>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<version>5.3.0</version>
@@ -99,25 +55,11 @@
Main-Class: org.apache.sling.feature.launcher.impl.Main
-exportcontents:\
org.apache.sling.feature.launcher.spi.*
- -conditionalpackage:\
- javax.json*,\
- org.apache.commons.cli.*,\
- org.apache.felix.cm.json.*,\
- org.apache.felix.converter.*,\
- org.apache.sling.feature.*,\
- org.osgi.util.function.*,\
- org.osgi.util.converter.*,\
- org.slf4j.*,\
- org.slf4j.impl.*
+ Private-Package:\
+ org.apache.sling.feature.launcher.impl.*
Import-Package:\
- !org.osgi.framework.*,\
- !org.osgi.util.tracker.*,\
- !org.osgi.resource.*,\
+ org.apache.commons.cli;resolution:=optional,\
*
- Private-Package:\
- org.apache.sling.feature.launcher.impl.*,\
- org.apache.johnzon.core.*,\
- org.apache.johnzon.core.util.*
]]>
</bnd>
</configuration>
@@ -161,9 +103,6 @@
</goals>
</execution>
</executions>
- <configuration>
- <classpathDependencyScopeExclude>compile+runtime</classpathDependencyScopeExclude>
- </configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
@@ -178,6 +117,88 @@
</filesets>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>license-maven-plugin</artifactId>
+ <version>${license-maven-plugin.version}</version>
+ <executions>
+ <execution>
+ <id>add-third-party</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>add-third-party</goal>
+ </goals>
+ <configuration>
+ <fileTemplate>${basedir}/src/main/legal/LICENSE-with-deps</fileTemplate>
+ <thirdPartyFilename>LICENSE-with-deps</thirdPartyFilename>
+ <sortArtifactByName>true</sortArtifactByName>
+ <excludedScopes>test</excludedScopes>
+ <licenseMerges>
+ <licenseMerge>The Apache Software License, Version 2.0|Apache License, Version 2.0|Apache Public License 2.0</licenseMerge>
+ </licenseMerges>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>appassembler-maven-plugin</artifactId>
+ <version>${appassembler-maven-plugin.version}</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>assemble</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <repositoryLayout>flat</repositoryLayout>
+ <repositoryName>lib</repositoryName>
+ <useWildcardClassPath>true</useWildcardClassPath>
+ <extraJvmArguments>-Dproject.artifactId=${project.artifactId} -Dproject.version=${project.version} -Dbuild.timestamp=${maven.build.timestamp} -Dfile.encoding=UTF-8</extraJvmArguments>
+ <licenseHeaderFile>${basedir}/src/main/legal/license-header</licenseHeaderFile>
+ <programs>
+ <program>
+ <mainClass>org.apache.sling.feature.launcher.impl.Main</mainClass>
+ <id>launcher</id>
+ </program>
+ </programs>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <finalName>${project.build.finalName}</finalName>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>${basedir}/src/main/assembly/bin.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>src/main/legal/NOTICE-with-deps</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
</plugins>
</build>
@@ -218,15 +239,9 @@
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.annotation.versioning</artifactId>
- <version>1.1.1</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
<artifactId>org.osgi.util.function</artifactId>
<version>1.0.0</version>
- <scope>test</scope>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
@@ -247,15 +262,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-json_1.1_spec</artifactId>
- <version>1.2</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.johnzon</groupId>
- <artifactId>johnzon-core</artifactId>
- <version>1.2.14</version>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.commons.johnzon</artifactId>
+ <version>1.2.13-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
@@ -304,7 +313,7 @@
</tags>
<dockerFileDir>.</dockerFileDir>
<assembly>
- <descriptorRef>artifact</descriptorRef>
+ <descriptor>${project.basedir}/src/main/assembly/bin.xml</descriptor>
</assembly>
</build>
</image>
diff --git a/src/main/assembly/README.md b/src/main/assembly/README.md
new file mode 100644
index 0000000..ba4195e
--- /dev/null
+++ b/src/main/assembly/README.md
@@ -0,0 +1,99 @@
+```
+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.name} - ${project.inceptionYear}
+
+## What is it?
+
+ ${project.description}
+
+## Licensing
+
+ Please see the files called LICENSE and NOTICE
+
+## Documentation
+
+ The most up-to-date documentation can be found at ${project.url}.
+
+## Useful URLs
+
+ Home Page: ${project.url}/
+ Source Code: ${project.scm.url}
+ Issue Tracking: ${project.issueManagement.url}
+
+## System Requirements
+
+### JDK
+
+ ${sling.java.version} or above. (see http://www.oracle.com/technetwork/java/)
+
+### Memory
+
+ No minimum requirement.
+
+### Disk
+
+ No minimum requirement.
+
+### Operating System
+
+ No minimum requirement. On Windows, Windows NT and above or Cygwin is required for
+ the startup scripts. Tested on Windows XP, Fedora Core and Mac OS X.
+
+---
+
+## Installation
+
+### Windows 2000/XP
+
+ 1) Unzip the distribution archive, i.e. `${project.build.finalName}.zip` to the directory you wish to install `${project.name} ${project.version}`.
+These instructions assume you chose `C:\Program Files`.
+The subdirectory `${project.build.finalName}` will be created from the archive.
+
+ 2) Add the `SFA_HOME` environment variable by opening up the system properties (WinKey + Pause), selecting the "Advanced" tab, and the "Environment Variables" button, then adding the `SFA_HOME` variable in the user variables with the value `C:\Program Files\${project.build.finalName}`.
+
+ 3) In the same dialog, add the SFA environment variable in the user variables with the value `%SFA_HOME%\bin`.
+
+ 4) In the same dialog, update/create the _Path_ environment variable in the user variables and prepend the value `%SFA%` to add `${project.name}` available in the command line.
+
+ 5) In the same dialog, make sure that `JAVA_HOME` exists in your user variables or in the system variables and it is set to the location of your JDK, e.g. `C:\Program Files\Java\1.8.0_152` and that `%JAVA_HOME%\bin` is in your _Path_ environment variable.
+
+ 6) Open a new command prompt (Winkey + R then type cmd) and run `sfa --version` to verify that it is correctly installed.
+
+## Unix-based Operating Systems (Linux, Solaris and Mac OS X)
+
+ 1) Extract the distribution archive, i.e. `${project.build.finalName}.tar.gz` to the directory you wish to install `${project.name} ${project.version}`.
+These instructions assume you chose `/usr/local`.
+The subdirectory `${project.build.finalName}` will be created from the archive.
+
+ 2) In a command terminal, add the `SFA_HOME` environment variable, e.g.
+ `export SFA_HOME=/usr/local/${project.build.finalName}`.
+
+ 3) Add the `SFA` environment variable, e.g. `export SFA=$SFA_HOME/bin`.
+
+ 4) Add `SFA` environment variable to your path, e.g. `export PATH=$SFA:$PATH`.
+
+ 5) Make sure that `JAVA_HOME` is set to the location of your JDK, e.g. `export JAVA_HOME=/usr/java/1.8.0_152` and that `$JAVA_HOME/bin` is in your `PATH` environment variable.
+
+ 6) Run `sfa --version` to verify that it is correctly installed.
+
+---
+
+## Execution
+
+ Open the shell and type `bin/launcher` to see the available commands
+
diff --git a/src/main/assembly/bin.xml b/src/main/assembly/bin.xml
new file mode 100644
index 0000000..f494a91
--- /dev/null
+++ b/src/main/assembly/bin.xml
@@ -0,0 +1,69 @@
+<?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.
+-->
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
+
+ <id>${project.build.finalName}</id>
+ <formats>
+ <format>tar.gz</format>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>true</includeBaseDirectory>
+ <baseDirectory>${project.build.finalName}</baseDirectory>
+
+ <files>
+ <file>
+ <source>${basedir}/src/main/assembly/README.md</source>
+ <filtered>true</filtered>
+ <outputDirectory></outputDirectory>
+ <fileMode>666</fileMode>
+ </file>
+
+ <!--
+ | Use the N&L files which apply to the included dependencies
+ -->
+ <file>
+ <source>${project.build.directory}/generated-sources/license/LICENSE-with-deps</source>
+ <destName>LICENSE</destName>
+ </file>
+ <file>
+ <source>${basedir}/src/main/legal/NOTICE-with-deps</source>
+ <destName>NOTICE</destName>
+ </file>
+ </files>
+
+ <fileSets>
+ <!--
+ | shell scripts
+ -->
+ <fileSet>
+ <directory>${project.build.directory}/appassembler/bin/</directory>
+ <outputDirectory>bin</outputDirectory>
+ <fileMode>755</fileMode>
+ <directoryMode>755</directoryMode>
+ </fileSet>
+ </fileSets>
+
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>lib</outputDirectory>
+ <scope>provided</scope>
+ <useTransitiveDependencies>true</useTransitiveDependencies>
+ <useProjectArtifact>true</useProjectArtifact>
+ </dependencySet>
+ </dependencySets>
+
+</assembly>
diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile
index ef897bf..0a8f0b3 100644
--- a/src/main/docker/Dockerfile
+++ b/src/main/docker/Dockerfile
@@ -38,7 +38,6 @@ ENV VERBOSE=info
#ENV for java
ENV JAVA_OPTS=
-ENV JAVA_CP=/opt/run/launcher.jar
WORKDIR /opt/run
RUN addgroup -S launcher && adduser -S launcher -G launcher && \
@@ -47,10 +46,10 @@ RUN addgroup -S launcher && adduser -S launcher -G launcher && \
USER launcher
# copy the packaged jar file into our docker image
-COPY maven/${project.artifactId}-${project.version}.jar /opt/run/launcher.jar
+COPY maven/${project.artifactId}-${project.version} /opt/run/launcher
#maybe cleanup
#RUN echo "rm -rf launcherecho "rm -rf launcher \n"
# set the startup command to execute the jar
-CMD java $JAVA_OPTS -cp $JAVA_CP org.apache.sling.feature.launcher.impl.Main -cenv -C $ARTIFACT_CLASH -CC $CONFIG_CLASH -c $CACHE_DIR -D $FRAMEWORK_PROPERTIES -f $FEATURE_FILES -p $HOME_DIR -u $REPOSITORY_URLS -V $VARIABLE_VALUES -ec $EXTENSION_CONFIGURATION -fv $FELIX_FRAMEWORK_VERSION -fa $OSGI_FRAMEWORK_ARTIFACT -v $VERBOSE
+CMD /opt/run/launcher/bin/launcher -cenv -C $ARTIFACT_CLASH -CC $CONFIG_CLASH -c $CACHE_DIR -D $FRAMEWORK_PROPERTIES -f $FEATURE_FILES -p $HOME_DIR -u $REPOSITORY_URLS -V $VARIABLE_VALUES -ec $EXTENSION_CONFIGURATION -fv $FELIX_FRAMEWORK_VERSION -fa $OSGI_FRAMEWORK_ARTIFACT -v $VERBOSE
diff --git a/src/main/java/javax/json/spi/JsonProvider.java b/src/main/java/javax/json/spi/JsonProvider.java
deleted file mode 100644
index b3cc921..0000000
--- a/src/main/java/javax/json/spi/JsonProvider.java
+++ /dev/null
@@ -1,298 +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 javax.json.spi;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.Writer;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.Collection;
-import java.util.Map;
-
-import javax.json.JsonArray;
-import javax.json.JsonArrayBuilder;
-import javax.json.JsonBuilderFactory;
-import javax.json.JsonMergePatch;
-import javax.json.JsonNumber;
-import javax.json.JsonObject;
-import javax.json.JsonObjectBuilder;
-import javax.json.JsonPatch;
-import javax.json.JsonPatchBuilder;
-import javax.json.JsonPointer;
-import javax.json.JsonReader;
-import javax.json.JsonReaderFactory;
-import javax.json.JsonString;
-import javax.json.JsonStructure;
-import javax.json.JsonValue;
-import javax.json.JsonWriter;
-import javax.json.JsonWriterFactory;
-import javax.json.stream.JsonGenerator;
-import javax.json.stream.JsonGeneratorFactory;
-import javax.json.stream.JsonParser;
-import javax.json.stream.JsonParserFactory;
-
-import org.osgi.annotation.versioning.ProviderType;
-
-@ProviderType
-public abstract class JsonProvider {
- private static final class Holder {
- private static final JsonProvider DEFAULT = new org.apache.johnzon.core.JsonProviderImpl();
- }
-
- protected JsonProvider() {
- // no-op
- }
-
- public static JsonProvider provider() {
- return Holder.DEFAULT;
- }
-
- public abstract JsonParser createParser(Reader reader);
-
- public abstract JsonParser createParser(InputStream in);
-
- public abstract JsonParserFactory createParserFactory(Map<String, ?> config);
-
- public abstract JsonGenerator createGenerator(Writer writer);
-
- public abstract JsonGenerator createGenerator(OutputStream out);
-
- public abstract JsonGeneratorFactory createGeneratorFactory(Map<String, ?> config);
-
- public abstract JsonReader createReader(Reader reader);
-
- public abstract JsonReader createReader(InputStream in);
-
- public abstract JsonWriter createWriter(Writer writer);
-
- public abstract JsonWriter createWriter(OutputStream out);
-
- public abstract JsonWriterFactory createWriterFactory(Map<String, ?> config);
-
- public abstract JsonReaderFactory createReaderFactory(Map<String, ?> config);
-
- /**
- * Create an empty JsonObjectBuilder
- * @since 1.0
- */
- public abstract JsonObjectBuilder createObjectBuilder();
-
- /**
- * Creates a JSON object builder, initialized with the specified JsonObject.
- * @since 1.1
- */
- public JsonObjectBuilder createObjectBuilder(JsonObject jsonObject) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Creates a JSON object builder, initialized with the specified Map.
- * @since 1.1
- */
- public JsonObjectBuilder createObjectBuilder(Map<String, Object> map) {
- throw new UnsupportedOperationException();
- }
-
- public abstract JsonArrayBuilder createArrayBuilder();
-
- public JsonArrayBuilder createArrayBuilder(JsonArray initialData) {
- throw new UnsupportedOperationException();
- }
-
- public JsonArrayBuilder createArrayBuilder(Collection<?> initialData) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Create a {@link JsonPointer} based on the given path string
- *
- * @since 1.1
- */
- public JsonPointer createPointer(String path) {
- throw new UnsupportedOperationException();
- }
-
- public abstract JsonBuilderFactory createBuilderFactory(Map<String, ?> config);
-
-
- public JsonString createValue(String value) {
- throw new UnsupportedOperationException();
- }
-
- public JsonNumber createValue(int value) {
- throw new UnsupportedOperationException();
- }
-
- public JsonNumber createValue(long value) {
- throw new UnsupportedOperationException();
- }
-
- public JsonNumber createValue(double value) {
- throw new UnsupportedOperationException();
- }
-
- public JsonNumber createValue(BigDecimal value) {
- throw new UnsupportedOperationException();
- }
-
- public JsonNumber createValue(BigInteger value) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Create a {@link JsonPatch} as defined in
- * <a href="https://tools.ietf.org/html/rfc6902">RFC-6902</a>.
- *
- * @param array with the patch operations
- * @return the JsonPatch based on the given operations
- *
- * @see #createDiff(JsonStructure, JsonStructure)
- *
- * @since 1.1
- */
- public JsonPatch createPatch(JsonArray array) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Create a {@link JsonPatch} by comparing the source to the target as defined in
- * <a href="https://tools.ietf.org/html/rfc6902">RFC-6902</a>.
- *
- * Applying this {@link JsonPatch} to the source you will give you the target.
- *
- * @see #createPatch(JsonArray)
- *
- * @since 1.1
- */
- public JsonPatch createDiff(JsonStructure source, JsonStructure target) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Create a new JsonPatchBuilder
- * @since 1.1
- */
- public JsonPatchBuilder createPatchBuilder() {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Create a new JsonPatchBuilder from initial data.
- * @param initialData the initial patch operations
- * @since 1.1
- */
- public JsonPatchBuilder createPatchBuilder(JsonArray initialData) {
- throw new UnsupportedOperationException();
- }
-
- /**
- * Create a merge patch based on the given JsonValue.
- *
- * If you have the following JsonMergePatch:
- *
- * <pre>
- * {
- * "a":"z",
- * "c": {
- * "f": null
- * }
- * }
- * </pre>
- *
- * and apply it to the following JSON
- *
- * <pre>
- * {
- * "a": "b",
- * "c": {
- * "d": "e",
- * "f": "g"
- * }
- * }
- * </pre>
- *
- * you will get the following result:
- *
- * <pre>
- * {
- * "a": "z",
- * "c": {
- * "d": "e",
- * }
- * }
- * </pre>
- *
- * @see #createMergeDiff(JsonValue, JsonValue)
- *
- * @since 1.1
- */
- public JsonMergePatch createMergePatch(JsonValue patch) {
- throw new UnsupportedOperationException();
- }
-
-
- /**
- * Create a merge patch by comparing the source to the target.
- * Applying this JsonMergePatch to the source will give you the target.
- * A MergePatch is a JsonValue as defined in http://tools.ietf.org/html/rfc7396
- *
- * If you have a JSON like
- * <pre>
- * {
- * "a": "b",
- * "c": {
- * "d": "e",
- * "f": "g"
- * }
- * }
- * </pre>
- *
- * and comparing it with
- *
- * <pre>
- * {
- * "a": "z",
- * "c": {
- * "d": "e",
- * }
- * }
- * </pre>
- *
- * you will get the following JsonMergePatch:
- *
- * <pre>
- * {
- * "a":"z",
- * "c": {
- * "f": null
- * }
- * }
- * </pre>
- *
- * @see #createMergePatch(JsonValue)
- *
- * @since 1.1
- */
- public JsonMergePatch createMergeDiff(JsonValue source, JsonValue target) {
- throw new UnsupportedOperationException();
- }
-}
-
diff --git a/src/main/legal/LICENSE-with-deps b/src/main/legal/LICENSE-with-deps
new file mode 100644
index 0000000..75545a9
--- /dev/null
+++ b/src/main/legal/LICENSE-with-deps
@@ -0,0 +1,233 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
+<#function licenseFormat licenses>
+ <#assign result = ""/>
+ <#list licenses as license>
+ <#if result?length > 0>
+ <#assign result = result + ", " />
+ </#if>
+ <#assign result = result + license />
+ </#list>
+ <#return result>
+</#function>
+
+<#function artifactFormat p>
+ <#if p.name?index_of('Unnamed') > -1>
+ <#return p.groupId + ":" + p.artifactId + ":" + p.version + " (" + (p.url!"no url defined") + ")">
+ <#else>
+ <#return p.name + " v" + p.version + " (" + (p.url!"no url defined") + ")">
+ </#if>
+</#function>
+
+<#if dependencyMap?size == 0>
+The project has no dependencies.
+<#else>
+ <#list dependencyMap as e>
+ <#assign project = e.getKey()/>
+ <#assign licenses = e.getValue()/>
+For the ${artifactFormat(project)} component
+This is licensed under ${licenseFormat(licenses)}
+
+ </#list>
+</#if>
diff --git a/src/main/legal/NOTICE-with-deps b/src/main/legal/NOTICE-with-deps
new file mode 100644
index 0000000..39d6dbf
--- /dev/null
+++ b/src/main/legal/NOTICE-with-deps
@@ -0,0 +1,5 @@
+Apache Sling Feature Launcher
+Copyright 2021 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
diff --git a/src/main/legal/license-header b/src/main/legal/license-header
new file mode 100644
index 0000000..d323a71
--- /dev/null
+++ b/src/main/legal/license-header
@@ -0,0 +1,14 @@
+ 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.