From commits-return-64446-archive-asf-public=cust-asf.ponee.io@sling.apache.org Sun Jan 21 23:02:55 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 4EEAA180652 for ; Sun, 21 Jan 2018 23:02:55 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3E43A160C27; Sun, 21 Jan 2018 22:02:55 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 17238160C36 for ; Sun, 21 Jan 2018 23:02:51 +0100 (CET) Received: (qmail 29682 invoked by uid 500); 21 Jan 2018 22:02:51 -0000 Mailing-List: contact commits-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list commits@sling.apache.org Received: (qmail 29673 invoked by uid 99); 21 Jan 2018 22:02:51 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Jan 2018 22:02:51 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 8005481BF3; Sun, 21 Jan 2018 22:02:49 +0000 (UTC) Date: Sun, 21 Jan 2018 22:02:50 +0000 To: "commits@sling.apache.org" Subject: [sling-whiteboard] 01/01: Added the Sling Project Archetype to the Whiteboard MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: andysch@apache.org In-Reply-To: <151657216945.7249.6457116589575072902@gitbox.apache.org> References: <151657216945.7249.6457116589575072902@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: sling-whiteboard X-Git-Refname: refs/heads/feature/sling-7276 X-Git-Reftype: branch X-Git-Rev: 429f87de491b88e277489ed11b1ee786854fc004 X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20180121220249.8005481BF3@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. andysch pushed a commit to branch feature/sling-7276 in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git commit 429f87de491b88e277489ed11b1ee786854fc004 Author: Andreas Schaefer AuthorDate: Sun Jan 21 14:00:30 2018 -0800 Added the Sling Project Archetype to the Whiteboard --- project-archetype/README.md | 78 ++++ project-archetype/build.run.and.deploy.test.sh | 58 +++ project-archetype/pom.xml | 77 ++++ .../META-INF/archetype-post-generate.groovy | 140 +++++++ .../META-INF/maven/archetype-metadata.xml | 167 +++++++++ .../.archetype-config/archetype.properties | 34 ++ .../resources/archetype-resources/README.All.md | 130 +++++++ .../resources/archetype-resources/README.NotAll.md | 90 +++++ .../main/resources/archetype-resources/all/pom.xml | 108 ++++++ .../archetype-resources/core.example/pom.xml | 177 +++++++++ .../SampleRequestModel.java | 56 +++ .../src/main/java/servlet/ByPathServlet.java | 74 ++++ .../main/java/servlet/ByResourceTypeServlet.java | 80 ++++ .../servlet/ByPathServletTest.java | 36 ++ .../resources/archetype-resources/core/pom.xml | 171 +++++++++ .../src/main/resources/archetype-resources/pom.xml | 416 +++++++++++++++++++++ .../archetype-resources/ui.apps.example/README.md | 32 ++ .../archetype-resources/ui.apps.example/pom.xml | 120 ++++++ .../src/main/content/META-INF/vault/filter.xml | 43 +++ .../src/main/content/META-INF/vault/settings.xml | 20 + .../jcr_root/apps/__appsFolderName__/.content.xml | 27 ++ .../apps/__appsFolderName__/home/.content.xml | 23 ++ .../apps/__appsFolderName__/home/body.html | 27 ++ .../apps/__appsFolderName__/home/head.html | 26 ++ .../apps/__appsFolderName__/install/.content.xml | 26 ++ .../apps/__appsFolderName__/page/.content.xml | 22 ++ .../apps/__appsFolderName__/page/body.html | 24 ++ .../apps/__appsFolderName__/page/footer.html | 22 ++ .../apps/__appsFolderName__/page/head.html | 26 ++ .../apps/__appsFolderName__/page/page.html | 38 ++ .../content/__contentFolderName__/.content.xml | 21 ++ .../__contentFolderName__/home/.content.xml | 23 ++ .../home/welcome/.content.xml | 25 ++ .../resources/archetype-resources/ui.apps/pom.xml | 120 ++++++ .../src/main/content/META-INF/vault/filter.xml | 42 +++ .../src/main/content/META-INF/vault/settings.xml | 20 + .../jcr_root/apps/__appsFolderName__/.content.xml | 27 ++ .../apps/__appsFolderName__/install/.content.xml | 26 ++ .../content/__contentFolderName__/.content.xml | 27 ++ .../resources/projects/all/archetype.properties | 35 ++ .../src/test/resources/projects/all/goal.txt | 0 .../projects/allDeleted/archetype.properties | 35 ++ .../test/resources/projects/allDeleted/goal.txt | 0 .../projects/allMerged/archetype.properties | 35 ++ .../src/test/resources/projects/allMerged/goal.txt | 0 .../resources/projects/notAll/archetype.properties | 35 ++ .../src/test/resources/projects/notAll/goal.txt | 0 .../projects/notAllDeleted/archetype.properties | 35 ++ .../test/resources/projects/notAllDeleted/goal.txt | 0 .../projects/notAllMerged/archetype.properties | 35 ++ .../test/resources/projects/notAllMerged/goal.txt | 0 51 files changed, 2909 insertions(+) diff --git a/project-archetype/README.md b/project-archetype/README.md new file mode 100644 index 0000000..3e1f1ea --- /dev/null +++ b/project-archetype/README.md @@ -0,0 +1,78 @@ +### Sling Template through Maven Archetype + +#### Introduction + +This archetype will create a Sling project that can be deployed on the Sling 10. In contrast to +the Apache Sling Maven Archetypes this one is geared towards creating a full project and not +just a single module. + +The **core** and **ui.apps** are empty Maven modules that are ready for you code. + +There are also **example** modules with the extension of **.exmaple**. Please copy whatever you +want from these module into the appropriate module. The example modules are not intended to be +installed into Sling. +Both type (regular and example) have the same structure and so you can copy them over without +any problems. + +If this archetype was generated with the **optionAll** property set to **y** then an **all** package +will be created that contains both the **core** and the **ui.apps**. This enables the developer +to easily deploy all modules in that project as a single unit (see below). + +If this archetype was generated with the **optionAll** property set to **n** then the **core** +bundle will be deployed as embedded bundle of the **ui.apps** package. + +#### Why a Separate All Package + +For a simple project that only contains one or two modules (bundle and content package) this seems +like overkill and the same can be accomplished using the ui.apps as single deployment package. + +That said for a more serious project where there are multiple bundles and content packages this +becomes difficult to handle. Not only needs one Content Package to take the role of the single +deployment package which requires it to add the other modules as dependencies. This can be confusing +and so the dedicated All content package solves that. It contains the dependencies and the logic +how to build and deploy the entire project in one step. + +#### Archetype Properties + +|Name |Description | +|:--------------------|:-----------------------------------------------------------------------------| +|groupId |Maven Group Id| +|artifactId |Maven Artifact Id| +|version |Version of your project| +|artifactName |Project Label used in the Descriptions and Module Name| +|packageGroup |Name of the Package Folder where the ui.apps is installed in (/etc/packages)| +|appsFolderName |Folder name under /apps where components etc are installed| +|contentFolderName |Folder name under /content where the content is added to| +|package |Root Package of the Java Code| +|slingModelSubPackage |Sub Package where Sling Models should be place in with no trailing dots| +|slingHostName |Host Name or IP Address of the server where Sling is hosted| +|slingPort |Port to which your Sling instance is bound to| +|optionAll |Determines if the project is created with an **all** package as single deployed unit (y/n)| +|optionExample |Determines if the examples are kept separate (s), merged into the regular modules (m) or deleted (d)| + +#### Usage + +Until this project is fully released in the public Maven Repo this is how to use it: + +* Build this project locally + + mvn clean install + +* Go to your folder where you want your generated project to be +* Generate it with: + + mvn archetype:generate -DarchetypeCatalog=local + +* Select this Archetype from a given list +* Provide the requested properties + +#### Build and Install Integration Test + +There is a simple integration test setup with this archetype. +You can run this one using the attached Unix shell script: + + sh build.run.and.deploy.test.sh + +The properties for the integration test can be found under +**/test/resources/projects/[all/notAll]/archetype.properties**. + diff --git a/project-archetype/build.run.and.deploy.test.sh b/project-archetype/build.run.and.deploy.test.sh new file mode 100755 index 0000000..98908ab --- /dev/null +++ b/project-archetype/build.run.and.deploy.test.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +# 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. + +dir=`pwd` +echo "Build the Sling Project Archetype in folder: $dir" +mvn clean install + +testFolder=$dir/target/test-classes/projects/allMerged/project/sample-test-all + +echo +echo +echo "--------------------------------------------------" +echo " Build and Deploy the All (Merged) Test Project" +echo "--------------------------------------------------" +echo +echo + +cd $testFolder +mvn clean install -P autoInstallAll + +testFolder=$dir/target/test-classes/projects/notAllMerged/project/sample-test-ui + +echo +echo +echo "---------------------------------------------------" +echo "Build and Deploy the Not All (Merged) Test Project" +echo "---------------------------------------------------" +echo +echo + +cd $testFolder +mvn clean install -P autoInstallPackage + +echo +echo +echo "------------------------------------------" +echo " Done" +echo "------------------------------------------" +echo +echo + +cd $dir diff --git a/project-archetype/pom.xml b/project-archetype/pom.xml new file mode 100644 index 0000000..2084a4e --- /dev/null +++ b/project-archetype/pom.xml @@ -0,0 +1,77 @@ + + + + 4.0.0 + + + org.apache.sling + sling-archetype-parent + 6-SNAPSHOT + + + + org.apache.sling + sling-project-archetype + 1.0.0-SNAPSHOT + maven-archetype + + Sling Project Archetype + + + + + org.apache.maven.archetype + archetype-packaging + ${archetype.version} + + + + + + + maven-archetype-plugin + 3.0.1 + + + + + + + + commons-io + commons-io + 2.4 + + + + + This archetype is creating a full Sling Project composed of + a OSGi Bundle and a Content Package which can be deployed + to the Sling using specific profiles. It also contains two shadow + folders that provide example code / files which are not part + of the default build but can be easily copied into the active modules. + + If the project was created with the **optionAll** property set + to **y** (yes) then an **All** package is created with acts as + the single deployment unit of all bundles and packages in that + project. + Otherwise the **ui.apps** package is the deployment unit. + + diff --git a/project-archetype/src/main/resources/META-INF/archetype-post-generate.groovy b/project-archetype/src/main/resources/META-INF/archetype-post-generate.groovy new file mode 100644 index 0000000..e8d3975 --- /dev/null +++ b/project-archetype/src/main/resources/META-INF/archetype-post-generate.groovy @@ -0,0 +1,140 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.util.regex.Pattern +import org.apache.commons.io.FileUtils + +def rootDir = new File(request.getOutputDirectory() + "/" + request.getArtifactId()) + +def coreBundle = new File(rootDir, "core") +def coreSrc = new File(coreBundle, "src") +def coreExampleBundle = new File(rootDir, "core.example") +def coreExampleSrc = new File(coreExampleBundle, "src") + +def uiAppsPackage = new File(rootDir, "ui.apps") +def uiAppsSrc = new File(uiAppsPackage, "src") +def uiAppsExamplePackage = new File(rootDir, "ui.apps.example") +def uiAppsExampleSrc = new File(uiAppsExamplePackage, "src") + +def uiAppsPom = new File(uiAppsPackage, "pom.xml") +def allPackage = new File(rootDir, "all") +def rootPom = new File(rootDir, "pom.xml") +def readme = new File(rootDir, "README.md") +def readmeAll = new File(rootDir, "README.All.md") +def readmeNotAll = new File(rootDir, "README.NotAll.md") + +def optionAll = request.getProperties().get("optionAll") +def optionExample = request.getProperties().get("optionExample") + + +// helper methods + +// Remove the given Module from the parent POM +def removeModule(pomFile, moduleName) { + def pattern = Pattern.compile("\\s*" + Pattern.quote(moduleName) + "", Pattern.MULTILINE) + def pomContent = pomFile.getText("UTF-8") + pomContent = pomContent.replaceAll(pattern, "") + pomFile.newWriter().withWriter { w -> + w << pomContent + } +} + +// Either remove the tag lines or the line plus the content in between +// forAll = true: removes all content between @startForNotAll@ and @endForNotAll@ +// forAll = false: emoves all content between @startForAll@ and @endForAll@ +def removeTags(pomFile, forAll) { + if(!forAll) { + // Remove all lines for Not All and remove all content inside for All + def startPattern = Pattern.compile("\\s*") + def endPattern = Pattern.compile("\\s*") + def wrapPattern = Pattern.compile("\\s*") + + def pomContent = pomFile.getText("UTF-8") + pomContent = pomContent.replaceAll(startPattern, "") + pomContent = pomContent.replaceAll(endPattern, "") + pomContent = pomContent.replaceAll(wrapPattern, "") + pomFile.newWriter().withWriter { w -> + w << pomContent + } + } else { + // Remove all lines for All and remove all content inside for Not All + def wrapPattern = Pattern.compile("\\s*") + def startPattern = Pattern.compile("\\s*") + def endPattern = Pattern.compile("\\s*") + + def pomContent = pomFile.getText("UTF-8") + pomContent = pomContent.replaceAll(wrapPattern, "") + pomContent = pomContent.replaceAll(startPattern, "") + pomContent = pomContent.replaceAll(endPattern, "") + pomFile.newWriter().withWriter { w -> + w << pomContent + } + } +} + +if(optionAll == "n") { + // Remove All Package / Module + assert allPackage.deleteDir() + removeModule(rootPom, "all") + // Remove content for 'All' and remove tag lines for Not All + removeTags(uiAppsPom, false) + // Delete the Readme.md for All + assert readmeAll.delete() + // Rename the Not For All Readme to the Readme.md file + assert readmeNotAll.renameTo(readme) +} else { + // Remove content for 'Not All' and remove tag lines for All + removeTags(uiAppsPom, true) + // Delete the Readme.md for Not All + assert readmeNotAll.delete() + // Rename the For All Readme to the Readme.md file + assert readmeAll.renameTo(readme) +} + +if(optionExample == "m") { + // Examples should be merged into the regular modules and then the example folders removed + // Delete core source folder (if exists) and then rename core example source to core source + if(coreSrc.exists()) { + FileUtils.deleteDirectory(coreSrc) + } + if(coreExampleBundle.exists()) { + assert coreExampleSrc.renameTo(coreSrc); + FileUtils.deleteDirectory(coreExampleBundle) + } + removeModule(rootPom, "core.example") + // Delete ui.apps source folder (if exists) and then rename ui.apps example source to ui.apps source + if(uiAppsSrc.exists()) { + FileUtils.deleteDirectory(uiAppsSrc) + } + if(uiAppsExamplePackage.exists()) { + assert uiAppsExampleSrc.renameTo(uiAppsSrc); + FileUtils.deleteDirectory(uiAppsExamplePackage) + } + removeModule(rootPom, "ui.apps.example") +} else if(optionExample == "d") { + // Examples should be deleted + // Remove core.example + if(coreExampleBundle.exists()) { + FileUtils.deleteDirectory(coreExampleBundle) + } + removeModule(rootPom, "core.example") + // Remove ui.apps.example + if(uiAppsExamplePackage.exists()) { + FileUtils.deleteDirectory(uiAppsExamplePackage) + } + removeModule(rootPom, "ui.apps.example") +} diff --git a/project-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/project-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000..d8fac86 --- /dev/null +++ b/project-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,167 @@ + + + + + + 1.0.0-SNAPSHOT + + + + + + + ${groupId} + + + + + + + + ${groupId} + + + + + + + + localhost + + + + 8080 + + + + n + ^(y|n)$ + + + + s + ^(s|m|d)$ + + + + + + + README.*.md + + + + + + + + + + src/main/java + + **/*.java + + + + src/test/java + + **/*.java + + + + + + + + src/main/java + + **/*.java + + + + src/test/java + + **/*.java + + + + + + + + src/main/content + + **/*.xml + **/*.html + + + + + + + + src/main/content + + **/*.xml + **/*.html + + + + + + + + + + + + + + + + + diff --git a/project-archetype/src/main/resources/archetype-resources/.archetype-config/archetype.properties b/project-archetype/src/main/resources/archetype-resources/.archetype-config/archetype.properties new file mode 100644 index 0000000..062882a --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/.archetype-config/archetype.properties @@ -0,0 +1,34 @@ +##################################################################### +# 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. +##################################################################### + +# +# This file contains all the properties you used +# to build your project from the archetype +# +package=${package} +version=${version} +groupId=${groupId} +artifactName=${artifactName} +packageGroup=${packageGroup} +appsFolderName=${appsFolderName} +contentFolderName=${contentFolderName} +slingModelSubPackage=${slingModelSubPackage} +slingHostName=${slingHostName} +slingPort=${slingPort} +optionAll=${optionAll} diff --git a/project-archetype/src/main/resources/archetype-resources/README.All.md b/project-archetype/src/main/resources/archetype-resources/README.All.md new file mode 100644 index 0000000..6c5e7ba --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/README.All.md @@ -0,0 +1,130 @@ +### 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 +three 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. **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/<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/<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**. + + + core + core.example + ui.apps + ui.apps.example + all + + +#### 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. Rmove /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. Rmove the Bundle using the OSGi Console (/system/console/bundles) + diff --git a/project-archetype/src/main/resources/archetype-resources/README.NotAll.md b/project-archetype/src/main/resources/archetype-resources/README.NotAll.md new file mode 100644 index 0000000..3e69d10 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/README.NotAll.md @@ -0,0 +1,90 @@ +### 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 Sling Project Maven Archetype which created +two 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. + +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. + +#### 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**. + + + core + core.example + ui.apps + ui.apps.example + + +#### 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. + + +#### Build and Installation + +The project is built quite simple: + + mvn clean install + +To install the OSGi bundle use the project **autoInstallBundle**: + + mvn clean install -P autoInstallBundle + +To install the Content together with the core bundle +use the project **autoInstallPackage**: + + mvn clean install -P autoInstallPackage + +##### ATTENTION + +It is probably best not to deploy the OSGi Bundle alone as this +may lead to conflicts with the package deployment. + +In case of a mishape the package and bundles needs to deinstalled +manullay: + +1. Rmove /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. Rmove the Bundle using the OSGi Console (/system/console/bundles) + diff --git a/project-archetype/src/main/resources/archetype-resources/all/pom.xml b/project-archetype/src/main/resources/archetype-resources/all/pom.xml new file mode 100644 index 0000000..b567044 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/all/pom.xml @@ -0,0 +1,108 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + 4.0.0 + + + \${rootArtifactId} + \${groupId} + \${version} + + + all + content-package + + \${artifactName} - All + \${package} - \${artifactName}: All-in-one deployment content package + + + true + + + + + \${project.groupId} + core + \${project.version} + + + \${project.groupId} + ui.apps + \${project.version} + content-package + + + + + + + org.apache.jackrabbit + filevault-package-maven-plugin + + container + /apps/\${appsFolderName}/install + + + \${project.groupId} + core + true + + + + + \${project.groupId} + ui.apps + true + + + + \${rootArtifactId}-\${artifactId} + + + + + + + + autoInstallAll + + + + io.wcm.maven.plugins + wcmio-content-package-maven-plugin + + + install-package + + install + + + + + + + + + diff --git a/project-archetype/src/main/resources/archetype-resources/core.example/pom.xml b/project-archetype/src/main/resources/archetype-resources/core.example/pom.xml new file mode 100644 index 0000000..7125281 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/core.example/pom.xml @@ -0,0 +1,177 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + 4.0.0 + + + \${rootArtifactId} + \${groupId} + \${version} + ../pom.xml + + + \${artifactId} + bundle + + \${artifactName} - Core Example + + This is the Example Module for the Sample Core module (core). + The basic idea is to have a clean 'core' module in which you + can choose what examples you want to use rather than having + to delete a bunch of examples. + + Pleaes copy examples from this module into your 'core' module + if you want it to use it in your project. The project structure + is the same and so you can copy the files from the source to + the target folder wihtout having to adjust paths or packages. + This module is not part of the Root Project's build and you can + either keep it around or you delete it if you don't need + it anymore. + + The profile to deploy the bundle is removed to avoid accidental + deployments. + + + + + + org.apache.felix + maven-bundle-plugin + true + + + *;scope=compile;inline=true + \${package}.\${slingModelSubPackage} + <_dsannotations>* + <_metatypeannotations>* + <_removeheaders> + Embed-Dependency, + Private-Package, + Include-Resource + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 7 + 7 + + + + org.apache.sling + maven-sling-plugin + + http://\${sling.host}:\${sling.port}/system/console + \${sling.user} + \${sling.password} + + + + + + + javax.servlet + javax.servlet-api + + + org.osgi + org.osgi.compendium + + + + org.osgi + org.osgi.core + + + org.osgi + osgi.annotation + + + org.osgi + org.osgi.service.component.annotations + + + org.osgi + org.osgi.service.metatype.annotations + + + + javax.jcr + jcr + + + org.apache.sling + org.apache.sling.api + + + org.apache.sling + org.apache.sling.models.api + + + org.apache.jackrabbit + jackrabbit-api + + + + org.slf4j + slf4j-api + + + + commons-lang + commons-lang + + + + junit + junit + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project-archetype/src/main/resources/archetype-resources/core.example/src/main/java/__slingModelSubPackage__/SampleRequestModel.java b/project-archetype/src/main/resources/archetype-resources/core.example/src/main/java/__slingModelSubPackage__/SampleRequestModel.java new file mode 100644 index 0000000..33c71aa --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/core.example/src/main/java/__slingModelSubPackage__/SampleRequestModel.java @@ -0,0 +1,56 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package ${package}.${slingModelSubPackage}; + +import org.apache.sling.api.SlingHttpServletRequest; +import org.apache.sling.api.resource.Resource; +import org.apache.sling.api.resource.ResourceResolver; +import org.apache.sling.models.annotations.Model; +import org.apache.sling.models.annotations.injectorspecific.SlingObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.jcr.Session; + +@Model(adaptables = {Resource.class, SlingHttpServletRequest.class}) +public class SampleRequestModel { + + private static final Logger LOGGER = LoggerFactory.getLogger(SampleRequestModel.class); + + @SlingObject + private ResourceResolver resourceResolver; + + public SampleRequestModel() { + LOGGER.trace("Model Instance created"); + } + + /** @return User Name of the Current User **/ + public String getCurrentUser() { + String answer = "No User"; + + // Adapt to a session and get the current User ID. + Session session = resourceResolver.adaptTo(Session.class); + LOGGER.trace("Found Session from Resolver: '{}'", session); + if(session != null) { + answer = session.getUserID(); + } + return answer; + } +} \ No newline at end of file diff --git a/project-archetype/src/main/resources/archetype-resources/core.example/src/main/java/servlet/ByPathServlet.java b/project-archetype/src/main/resources/archetype-resources/core.example/src/main/java/servlet/ByPathServlet.java new file mode 100644 index 0000000..44dc8b6 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/core.example/src/main/java/servlet/ByPathServlet.java @@ -0,0 +1,74 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package ${package}.servlet; + +import java.io.IOException; +import java.io.Writer; + +import javax.servlet.Servlet; +import javax.servlet.ServletException; + +import org.osgi.framework.Constants; +import org.osgi.service.component.annotations.Component; + +import org.apache.sling.api.SlingHttpServletRequest; +import org.apache.sling.api.SlingHttpServletResponse; +import org.apache.sling.api.servlets.SlingSafeMethodsServlet; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Hello World Servlet registered by path + */ +@Component( + service = Servlet.class, + property = { + Constants.SERVICE_DESCRIPTION + "=Hello World Path Servlet", + Constants.SERVICE_VENDOR + "=The Apache Software Foundation", + "sling.servlet.paths=/hello-world-servlet" + } +) +@SuppressWarnings("serial") +public class ByPathServlet extends SlingSafeMethodsServlet { + + private final Logger log = LoggerFactory.getLogger(ByPathServlet.class); + + @Override + protected void doGet(SlingHttpServletRequest request, + SlingHttpServletResponse response) throws ServletException, + IOException { + + Writer w = response.getWriter(); + w.write(""); + w.write(""); + w.write(""); + w.write("Hello World Servlet"); + w.write(""); + w.write(""); + w.write("

Hello World!

"); + w.write(""); + w.write(""); + + log.info("Hello World Servlet"); + + } + +} + diff --git a/project-archetype/src/main/resources/archetype-resources/core.example/src/main/java/servlet/ByResourceTypeServlet.java b/project-archetype/src/main/resources/archetype-resources/core.example/src/main/java/servlet/ByResourceTypeServlet.java new file mode 100644 index 0000000..cde87c9 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/core.example/src/main/java/servlet/ByResourceTypeServlet.java @@ -0,0 +1,80 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package ${package}.servlet; + +import java.io.IOException; +import java.io.Writer; + +import javax.servlet.Servlet; +import javax.servlet.ServletException; + +import org.osgi.framework.Constants; +import org.osgi.service.component.annotations.Component; + +import org.apache.sling.api.resource.Resource; +import org.apache.sling.api.SlingHttpServletRequest; +import org.apache.sling.api.SlingHttpServletResponse; +import org.apache.sling.api.servlets.SlingSafeMethodsServlet; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Hello World Servlet registered by resource type + */ +@Component( + service = Servlet.class, + property = { + Constants.SERVICE_DESCRIPTION + "=Hello World Path Servlet", + Constants.SERVICE_VENDOR + "=The Apache Software Foundation", + "sling.servlet.resourceTypes=sling/servlet/default", + "sling.servlet.selectors=hello", + "sling.servlet.extensions=html", + } +) +@SuppressWarnings("serial") +public class ByResourceTypeServlet extends SlingSafeMethodsServlet { + + private final Logger log = LoggerFactory.getLogger(ByResourceTypeServlet.class); + + @Override + protected void doGet(SlingHttpServletRequest request, + SlingHttpServletResponse response) throws ServletException, + IOException { + Resource resource = request.getResource(); + + Writer w = response.getWriter(); + w.write(""); + w.write(""); + w.write(""); + w.write("Hello World Servlet"); + w.write(""); + w.write(""); + w.write("

Hello "); + w.write(resource.getPath()); + w.write("

"); + w.write(""); + w.write(""); + + log.info("Hello World Servlet"); + + } + +} + diff --git a/project-archetype/src/main/resources/archetype-resources/core.example/src/test/java/__packageInPathFormat__/servlet/ByPathServletTest.java b/project-archetype/src/main/resources/archetype-resources/core.example/src/test/java/__packageInPathFormat__/servlet/ByPathServletTest.java new file mode 100644 index 0000000..91cfe03 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/core.example/src/test/java/__packageInPathFormat__/servlet/ByPathServletTest.java @@ -0,0 +1,36 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with this + * work for additional information regarding copyright ownership. The ASF + * licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package ${package}.servlet; + +import junit.framework.TestCase; + +/** + * Unit test for By Path Servlet. + */ +public class ByPathServletTest extends TestCase { + + /** + * Rigourous Test :-) + */ + public void testByPathServlet() { + assertTrue(true); + } + +} diff --git a/project-archetype/src/main/resources/archetype-resources/core/pom.xml b/project-archetype/src/main/resources/archetype-resources/core/pom.xml new file mode 100644 index 0000000..8a81b01 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/core/pom.xml @@ -0,0 +1,171 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + 4.0.0 + + + \${rootArtifactId} + \${groupId} + \${version} + ../pom.xml + + + \${artifactId} + bundle + + \${artifactName} - Core + + 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). + + + + + + org.apache.felix + maven-bundle-plugin + true + + + *;scope=compile;inline=true + \${package}.\${slingModelSubPackage} + <_dsannotations>* + <_metatypeannotations>* + <_removeheaders> + Embed-Dependency, + Private-Package, + Include-Resource + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 7 + 7 + + + + org.apache.sling + maven-sling-plugin + + http://\${sling.host}:\${sling.port}/system/console + \${sling.user} + \${sling.password} + + + + + + + javax.servlet + javax.servlet-api + + + org.osgi + org.osgi.compendium + + + + org.osgi + org.osgi.core + + + org.osgi + osgi.annotation + + + org.osgi + org.osgi.service.component.annotations + + + org.osgi + org.osgi.service.metatype.annotations + + + + javax.jcr + jcr + + + org.apache.sling + org.apache.sling.api + + + org.apache.sling + org.apache.sling.models.api + + + org.apache.jackrabbit + jackrabbit-api + + + + org.slf4j + slf4j-api + + + + commons-lang + commons-lang + + + + junit + junit + + + + + + + autoInstallBundle + + + + org.apache.sling + maven-sling-plugin + + + install-bundle + + install + + + + + + + + + diff --git a/project-archetype/src/main/resources/archetype-resources/pom.xml b/project-archetype/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000..0e7369d --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,416 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + 4.0.0 + + \${groupId} + \${rootArtifactId} + \${version} + pom + + \${artifactName} Parent POM + + + + + \${slingHostName} + \${slingPort} + admin + + admin + UTF-8 + UTF-8 + + 2.5.3 + 3.0.1 + 3.0.2 + 3.0.2 + 1.4.1 + 3.6.1 + 2.5.4 + 3.0.0 + 2.5.2 + 2.20 + 2.20 + 2.8.2 + 2.3.2 + 3.0.0 + 3.0.0 + 1.6.0 + 1.0.0 + + 1.3.6 + 3.0.2 + 1.3.8 + 2.4.0 + 2.14.4 + 2.6 + 2.8.2 + + + + + + + org.apache.maven.plugins + maven-release-plugin + + [maven-scm] : + clean install + install + release + + + + + org.apache.maven.plugins + maven-source-plugin + true + + + + org.apache.maven.plugins + maven-resources-plugin + + UTF-8 + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-maven + + enforce + + + + + Project must be built with Maven 3.1.0 or higher + [3.1.0,) + + + Project must be compiled with Java 7 or higher + 1.7.0 + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${archetype.java.version} + ${archetype.java.version} + UTF-8 + + + + + + + + maven-release-plugin + ${release.plugin.version} + + + + maven-source-plugin + ${source.plugin.version} + + + + org.apache.maven.plugins + maven-resources-plugin + ${resource.plugin.version} + + + + org.apache.maven.plugins + maven-jar-plugin + ${jar.plugin.version} + + + + maven-enforcer-plugin + ${enforcer.plugin.version} + + + + maven-compiler-plugin + ${compiler.plugin.version} + + + + + org.apache.maven.plugins + maven-clean-plugin + ${clean.plugin.version} + + + + org.apache.maven.plugins + maven-install-plugin + ${installer.plugin.version} + + + + org.apache.maven.plugins + maven-surefire-plugin + ${surfire.plugin.version} + + + + org.apache.maven.plugins + maven-failsafe-plugin + ${failsafe.plugin.version} + + + + org.apache.maven.plugins + maven-deploy-plugin + ${deploy.plugin.version} + + + + org.apache.sling + maven-sling-plugin + ${sling.plugin.version} + + + + org.apache.jackrabbit + filevault-package-maven-plugin + ${filevault-package.plugin.version} + true + + true + true + \${packageGroup} + + + + io.wcm.maven.plugins + wcmio-content-package-maven-plugin + ${vcmio.plugin.version} + + http://${sling.host}:${sling.port}/bin/cpm/ + ${sling.user} + ${sling.password} + true + true + \${packageGroup} + + + + + org.apache.felix + maven-bundle-plugin + ${bundle.plugin.version} + true + + + + org.apache.maven.plugins + maven-dependency-plugin + ${dependency.plugin.version} + + + + org.codehaus.mojo + build-helper-maven-plugin + ${build.helper.plugin.version} + + + + + + + + + + + + + + org.osgi + org.osgi.core + 6.0.0 + provided + + + + + org.osgi + osgi.annotation + 6.0.1 + provided + + + + + org.osgi + org.osgi.service.component.annotations + 1.3.0 + provided + + + org.osgi + org.osgi.service.metatype.annotations + 1.3.0 + provided + + + + org.osgi + org.osgi.compendium + 4.2.0 + provided + + + + + javax.servlet + javax.servlet-api + 3.1.0 + provided + + + + + javax.inject + javax.inject + 1 + provided + + + + + javax.jcr + jcr + 2.0 + provided + + + + + org.slf4j + slf4j-api + ${slf4japi.version} + provided + + + + com.google.code.findbugs + jsr305 + ${jsr305.version} + provided + + + + + org.apache.sling + org.apache.sling.api + ${slingapi.version} + provided + + + org.apache.sling + org.apache.sling.settings + ${sling.settings.version} + provided + + + org.apache.sling + org.apache.sling.commons.osgi + ${sling.commons.osgi.version} + provided + + + org.apache.sling + org.apache.sling.models.api + ${sling.models.api.version} + provided + + + org.apache.jackrabbit + jackrabbit-api + ${jackrabbit-api.version} + provided + + + + + commons-lang + commons-lang + ${commons-lang.version} + + + + + junit + junit + ${junit.version} + test + + + org.jmock + jmock-junit4 + ${jmock-junit4.version} + test + + + org.slf4j + slf4j-simple + ${slf4japi.version} + test + + + + diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps.example/README.md b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/README.md new file mode 100644 index 0000000..01c4a48 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/README.md @@ -0,0 +1,32 @@ +### ui.apps Example + +#### 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 is a Content Package rather than an OSGi Content Bundle meaning +that JCR Nodes are described with **.content.xml** files rather than with +**.json** files. This example provides a content node home page together +with the Home and Page resource type HTML code. + +#### Dependencies + +This content package depends on the Sling Model **SampleRequestModel** +from the **core.example**. \ No newline at end of file diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps.example/pom.xml b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/pom.xml new file mode 100644 index 0000000..dd9d029 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/pom.xml @@ -0,0 +1,120 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + 4.0.0 + + + \${rootArtifactId} + \${groupId} + \${version} + + + \${artifactId} + content-package + + \${artifactName} - UI Apps Example + + This is the Example Module for the Sample UI Apps module (ui.apps). + The basic idea is to have a clean 'ui.apps' module in which you + can choose what examples you want to use rather than having + to delete a bunch of examples. + + Pleaes copy examples from this module into your 'ui.apps' module + if you want it to use it in your project. The project structure + is the same and so you can copy the files from the source to + the target folder wihtout having to adjust paths or packages. + This module is not part of the Root Project's build and you can + either keep it around or you delete it if you don't need + it anymore. + + The profile to deploy the bundle is removed to avoid accidental + deployments. + + + + + + \${project.groupId} + core + \${project.version} + + + + + + + + org.apache.jackrabbit + filevault-package-maven-plugin + + \${basedir}/src/main/content/META-INF/vault/filter.xml + + + + + package + + + + /apps/\${appsFolderName}/install + + + \${project.groupId} + core + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/META-INF/vault/filter.xml b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/META-INF/vault/filter.xml new file mode 100644 index 0000000..8b0461e --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/META-INF/vault/filter.xml @@ -0,0 +1,43 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + + + + + + + diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/META-INF/vault/settings.xml b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/META-INF/vault/settings.xml new file mode 100644 index 0000000..3424413 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/META-INF/vault/settings.xml @@ -0,0 +1,20 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + + diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/.content.xml b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/.content.xml new file mode 100644 index 0000000..8f9da39 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/.content.xml @@ -0,0 +1,27 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/home/.content.xml b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/home/.content.xml new file mode 100644 index 0000000..9dcbf39 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/home/.content.xml @@ -0,0 +1,23 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/home/body.html b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/home/body.html new file mode 100644 index 0000000..aa6ce9d --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/home/body.html @@ -0,0 +1,27 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + +

${symbol_dollar}{properties.jcr:title}

+

${artifactName} Home Page from Sling Project Archetype

+

Description: ${symbol_dollar}{properties.jcr:description}

+
+

Current User: ${symbol_dollar}{sampleRequest.currentUser}

+
diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/home/head.html b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/home/head.html new file mode 100644 index 0000000..cbf8586 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/home/head.html @@ -0,0 +1,26 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + +${artifactName} Home Page + \ No newline at end of file diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/install/.content.xml b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/install/.content.xml new file mode 100644 index 0000000..5f7ce25 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/install/.content.xml @@ -0,0 +1,26 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/page/.content.xml b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/page/.content.xml new file mode 100644 index 0000000..5b4a278 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/page/.content.xml @@ -0,0 +1,22 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/page/body.html b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/page/body.html new file mode 100644 index 0000000..7741f7a --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/page/body.html @@ -0,0 +1,24 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + +

${symbol_dollar}{properties.jcr:title}

+

${artifactName} Page from Sling Project Archetype

+

Description: ${symbol_dollar}{properties.jcr:description}

\ No newline at end of file diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/page/footer.html b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/page/footer.html new file mode 100644 index 0000000..b1c2e6b --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/page/footer.html @@ -0,0 +1,22 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + +${artifactName} Footer diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/page/head.html b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/page/head.html new file mode 100644 index 0000000..0dd5a53 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/page/head.html @@ -0,0 +1,26 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + +${artifactName} Page + \ No newline at end of file diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/page/page.html b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/page/page.html new file mode 100644 index 0000000..b0d2d52 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/apps/__appsFolderName__/page/page.html @@ -0,0 +1,38 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + + + +

Navigation

+ +
+ +
+ +
+ + diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/content/__contentFolderName__/.content.xml b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/content/__contentFolderName__/.content.xml new file mode 100644 index 0000000..0b21be7 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/content/__contentFolderName__/.content.xml @@ -0,0 +1,21 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/content/__contentFolderName__/home/.content.xml b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/content/__contentFolderName__/home/.content.xml new file mode 100644 index 0000000..ddda733 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/content/__contentFolderName__/home/.content.xml @@ -0,0 +1,23 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/content/__contentFolderName__/home/welcome/.content.xml b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/content/__contentFolderName__/home/welcome/.content.xml new file mode 100644 index 0000000..acdc0f8 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps.example/src/main/content/jcr_root/content/__contentFolderName__/home/welcome/.content.xml @@ -0,0 +1,25 @@ + + + diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps/pom.xml b/project-archetype/src/main/resources/archetype-resources/ui.apps/pom.xml new file mode 100644 index 0000000..1a10ede --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps/pom.xml @@ -0,0 +1,120 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + 4.0.0 + + + \${rootArtifactId} + \${groupId} + \${version} + + + \${artifactId} + content-package + + \${artifactName} - UI Apps + + This is an empty JCR Package where the JCR Content + can be deployed with. + + 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. + + + + + + \${project.groupId} + core + \${project.version} + + + + + + + + org.apache.jackrabbit + filevault-package-maven-plugin + + \${basedir}/src/main/content/META-INF/vault/filter.xml + + + + + package + + + + /apps/\${appsFolderName}/install + + + \${project.groupId} + core + true + + + + + + + + + + + + + + autoInstallPackage + + + + io.wcm.maven.plugins + wcmio-content-package-maven-plugin + + + install-package + + install + + + + + + + + + + diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps/src/main/content/META-INF/vault/filter.xml b/project-archetype/src/main/resources/archetype-resources/ui.apps/src/main/content/META-INF/vault/filter.xml new file mode 100644 index 0000000..207c148 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps/src/main/content/META-INF/vault/filter.xml @@ -0,0 +1,42 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + + + + + + diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps/src/main/content/META-INF/vault/settings.xml b/project-archetype/src/main/resources/archetype-resources/ui.apps/src/main/content/META-INF/vault/settings.xml new file mode 100644 index 0000000..3424413 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps/src/main/content/META-INF/vault/settings.xml @@ -0,0 +1,20 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + + diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps/src/main/content/jcr_root/apps/__appsFolderName__/.content.xml b/project-archetype/src/main/resources/archetype-resources/ui.apps/src/main/content/jcr_root/apps/__appsFolderName__/.content.xml new file mode 100644 index 0000000..7155879 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps/src/main/content/jcr_root/apps/__appsFolderName__/.content.xml @@ -0,0 +1,27 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + \ No newline at end of file diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps/src/main/content/jcr_root/apps/__appsFolderName__/install/.content.xml b/project-archetype/src/main/resources/archetype-resources/ui.apps/src/main/content/jcr_root/apps/__appsFolderName__/install/.content.xml new file mode 100644 index 0000000..5f7ce25 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps/src/main/content/jcr_root/apps/__appsFolderName__/install/.content.xml @@ -0,0 +1,26 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + diff --git a/project-archetype/src/main/resources/archetype-resources/ui.apps/src/main/content/jcr_root/content/__contentFolderName__/.content.xml b/project-archetype/src/main/resources/archetype-resources/ui.apps/src/main/content/jcr_root/content/__contentFolderName__/.content.xml new file mode 100644 index 0000000..1abc513 --- /dev/null +++ b/project-archetype/src/main/resources/archetype-resources/ui.apps/src/main/content/jcr_root/content/__contentFolderName__/.content.xml @@ -0,0 +1,27 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + \ No newline at end of file diff --git a/project-archetype/src/test/resources/projects/all/archetype.properties b/project-archetype/src/test/resources/projects/all/archetype.properties new file mode 100644 index 0000000..b408de5 --- /dev/null +++ b/project-archetype/src/test/resources/projects/all/archetype.properties @@ -0,0 +1,35 @@ +##################################################################### +# 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. +##################################################################### + +# +# Test Project Configuration +# +package=org.apache.sling.all +version=1.0.0-SNAPSHOT +groupId=org.apache.sling.all.group +artifactId=sample-test-all +artifactName=Sample Test All +packageGroup=org.apache.sling.all.install +appsFolderName=testAppsAll +contentFolderName=testContentAll +slingModelSubPackage=testModelAll +slingHostName=localhost +slingPort=8080 +optionAll=y +optionExample=s \ No newline at end of file diff --git a/project-archetype/src/test/resources/projects/all/goal.txt b/project-archetype/src/test/resources/projects/all/goal.txt new file mode 100644 index 0000000..e69de29 diff --git a/project-archetype/src/test/resources/projects/allDeleted/archetype.properties b/project-archetype/src/test/resources/projects/allDeleted/archetype.properties new file mode 100644 index 0000000..3005eaf --- /dev/null +++ b/project-archetype/src/test/resources/projects/allDeleted/archetype.properties @@ -0,0 +1,35 @@ +##################################################################### +# 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. +##################################################################### + +# +# Test Project Configuration +# +package=org.apache.sling.all +version=1.0.0-SNAPSHOT +groupId=org.apache.sling.all.group +artifactId=sample-test-all +artifactName=Sample Test All +packageGroup=org.apache.sling.all.install +appsFolderName=testAppsAll +contentFolderName=testContentAll +slingModelSubPackage=testModelAll +slingHostName=localhost +slingPort=8080 +optionAll=y +optionExample=d \ No newline at end of file diff --git a/project-archetype/src/test/resources/projects/allDeleted/goal.txt b/project-archetype/src/test/resources/projects/allDeleted/goal.txt new file mode 100644 index 0000000..e69de29 diff --git a/project-archetype/src/test/resources/projects/allMerged/archetype.properties b/project-archetype/src/test/resources/projects/allMerged/archetype.properties new file mode 100644 index 0000000..f7ee987 --- /dev/null +++ b/project-archetype/src/test/resources/projects/allMerged/archetype.properties @@ -0,0 +1,35 @@ +##################################################################### +# 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. +##################################################################### + +# +# Test Project Configuration +# +package=org.apache.sling.all +version=1.0.0-SNAPSHOT +groupId=org.apache.sling.all.group +artifactId=sample-test-all +artifactName=Sample Test All +packageGroup=org.apache.sling.all.install +appsFolderName=testAppsAll +contentFolderName=testContentAll +slingModelSubPackage=testModelAll +slingHostName=localhost +slingPort=8080 +optionAll=y +optionExample=m \ No newline at end of file diff --git a/project-archetype/src/test/resources/projects/allMerged/goal.txt b/project-archetype/src/test/resources/projects/allMerged/goal.txt new file mode 100644 index 0000000..e69de29 diff --git a/project-archetype/src/test/resources/projects/notAll/archetype.properties b/project-archetype/src/test/resources/projects/notAll/archetype.properties new file mode 100644 index 0000000..3c15d8a --- /dev/null +++ b/project-archetype/src/test/resources/projects/notAll/archetype.properties @@ -0,0 +1,35 @@ +##################################################################### +# 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. +##################################################################### + +# +# Test Project Configuration +# +package=org.apache.sling.ui +version=1.0.0-SNAPSHOT +groupId=org.apache.sling.ui.group +artifactId=sample-test-ui +artifactName=Sample Test UI +packageGroup=org.apache.sling.ui.install +appsFolderName=testAppsUI +contentFolderName=testContentUI +slingModelSubPackage=testModelUI +slingHostName=localhost +slingPort=8080 +optionAll=n +optionExample=s \ No newline at end of file diff --git a/project-archetype/src/test/resources/projects/notAll/goal.txt b/project-archetype/src/test/resources/projects/notAll/goal.txt new file mode 100644 index 0000000..e69de29 diff --git a/project-archetype/src/test/resources/projects/notAllDeleted/archetype.properties b/project-archetype/src/test/resources/projects/notAllDeleted/archetype.properties new file mode 100644 index 0000000..d814e01 --- /dev/null +++ b/project-archetype/src/test/resources/projects/notAllDeleted/archetype.properties @@ -0,0 +1,35 @@ +##################################################################### +# 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. +##################################################################### + +# +# Test Project Configuration +# +package=org.apache.sling.ui +version=1.0.0-SNAPSHOT +groupId=org.apache.sling.ui.group +artifactId=sample-test-ui +artifactName=Sample Test UI +packageGroup=org.apache.sling.ui.install +appsFolderName=testAppsUI +contentFolderName=testContentUI +slingModelSubPackage=testModelUI +slingHostName=localhost +slingPort=8080 +optionAll=n +optionExample=d \ No newline at end of file diff --git a/project-archetype/src/test/resources/projects/notAllDeleted/goal.txt b/project-archetype/src/test/resources/projects/notAllDeleted/goal.txt new file mode 100644 index 0000000..e69de29 diff --git a/project-archetype/src/test/resources/projects/notAllMerged/archetype.properties b/project-archetype/src/test/resources/projects/notAllMerged/archetype.properties new file mode 100644 index 0000000..0b0d291 --- /dev/null +++ b/project-archetype/src/test/resources/projects/notAllMerged/archetype.properties @@ -0,0 +1,35 @@ +##################################################################### +# 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. +##################################################################### + +# +# Test Project Configuration +# +package=org.apache.sling.ui +version=1.0.0-SNAPSHOT +groupId=org.apache.sling.ui.group +artifactId=sample-test-ui +artifactName=Sample Test UI +packageGroup=org.apache.sling.ui.install +appsFolderName=testAppsUI +contentFolderName=testContentUI +slingModelSubPackage=testModelUI +slingHostName=localhost +slingPort=8080 +optionAll=n +optionExample=m \ No newline at end of file diff --git a/project-archetype/src/test/resources/projects/notAllMerged/goal.txt b/project-archetype/src/test/resources/projects/notAllMerged/goal.txt new file mode 100644 index 0000000..e69de29 -- To stop receiving notification emails like this one, please contact "commits@sling.apache.org" .