You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2024/09/19 16:10:11 UTC

(sling-samples) 01/15: oauth: import after archetype generation

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-samples.git

commit 50f8ae21db3536f3c8e931508564e919bf1692e8
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Aug 23 17:59:38 2024 +0200

    oauth: import after archetype generation
---
 oauth/.gitignore                                   |    1 +
 oauth/README.md                                    |  133 +
 oauth/all/pom.xml                                  |  105 +
 oauth/core/pom.xml                                 |  150 ++
 oauth/launcher/launch.sh                           |   24 +
 oauth/launcher/pom.xml                             |  118 +
 oauth/launcher/src/main/features/launcher.json     |   13 +
 oauth/pom.xml                                      | 2740 ++++++++++++++++++++
 oauth/ui.apps/pom.xml                              |   65 +
 .../src/main/content/META-INF/vault/filter.xml     |   39 +
 .../src/main/content/META-INF/vault/settings.xml   |   17 +
 .../content/jcr_root/apps/oauth-demo/.content.xml  |   24 +
 .../jcr_root/apps/oauth-demo/install/.content.xml  |   23 +
 .../jcr_root/content/oauth-demo/.content.xml       |   24 +
 14 files changed, 3476 insertions(+)

diff --git a/oauth/.gitignore b/oauth/.gitignore
new file mode 100644
index 0000000..c4459ec
--- /dev/null
+++ b/oauth/.gitignore
@@ -0,0 +1 @@
+launcher/launcher/
diff --git a/oauth/README.md b/oauth/README.md
new file mode 100644
index 0000000..e20dcbf
--- /dev/null
+++ b/oauth/README.md
@@ -0,0 +1,133 @@
+### Maven Project generated from Maven Archetype
+
+#### License
+
+    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.
+
+#### Introduction
+
+This project was created by the Full Project Sling Maven Archetype which created
+four modules:
+
+1. **core**: OSGi Bundle which is deployed as OSGi Bundle to Sling which includes your
+             Servlets, Filters, Sling Models and much more. This module is **not intended**
+             to contain Sling Content.
+2. **ui.apps**: JCR Content Module which is used to install a JCR Package into Sling
+                by using **Composum**. For that it must be installed and the Composum
+                Package Manager must be whitelisted.
+3. **launcher**: Feature model module which assembles a full application from the project
+                 which can then be launched using the included `./launch.sh` script
+4. **all**: This is another JCR Content Module but it is only used to install the
+            other two modules. 
+
+There are also two more modules that provide some examples with the same name plus
+the **.example** extension. This modules should not be deployed as is but rather
+examples that you want to use should be copied to the core or ui.apps module.
+The structure of both modules are the same and so copying them over just be
+quite simple.
+
+#### Why the All Package
+
+Most real projects have many different OSGi bundles, Content Packages, Configuration
+Modules and many more. Deploying them one by one is cumbersome and can lead to
+inconsitency and to a lot of overhead in a Continious Integration system.
+The **All** package allows you to deploy all theses artifacts in one swoop or it allows
+you to deploy them to multiple targets by just repeating the **All** deployment.
+
+##### Adding a new Module
+
+If you create a new Maven module then you need to add them to the **All** POM as
+well to include them into the All deployment. These are the steps:
+
+1. Add the dependency to the new module in the All POM
+2. Add the module to the **maven-vault-plugin** definition
+    1. If this is a content package then into the **subPackages**
+    2. If this is an OSGi Bundle then into the **embeddeds**
+
+##### Package Filter
+
+In any multi-content-package environment the developer needs to pay close attention
+to the **content filtering** in the **META-INF/vault/filter.xml** as this can lead
+to hard to detect issues. Please make sure that:
+
+1. Exclude **/apps/&lt;apps-folder-name>/install** from any of your content package
+   as in that folder the **All** package is installing the bundles into
+2. Make sure that content packages are not removing each other contents. The rule is
+   that each content package has their own sub folder inside **/apps/&lt;apps-folder-name>**
+   and avoid overlap.
+3. Any shared folders like **overlays** need to be separated from each other.
+   It is a good idea to limit your filter to smallest subset possible to avoid
+   future issues if another package needs to place their overlays into the
+   same folder. 
+
+The package filter is a **mask** that tells Sling which part of the JCR tree
+your package maintains and after the deployment that part of the JCR tree will
+be the same as in your package. All missing ndoes in Sling will be created, all
+existing nodes will be updated and all missing nodes in your package will be
+deleted in Sling.
+
+
+#### Why a JCR Package instead of a Content Bundle
+
+There a several reasons to use a JCR Package instead of a Content Bundle
+but for the most important reason is that a JCR Package allows the **Sling
+Tooling** to update a single file rather than an entire Bundle and also
+to import a Node from Sling into the project.
+
+
+#### Attention:
+
+Due to the way Apache Maven Archetypes work both **example** modules are added
+to the parent POM's module list. Please **remove** them after you created them
+to avoid the installation of these modules into Sling.
+At the end of the parent POM you will find the lines below. Remove the lines
+with **core.example** and **ui.apps.example**.
+
+    <modules>
+        <module>core</module>
+        <module>core.example</module>
+        <module>ui.apps</module>
+        <module>ui.apps.example</module>
+        <module>launcher</module>
+        <module>all</module>
+    </modules>
+
+#### Build and Installation
+
+The project is built quite simple:
+
+    mvn clean install
+    
+To install the project **autoInstallAll**:
+
+    mvn clean install -P autoInstallAll
+
+##### ATTENTION
+
+It is not a good idea to deploy code with both approaches.
+Choose one and stick with it as you can either loose a bundle
+or the bundle is not updated during installation.
+
+In case of a mishape the package and bundles needs to deinstalled
+manullay:
+
+1. Remove /apps/${appsFolderName}/install folder
+2. Uninstall the package using the package manager
+3. Remove the package from /etc/packages including the snapshots if they are still there
+4. Remove the Bundle using the OSGi Console (/system/console/bundles)
+
diff --git a/oauth/all/pom.xml b/oauth/all/pom.xml
new file mode 100644
index 0000000..ecae3af
--- /dev/null
+++ b/oauth/all/pom.xml
@@ -0,0 +1,105 @@
+<?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/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>org.apache.sling.samples.oauth</artifactId>
+        <groupId>org.apache.sling.samples</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>org.apache.sling.samples.oauth.all</artifactId>
+    <packaging>content-package</packaging>
+
+    <name>Sling OAuth Demo - All</name>
+    <description>org.apache.sling.samples.oauth - Sling OAuth Demo: All-in-one deployment content package</description>
+
+    <properties>
+        <maven.test.skip>true</maven.test.skip>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>org.apache.sling.samples.oauth.core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>org.apache.sling.samples.oauth.ui.apps</artifactId>
+            <version>${project.version}</version>
+            <type>content-package</type>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.jackrabbit</groupId>
+                <artifactId>filevault-package-maven-plugin</artifactId>
+                <configuration>
+                    <packageType>container</packageType>
+                    <embeddedTarget>/apps/oauth-demo/install</embeddedTarget>
+                    <embeddeds>
+                        <embedded>
+                            <groupId>${project.groupId}</groupId>
+                            <artifactId>org.apache.sling.samples.oauth.core</artifactId>
+                            <filter>true</filter>
+                        </embedded>
+                    </embeddeds>
+                    <subPackages>
+                        <subPackage>
+                            <groupId>${project.groupId}</groupId>
+                            <artifactId>org.apache.sling.samples.oauth.ui.apps</artifactId>
+                            <filter>true</filter>
+                        </subPackage>
+                    </subPackages>
+                    <!-- This gives the Package a recognizable name in the Package Manager by prepending the Artifact Id of the Project -->
+                    <name>org.apache.sling.samples.oauth-all</name>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>autoInstallAll</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>io.wcm.maven.plugins</groupId>
+                        <artifactId>wcmio-content-package-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>install-package</id>
+                                <goals>
+                                    <goal>install</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
diff --git a/oauth/core/pom.xml b/oauth/core/pom.xml
new file mode 100644
index 0000000..d7dc281
--- /dev/null
+++ b/oauth/core/pom.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+    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/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>org.apache.sling.samples.oauth</artifactId>
+        <groupId>org.apache.sling.samples</groupId>
+        <version>1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>org.apache.sling.samples.oauth.core</artifactId>
+    <packaging>bundle</packaging>
+
+    <name>Sling OAuth Demo - Core</name>
+    <description>
+        This is an empty OSGi Bundle which can be used
+        to compile and deploy OSGi Services to Sling.
+
+        This Bundle can be deployed using the Profile
+        "autoInstallBundle" but that should not be used
+        together with the "ui.apps" Profile "autoInstallAll"
+        as they are not deployed the same way and can lead
+        to undesired issues during deployment (bundle not
+        updated or not working at all).
+    </description>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Embed-Dependency>*;scope=compile;inline=true</Embed-Dependency>
+                        <Sling-Model-Packages>org.apache.sling.samples.oauth.model</Sling-Model-Packages>
+                        <_dsannotations>*</_dsannotations>
+                        <_metatypeannotations>*</_metatypeannotations>
+                        <_removeheaders>
+                            Embed-Dependency,
+                            Private-Package,
+                            Include-Resource
+                        </_removeheaders>
+                    </instructions>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>11</source>
+                    <target>11</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.sling</groupId>
+                <artifactId>maven-sling-plugin</artifactId>
+                <configuration>
+                    <slingUrl>http://${sling.host}:${sling.port}/system/console</slingUrl>
+                    <user>${sling.user}</user>
+                    <password>${sling.password}</password>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.annotation</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.service.component.annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.service.metatype.annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.jcr</groupId>
+            <artifactId>jcr</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.models.api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.jackrabbit</groupId>
+            <artifactId>jackrabbit-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+        </dependency>
+    </dependencies>
+
+    <!--
+        Attention: the autoInstallBundle was removed as deploying bundles directly and through a package is causing
+                   issues with updates and can prevent the latest code of a bundle being deployed.
+                   If you know what you are doing then you can use maven-sling-plugin directly from the Maven CLI.
+    -->
+</project>
diff --git a/oauth/launcher/launch.sh b/oauth/launcher/launch.sh
new file mode 100755
index 0000000..36884d1
--- /dev/null
+++ b/oauth/launcher/launch.sh
@@ -0,0 +1,24 @@
+#!/bin/sh -eu
+#
+# 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.
+#
+
+echo '-------------------------------------------------------------------------------------------'
+echo '[NOTE] Launching application, this will fail if you did not build the project at least once'
+echo '[NOTE] Remove the launcher folder to throw away local changes'
+echo '-------------------------------------------------------------------------------------------'
+
+target/dependency/org.apache.sling.feature.launcher/bin/launcher -f target/slingfeature-tmp/feature-app.json 
diff --git a/oauth/launcher/pom.xml b/oauth/launcher/pom.xml
new file mode 100644
index 0000000..7758ca2
--- /dev/null
+++ b/oauth/launcher/pom.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- 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/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>org.apache.sling.samples.oauth</artifactId>
+        <groupId>org.apache.sling.samples</groupId>
+        <version>1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>org.apache.sling.samples.oauth.launcher</artifactId>
+
+    <name>Sling OAuth Demo - Launcher</name>
+    <description>
+        This is a Module which contains a sample feature model build, built on
+        top of the Sling Starter and adding this project's artifacts.
+    </description>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.sling</groupId>
+                <artifactId>slingfeature-maven-plugin</artifactId>
+                <extensions>true</extensions>
+
+                <configuration>
+                    <skipAddFeatureDependencies>true</skipAddFeatureDependencies>
+                    <framework>
+                        <groupId>org.apache.felix</groupId>
+                        <artifactId>org.apache.felix.framework</artifactId>
+                        <version>${org.apache.felix.framework.version}</version>
+                    </framework>
+
+                    <!--
+                        Prepares a feature model aggregate that takes the following features from
+                        the Sling Starter:
+                        - nosample_base - the base Sling Starter
+                        - oak_persistence_sns - SegmentNodeStore persistence for Oak
+                        - composum - The Composum Nodes administration tool
+
+                        Notably missing are the slingshot and starter samples
+                     -->
+                    <aggregates>
+                        <aggregate>
+                            <classifier>app</classifier>
+                            <filesInclude>*.json</filesInclude>
+                            <includeArtifact>
+                                <groupId>org.apache.sling</groupId>
+                                <artifactId>org.apache.sling.extensions.oidc-rp</artifactId>
+                                <classifier>app</classifier>
+                                <version>0.1-SNAPSHOT</version>
+                                <type>slingosgifeature</type>
+                            </includeArtifact>
+                       </aggregate>
+                    </aggregates>
+                    <scans>
+                        <scan>
+                            <includeClassifier>app</includeClassifier>
+                        </scan>
+                    </scans>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>prepare-features</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>aggregate-features</goal>
+                            <goal>analyse-features</goal>
+                            <goal>attach-features</goal>
+                        </goals>
+                    </execution>
+               </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>prepare-feature-launcher</id>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <phase>package</phase>
+            			<configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.apache.sling</groupId>
+                                    <artifactId>org.apache.sling.feature.launcher</artifactId>
+                                    <version>${org.apache.sling.feature.launcher.version}</version>
+                                    <type>tar.gz</type>
+                                    <!-- remove the version number from the unpacked folder -->
+                                    <fileMappers>
+                                        <org.codehaus.plexus.components.io.filemappers.RegExpFileMapper>
+                                            <pattern>\Qorg.apache.sling.feature.launcher-${org.apache.sling.feature.launcher.version}\E</pattern>
+                                            <replacement>org.apache.sling.feature.launcher</replacement>
+                                        </org.codehaus.plexus.components.io.filemappers.RegExpFileMapper>
+                                    </fileMappers>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/oauth/launcher/src/main/features/launcher.json b/oauth/launcher/src/main/features/launcher.json
new file mode 100644
index 0000000..430812b
--- /dev/null
+++ b/oauth/launcher/src/main/features/launcher.json
@@ -0,0 +1,13 @@
+{
+  "bundles": [
+    {
+        "id": "org.apache.sling.samples/org.apache.sling.samples.oauth.core/1.0-SNAPSHOT",
+        "start-order": 20
+    }
+  ],
+  "content-packages:ARTIFACTS|required": [
+    {
+        "id":"org.apache.sling.samples/org.apache.sling.samples.oauth.ui.apps/1.0-SNAPSHOT/zip"
+    }
+  ]
+}
diff --git a/oauth/pom.xml b/oauth/pom.xml
new file mode 100644
index 0000000..28196dd
--- /dev/null
+++ b/oauth/pom.xml
@@ -0,0 +1,2740 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+    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/maven-v4_0_0.xsd">
+                
+  
+  
+  
+  
+  
+  <modelVersion>4.0.0</modelVersion>
+                
+  
+  
+  
+  
+  
+  <groupId>org.apache.sling.samples</groupId>
+                
+  
+  
+  
+  
+  
+  <artifactId>org.apache.sling.samples.oauth</artifactId>
+                
+  
+  
+  
+  
+  
+  <version>1.0-SNAPSHOT</version>
+                
+  
+  
+  
+  
+  
+  <packaging>pom</packaging>
+                
+  
+  
+  
+  
+  
+  <name>Sling OAuth Demo</name>
+                
+  
+  
+  
+  
+  
+  <!--
+        ATTENTION: This archetype creates two modules: 'core' and 'ui.apps'
+                   Both of these modules are empty and you can start filling
+                   it in with your files.
+                   There are two other modules: 'core.example' and 'ui.apps.example'
+                   with have the same structure but have provide examples
+                   for showing a Page with the usage of a Sling Model. The
+                   idea is that a developer can copy any file he wants into
+                   the regular module. Unfortunately the Maven Archetype
+                   generating this project is adding all four modules to
+                   this POM. Even though the POMs for the example modules
+                   will not deploy it is best to remove them from this POM.
+
+                   Look for the modules at the end of this file.
+    -->
+                
+  
+  
+  
+  
+  
+  <properties>
+                                
+    
+    
+    
+    
+    
+    <sling.host>localhost</sling.host>
+                                
+    
+    
+    
+    
+    
+    <sling.port>8080</sling.port>
+                                
+    
+    
+    
+    
+    
+    <sling.user>admin</sling.user>
+                                
+    
+    
+    
+    
+    
+    <sling.password>admin</sling.password>
+                                
+    
+    
+    
+    
+    
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+                                
+    
+    
+    
+    
+    
+    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+                                
+    
+    
+    
+    
+    
+    <release.plugin.version>2.5.3</release.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <source.plugin.version>3.0.1</source.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <resource.plugin.version>3.1.0</resource.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <jar.plugin.version>3.1.1</jar.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <enforcer.plugin.version>3.0.0-M2</enforcer.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <compiler.plugin.version>3.8.0</compiler.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <bundle.plugin.version>5.1.9</bundle.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <clean.plugin.version>3.1.0</clean.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <installer.plugin.version>3.0.0-M1</installer.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <surfire.plugin.version>3.0.0-M3</surfire.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <failsafe.plugin.version>3.0.0-M3</failsafe.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <deploy.plugin.version>3.0.0-M1</deploy.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <sling.plugin.version>2.4.0</sling.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <dependency.plugin.version>3.8.0</dependency.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <build.helper.plugin.version>3.0.0</build.helper.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <wcmio.plugin.version>1.7.6</wcmio.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <!-- TODO: Could not upgrade to 1.1.x as some tests prevent the creation of All packages -->
+                                
+    
+    
+    
+    
+    
+    <filevault-package.plugin.version>1.0.4</filevault-package.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <slingfeature.plugin.version>1.8.4</slingfeature.plugin.version>
+                                
+    
+    
+    
+    
+    
+    <osgi.core.version>7.0.0</osgi.core.version>
+                                
+    
+    
+    
+    
+    
+    <osgi.annotation.version>7.0.0</osgi.annotation.version>
+                                
+    
+    
+    
+    
+    
+    <org.osgi.service.component.annotations.version>1.4.0</org.osgi.service.component.annotations.version>
+                                
+    
+    
+    
+    
+    
+    <org.osgi.service.metatype.annotations.version>1.4.0</org.osgi.service.metatype.annotations.version>
+                                
+    
+    
+    
+    
+    
+    <org.osgi.compendium.version>5.0.0</org.osgi.compendium.version>
+                                
+    
+    
+    
+    
+    
+    <javax.servlet-api.version>3.1.0</javax.servlet-api.version>
+                                
+    
+    
+    
+    
+    
+    <javax.inject.version>1</javax.inject.version>
+                                
+    
+    
+    
+    
+    
+    <jcr.version>2.0</jcr.version>
+                                
+    
+    
+    
+    
+    
+    <org.apache.felix.framework.version>7.0.1</org.apache.felix.framework.version>
+                                
+    
+    
+    
+    
+    
+    <org.apache.sling.api.version>2.22.0</org.apache.sling.api.version>
+                                
+    
+    
+    
+    
+    
+    <org.apache.sling.models.api.version>1.3.8</org.apache.sling.models.api.version>
+                                
+    
+    
+    
+    
+    
+    <org.apache.sling.feature.launcher.version>1.3.0</org.apache.sling.feature.launcher.version>
+                                
+    
+    
+    
+    
+    
+    <jetbrains.annotations.version>19.0.0</jetbrains.annotations.version>
+                                
+    
+    
+    
+    
+    
+    <org.apache.sling.settings.version>1.3.10</org.apache.sling.settings.version>
+                                
+    
+    
+    
+    
+    
+    <org.apache.sling.commons.osgi.version>2.4.0</org.apache.sling.commons.osgi.version>
+                                
+    
+    
+    
+    
+    
+    <jackrabbit-api.version>2.19.3</jackrabbit-api.version>
+                                
+    
+    
+    
+    
+    
+    <commons-lang3.version>3.9</commons-lang3.version>
+                                
+    
+    
+    
+    
+    
+    <jmock-junit4.version>2.8.2</jmock-junit4.version>
+                                
+    
+    
+    
+    
+    
+  
+  
+  
+  
+  
+  </properties>
+                
+  
+  
+  
+  
+  
+  <build>
+                                
+    
+    
+    
+    
+    
+    <plugins>
+                                                
+      
+      
+      
+      
+      
+      <!-- Maven Release Plugin -->
+                                                
+      
+      
+      
+      
+      
+      <plugin>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.apache.maven.plugins</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>maven-release-plugin</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <configuration>
+                                                                                
+          
+          
+          
+          
+          
+          <scmCommentPrefix>[maven-scm] :</scmCommentPrefix>
+                                                                                
+          
+          
+          
+          
+          
+          <preparationGoals>clean install</preparationGoals>
+                                                                                
+          
+          
+          
+          
+          
+          <goals>install</goals>
+                                                                                
+          
+          
+          
+          
+          
+          <releaseProfiles>release</releaseProfiles>
+                                                                            
+        
+        
+        
+        
+        
+        </configuration>
+                                                            
+      
+      
+      
+      
+      
+      </plugin>
+                                                
+      
+      
+      
+      
+      
+      <!-- Maven Source Plugin -->
+                                                
+      
+      
+      
+      
+      
+      <plugin>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.apache.maven.plugins</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>maven-source-plugin</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <inherited>true</inherited>
+                                                            
+      
+      
+      
+      
+      
+      </plugin>
+                                                
+      
+      
+      
+      
+      
+      <!-- Maven Resources Plugin -->
+                                                
+      
+      
+      
+      
+      
+      <plugin>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.apache.maven.plugins</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>maven-resources-plugin</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <configuration>
+                                                                                
+          
+          
+          
+          
+          
+          <encoding>UTF-8</encoding>
+                                                                            
+        
+        
+        
+        
+        
+        </configuration>
+                                                            
+      
+      
+      
+      
+      
+      </plugin>
+                                                
+      
+      
+      
+      
+      
+      <!-- Maven Jar Plugin -->
+                                                
+      
+      
+      
+      
+      
+      <plugin>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.apache.maven.plugins</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>maven-jar-plugin</artifactId>
+                                                            
+      
+      
+      
+      
+      
+      </plugin>
+                                                
+      
+      
+      
+      
+      
+      <!-- Maven Enforcer Plugin -->
+                                                
+      
+      
+      
+      
+      
+      <plugin>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.apache.maven.plugins</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>maven-enforcer-plugin</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <executions>
+                                                                                
+          
+          
+          
+          
+          
+          <execution>
+                                                                                                
+            
+            
+            
+            
+            
+            <id>enforce-maven</id>
+                                                                                                
+            
+            
+            
+            
+            
+            <goals>
+                                                                                                                
+              
+              
+              
+              
+              
+              <goal>enforce</goal>
+                                                                                                            
+            
+            
+            
+            
+            
+            </goals>
+                                                                                                
+            
+            
+            
+            
+            
+            <configuration>
+                                                                                                                
+              
+              
+              
+              
+              
+              <rules>
+                                                                                                                                
+                
+                
+                
+                
+                
+                <requireMavenVersion>
+                                                                                                                                                
+                  
+                  
+                  
+                  
+                  
+                  <message>Project must be built with Maven 3.1.0 or higher</message>
+                                                                                                                                                
+                  
+                  
+                  
+                  
+                  
+                  <version>[3.1.0,)</version>
+                                                                                                                                            
+                
+                
+                
+                
+                
+                </requireMavenVersion>
+                                                                                                                                
+                
+                
+                
+                
+                
+                <requireJavaVersion>
+                                                                                                                                                
+                  
+                  
+                  
+                  
+                  
+                  <message>Project must be compiled with Java 7 or higher</message>
+                                                                                                                                                
+                  
+                  
+                  
+                  
+                  
+                  <version>1.7.0</version>
+                                                                                                                                            
+                
+                
+                
+                
+                
+                </requireJavaVersion>
+                                                                                                                            
+              
+              
+              
+              
+              
+              </rules>
+                                                                                                            
+            
+            
+            
+            
+            
+            </configuration>
+                                                                                            
+          
+          
+          
+          
+          
+          </execution>
+                                                                            
+        
+        
+        
+        
+        
+        </executions>
+                                                            
+      
+      
+      
+      
+      
+      </plugin>
+                                                
+      
+      
+      
+      
+      
+      <!-- Maven Compiler Plugin -->
+                                                
+      
+      
+      
+      
+      
+      <plugin>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.apache.maven.plugins</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>maven-compiler-plugin</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <configuration>
+                                                                                
+          
+          
+          
+          
+          
+          <source>11</source>
+                                                                                
+          
+          
+          
+          
+          
+          <target>11</target>
+                                                                                
+          
+          
+          
+          
+          
+          <encoding>UTF-8</encoding>
+                                                                            
+        
+        
+        
+        
+        
+        </configuration>
+                                                            
+      
+      
+      
+      
+      
+      </plugin>
+                                            
+    
+    
+    
+    
+    
+    </plugins>
+                                
+    
+    
+    
+    
+    
+    <pluginManagement>
+                                                
+      
+      
+      
+      
+      
+      <plugins>
+                                                                
+        
+        
+        
+        
+        
+        <!-- Maven Release Plugin -->
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>maven-release-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${release.plugin.version}</version>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                                
+        
+        
+        
+        
+        
+        <!-- Maven Source Plugin -->
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>maven-source-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${source.plugin.version}</version>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                                
+        
+        
+        
+        
+        
+        <!-- Maven Resources Plugin -->
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <groupId>org.apache.maven.plugins</groupId>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>maven-resources-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${resource.plugin.version}</version>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                                
+        
+        
+        
+        
+        
+        <!-- Maven Jar Plugin -->
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <groupId>org.apache.maven.plugins</groupId>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>maven-jar-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${jar.plugin.version}</version>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                                
+        
+        
+        
+        
+        
+        <!-- Maven Enforcer Plugin -->
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>maven-enforcer-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${enforcer.plugin.version}</version>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                                
+        
+        
+        
+        
+        
+        <!-- Maven Compiler Plugin -->
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>maven-compiler-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${compiler.plugin.version}</version>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                                
+        
+        
+        
+        
+        
+        <!-- Maven Clean Plugin -->
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <groupId>org.apache.maven.plugins</groupId>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>maven-clean-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${clean.plugin.version}</version>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                                
+        
+        
+        
+        
+        
+        <!-- Maven Installer Plugin -->
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <groupId>org.apache.maven.plugins</groupId>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>maven-install-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${installer.plugin.version}</version>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                                
+        
+        
+        
+        
+        
+        <!-- Maven Surefire Plugin -->
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <groupId>org.apache.maven.plugins</groupId>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>maven-surefire-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${surfire.plugin.version}</version>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                                
+        
+        
+        
+        
+        
+        <!-- Maven Failsafe Plugin -->
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <groupId>org.apache.maven.plugins</groupId>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>maven-failsafe-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${failsafe.plugin.version}</version>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                                
+        
+        
+        
+        
+        
+        <!-- Maven Deploy Plugin -->
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <groupId>org.apache.maven.plugins</groupId>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>maven-deploy-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${deploy.plugin.version}</version>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                                
+        
+        
+        
+        
+        
+        <!-- Apache Sling Plugin -->
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <groupId>org.apache.sling</groupId>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>maven-sling-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${sling.plugin.version}</version>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                                
+        
+        
+        
+        
+        
+        <!-- Content Package Plugin -->
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <groupId>org.apache.jackrabbit</groupId>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>filevault-package-maven-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${filevault-package.plugin.version}</version>
+                                                                                
+          
+          
+          
+          
+          
+          <extensions>true</extensions>
+                                                                                
+          
+          
+          
+          
+          
+          <configuration>
+                                                                                                
+            
+            
+            
+            
+            
+            <failOnMissingEmbed>true</failOnMissingEmbed>
+                                                                                                
+            
+            
+            
+            
+            
+            <force>true</force>
+                                                                                            
+          
+          
+          
+          
+          
+          </configuration>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <groupId>io.wcm.maven.plugins</groupId>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>wcmio-content-package-maven-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${wcmio.plugin.version}</version>
+                                                                                
+          
+          
+          
+          
+          
+          <configuration>
+                                                                                                
+            
+            
+            
+            
+            
+            <serviceURL>http://${sling.host}:${sling.port}/bin/cpm/</serviceURL>
+                                                                                                
+            
+            
+            
+            
+            
+            <userId>${sling.user}</userId>
+                                                                                                
+            
+            
+            
+            
+            
+            <password>${sling.password}</password>
+                                                                                                
+            
+            
+            
+            
+            
+            <failOnMissingEmbed>true</failOnMissingEmbed>
+                                                                                                
+            
+            
+            
+            
+            
+            <force>true</force>
+                                                                                                
+            
+            
+            
+            
+            
+            <group>sling-samples</group>
+                                                                                            
+          
+          
+          
+          
+          
+          </configuration>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                                
+        
+        
+        
+        
+        
+        <!-- Apache Felix Bundle Plugin -->
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <groupId>org.apache.felix</groupId>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>maven-bundle-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${bundle.plugin.version}</version>
+                                                                                
+          
+          
+          
+          
+          
+          <inherited>true</inherited>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                                
+        
+        
+        
+        
+        
+        <!-- Maven Dependency Plugin -->
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <groupId>org.apache.maven.plugins</groupId>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>maven-dependency-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${dependency.plugin.version}</version>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                                
+        
+        
+        
+        
+        
+        <!-- Build Helper Maven Plugin -->
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <groupId>org.codehaus.mojo</groupId>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>build-helper-maven-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${build.helper.plugin.version}</version>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                                
+        
+        
+        
+        
+        
+        <!-- SlingFeature Plugin -->
+                                                                
+        
+        
+        
+        
+        
+        <plugin>
+                                                                                
+          
+          
+          
+          
+          
+          <groupId>org.apache.sling</groupId>
+                                                                                
+          
+          
+          
+          
+          
+          <artifactId>slingfeature-maven-plugin</artifactId>
+                                                                                
+          
+          
+          
+          
+          
+          <version>${slingfeature.plugin.version}</version>
+                                                                                
+          
+          
+          
+          
+          
+          <dependencies>
+                                                                                                
+            
+            
+            
+            
+            
+            <dependency>
+                                                                                                                
+              
+              
+              
+              
+              
+              <groupId>org.apache.sling</groupId>
+                                                                                                                
+              
+              
+              
+              
+              
+              <artifactId>org.apache.sling.feature.launcher</artifactId>
+                                                                                                                
+              
+              
+              
+              
+              
+              <version>${org.apache.sling.feature.launcher.version}</version>
+                                                                                                            
+            
+            
+            
+            
+            
+            </dependency>
+                                                                                            
+          
+          
+          
+          
+          
+          </dependencies>
+                                                                            
+        
+        
+        
+        
+        
+        </plugin>
+                                                            
+      
+      
+      
+      
+      
+      </plugins>
+                                            
+    
+    
+    
+    
+    
+    </pluginManagement>
+                            
+  
+  
+  
+  
+  
+  </build>
+                
+  
+  
+  
+  
+  
+  <!-- ====================================================================== -->
+                
+  
+  
+  
+  
+  
+  <!-- D E P E N D E N C I E S                                                -->
+                
+  
+  
+  
+  
+  
+  <!-- ====================================================================== -->
+                
+  
+  
+  
+  
+  
+  <dependencyManagement>
+                                
+    
+    
+    
+    
+    
+    <dependencies>
+                                                
+      
+      
+      
+      
+      
+      <!-- OSGi Dependencies -->
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.osgi</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>osgi.core</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>${osgi.core.version}</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>provided</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <!-- OSGi annotations: @Version, @ProviderType, @ConsumerType -->
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.osgi</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>osgi.annotation</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>${osgi.annotation.version}</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>provided</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <!-- OSGi annotations for DS and metatype -->
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.osgi</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>org.osgi.service.component.annotations</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>${org.osgi.service.component.annotations.version}</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>provided</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.osgi</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>org.osgi.service.metatype.annotations</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>${org.osgi.service.metatype.annotations.version}</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>provided</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <!-- Needs to be placed after 'org.osgi.service.component.annotations' otherwise field @Reference will not work -->
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.osgi</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>org.osgi.compendium</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>${org.osgi.compendium.version}</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>provided</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <!-- Web Application API -->
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>javax.servlet</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>javax.servlet-api</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>${javax.servlet-api.version}</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>provided</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <!-- dependency injection annotations -->
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>javax.inject</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>javax.inject</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>$[javax.inject.version</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>provided</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <!-- JCR API -->
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>javax.jcr</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>jcr</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>${jcr.version}</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>provided</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <!-- Basic Logging -->
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.slf4j</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>slf4j-api</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>1.7.25</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>provided</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.jetbrains</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>annotations</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>${jetbrains.annotations.version}</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>provided</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <!-- Apache Sling Dependencies -->
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.apache.sling</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>org.apache.sling.api</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>${org.apache.sling.api.version}</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>provided</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.apache.sling</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>org.apache.sling.settings</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>${org.apache.sling.settings.version}</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>provided</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.apache.sling</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>org.apache.sling.commons.osgi</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>${org.apache.sling.commons.osgi.version}</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>provided</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.apache.sling</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>org.apache.sling.models.api</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>${org.apache.sling.models.api.version}</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>provided</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.apache.jackrabbit</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>jackrabbit-api</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>${jackrabbit-api.version}</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>provided</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <!-- Support -->
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.apache.commons</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>commons-lang3</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>${commons-lang3.version}</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>provided</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <!-- Basic dependencies for Unit Tests -->
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>junit</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>junit</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>4.12</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>test</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.jmock</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>jmock-junit4</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>${jmock-junit4.version}</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>test</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                                
+      
+      
+      
+      
+      
+      <dependency>
+                                                                
+        
+        
+        
+        
+        
+        <groupId>org.slf4j</groupId>
+                                                                
+        
+        
+        
+        
+        
+        <artifactId>slf4j-simple</artifactId>
+                                                                
+        
+        
+        
+        
+        
+        <version>1.7.25</version>
+                                                                
+        
+        
+        
+        
+        
+        <scope>test</scope>
+                                                            
+      
+      
+      
+      
+      
+      </dependency>
+                                            
+    
+    
+    
+    
+    
+    </dependencies>
+                            
+  
+  
+  
+  
+  
+  </dependencyManagement>
+            
+  
+  
+  
+  
+  
+  <modules>
+                          
+    
+    
+    
+    
+    
+    <module>core</module>
+                      
+    
+    
+    
+    
+    <module>ui.apps</module>
+              
+    
+    
+    <module>launcher</module>
+          
+    
+    <module>all</module>
+      
+  </modules>
+          
+
+
+
+
+</project>
diff --git a/oauth/ui.apps/pom.xml b/oauth/ui.apps/pom.xml
new file mode 100644
index 0000000..c49c6eb
--- /dev/null
+++ b/oauth/ui.apps/pom.xml
@@ -0,0 +1,65 @@
+<?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/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>org.apache.sling.samples.oauth</artifactId>
+        <groupId>org.apache.sling.samples</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>org.apache.sling.samples.oauth.ui.apps</artifactId>
+    <packaging>content-package</packaging>
+
+    <name>Sling OAuth Demo - UI Apps</name>
+    <description>
+        This is an empty JCR Package where the JCR Content
+        can be deployed with.
+    </description>
+    <!-- NOTE:
+        For a 'not all' package this JCR Package will embedd
+        the "core" bundle. It can be deployed with the
+        "autoInstallPackage" profile.
+
+        For an 'all' package this only provides the content
+        of the project which is deployed in the root with
+        the "autoInstallAll" profile.
+
+        It is advisable to deploy any bundles or packages
+        in one manner as deploying bundles inside a package
+        and through the System Console can lead to unexpected
+        and errorneous situations.
+    -->
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.jackrabbit</groupId>
+                <artifactId>filevault-package-maven-plugin</artifactId>
+                <configuration>
+                    <filterSource>${basedir}/src/main/content/META-INF/vault/filter.xml</filterSource>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/oauth/ui.apps/src/main/content/META-INF/vault/filter.xml b/oauth/ui.apps/src/main/content/META-INF/vault/filter.xml
new file mode 100644
index 0000000..3f37a9f
--- /dev/null
+++ b/oauth/ui.apps/src/main/content/META-INF/vault/filter.xml
@@ -0,0 +1,39 @@
+<?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.
+-->
+<workspaceFilter version="1.0">
+    <!--
+        Any node that will contain customer data needs to be excluded
+        otherwise a Pacakge Installation will wipe them.
+
+        If there is a mix then all provided nodes must be included and
+        all custom nodes excluded.
+
+        If unsure what to do then go to the Composum Package Manager
+        (/bin/packages.html) and create a test package. To to the package
+        filter list and add filter entries until all of the app provides
+        nodes are included but none of the customer generatedd nodes.
+
+        Also any sub pckage of this module needs to exclude /apps/oauth-demo/install
+        folder otherwise they wipe all installed bundles.
+    -->
+    <filter root="/content/oauth-demo"/>
+    <!--
+        Need to exclude the Install folder otherwise the Bundle will be undeployed
+        as it is in the '/apps/oauth-demo/install' folder (see the 'all'
+        package).
+    -->
+    <filter root="/apps/oauth-demo">
+        <exclude pattern="/apps/oauth-demo/install/.*"/>
+    </filter>
+</workspaceFilter>
diff --git a/oauth/ui.apps/src/main/content/META-INF/vault/settings.xml b/oauth/ui.apps/src/main/content/META-INF/vault/settings.xml
new file mode 100644
index 0000000..b70c9b9
--- /dev/null
+++ b/oauth/ui.apps/src/main/content/META-INF/vault/settings.xml
@@ -0,0 +1,17 @@
+<?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.
+-->
+<vault version="1.0">
+  <ignore name=".svn"/>
+  <ignore name=".git"/>
+</vault>
diff --git a/oauth/ui.apps/src/main/content/jcr_root/apps/oauth-demo/.content.xml b/oauth/ui.apps/src/main/content/jcr_root/apps/oauth-demo/.content.xml
new file mode 100644
index 0000000..0cf5506
--- /dev/null
+++ b/oauth/ui.apps/src/main/content/jcr_root/apps/oauth-demo/.content.xml
@@ -0,0 +1,24 @@
+<?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.
+-->
+<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
+          jcr:primaryType="sling:Folder"
+          jcr:title="Sling OAuth Demo Root"
+          jcr:description="Sling OAuth Demo Apps Root folder"
+/>
\ No newline at end of file
diff --git a/oauth/ui.apps/src/main/content/jcr_root/apps/oauth-demo/install/.content.xml b/oauth/ui.apps/src/main/content/jcr_root/apps/oauth-demo/install/.content.xml
new file mode 100644
index 0000000..42debc9
--- /dev/null
+++ b/oauth/ui.apps/src/main/content/jcr_root/apps/oauth-demo/install/.content.xml
@@ -0,0 +1,23 @@
+<?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.
+-->
+<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
+          jcr:primaryType="sling:Folder"
+          jcr:title="Install Folder"
+/>
diff --git a/oauth/ui.apps/src/main/content/jcr_root/content/oauth-demo/.content.xml b/oauth/ui.apps/src/main/content/jcr_root/content/oauth-demo/.content.xml
new file mode 100644
index 0000000..2d247a2
--- /dev/null
+++ b/oauth/ui.apps/src/main/content/jcr_root/content/oauth-demo/.content.xml
@@ -0,0 +1,24 @@
+<?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.
+-->
+<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
+          jcr:primaryType="sling:Folder"
+          jcr:title="Sling OAuth Demo"
+          jcr:description="Sling OAuth Demo Content Root"
+/>
\ No newline at end of file