diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..daec3189 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "maven" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index 04675059..33879bd8 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -8,6 +8,7 @@ on: - master - experimental/** pull_request: + types: [opened, synchronize, reopened] branches-ignore: - master - experimental/** @@ -19,33 +20,18 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ ubuntu-latest ] - java: [8, 11] + java: [11, 17] + os: [ubuntu-latest] + distribution: [temurin] steps: - # Check out Git repository - - name: Checkout code - uses: actions/checkout@v2 - - # Set up environment with Java and Maven - - name: Setup JDK - uses: actions/setup-java@v1 + - name: Maven Build with SonarCloud + uses: wcm-io-devops/github-action-maven-build-sonar@v1 with: + os: ${{ matrix.os }} java-version: ${{ matrix.java }} - - # Set up dependency cache - - name: Cache local Maven repository - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - # Build & verify - - name: Build and verify - run: ./mvnw -s ./.maven-settings.xml -Pcontinuous-integration -B -U clean verify - - # Run code coverage check - - name: Run code coverage check - run: bash <(curl -s https://codecov.io/bash) + maven-executable: ./mvnw + sonar-run-on-os: ubuntu-latest + sonar-run-on-java-version: 11 + sonar-token: ${{ secrets.SONAR_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/maven-deploy.yml b/.github/workflows/maven-deploy.yml index 33d3373e..aef0ee48 100644 --- a/.github/workflows/maven-deploy.yml +++ b/.github/workflows/maven-deploy.yml @@ -1,4 +1,4 @@ -# Deploy snapshots to Sonatpe OSS repository and deploy site to GitHub Pages +# Deploy snapshots to Sonatype OSS repository and deploy site to GitHub Pages name: Deploy @@ -14,39 +14,27 @@ jobs: runs-on: ubuntu-latest steps: - # Check out Git repository - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - # Configure GIT - name: Configure GIT run: | git config --global user.email "${{ secrets.GH_SITE_DEPLOY_EMAIL }}" git config --global user.name "${{ secrets.GH_SITE_DEPLOY_NAME }}" - # Set up environment with Java and Maven - name: Setup JDK - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: - java-version: 1.8 + distribution: temurin + java-version: 11 + cache: maven - # Set up dependency cache - - name: Cache local Maven repository - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - # Build, deploy to ossrh, generate and stage site - name: Build, verify, deploy, generate site env: SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} run: ./mvnw -s ./.maven-settings.xml -Pcontinuous-integration -B -U clean deploy site - # Deploy site to Github Pages - name: Stage and deploy site run: > ./mvnw -s ./.maven-settings.xml -Pcontinuous-integration -B site:stage scm-publish:publish-scm diff --git a/.github/workflows/release-from-tag.yml b/.github/workflows/release-from-tag.yml new file mode 100644 index 00000000..e8218800 --- /dev/null +++ b/.github/workflows/release-from-tag.yml @@ -0,0 +1,19 @@ +name: Release from Tag + +on: + push: + tags: + - '*' + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + - uses: ncipollo/release-action@v1 + with: + body: 'Changes: https://wcm.io/samples/changes-report.html' + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.maven-settings.xml b/.maven-settings.xml index bfd6a096..fb12e792 100644 --- a/.maven-settings.xml +++ b/.maven-settings.xml @@ -42,19 +42,6 @@ - - wcm-io-apache-intermediate-release - https://wcm.io/maven/repositories/apache-intermediate-release - default - - true - never - - - false - - - oss-snapshots https://oss.sonatype.org/content/repositories/snapshots @@ -98,19 +85,6 @@ - - wcm-io-apache-intermediate-release - https://wcm.io/maven/repositories/apache-intermediate-release - default - - true - never - - - false - - - oss-snapshots https://oss.sonatype.org/content/repositories/snapshots diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java deleted file mode 100644 index b901097f..00000000 --- a/.mvn/wrapper/MavenWrapperDownloader.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2007-present the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import java.net.*; -import java.io.*; -import java.nio.channels.*; -import java.util.Properties; - -public class MavenWrapperDownloader { - - private static final String WRAPPER_VERSION = "0.5.6"; - /** - * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. - */ - private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" - + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; - - /** - * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to - * use instead of the default one. - */ - private static final String MAVEN_WRAPPER_PROPERTIES_PATH = - ".mvn/wrapper/maven-wrapper.properties"; - - /** - * Path where the maven-wrapper.jar will be saved to. - */ - private static final String MAVEN_WRAPPER_JAR_PATH = - ".mvn/wrapper/maven-wrapper.jar"; - - /** - * Name of the property which should be used to override the default download url for the wrapper. - */ - private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; - - public static void main(String args[]) { - System.out.println("- Downloader started"); - File baseDirectory = new File(args[0]); - System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); - - // If the maven-wrapper.properties exists, read it and check if it contains a custom - // wrapperUrl parameter. - File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); - String url = DEFAULT_DOWNLOAD_URL; - if(mavenWrapperPropertyFile.exists()) { - FileInputStream mavenWrapperPropertyFileInputStream = null; - try { - mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); - Properties mavenWrapperProperties = new Properties(); - mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); - url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); - } catch (IOException e) { - System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); - } finally { - try { - if(mavenWrapperPropertyFileInputStream != null) { - mavenWrapperPropertyFileInputStream.close(); - } - } catch (IOException e) { - // Ignore ... - } - } - } - System.out.println("- Downloading from: " + url); - - File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); - if(!outputFile.getParentFile().exists()) { - if(!outputFile.getParentFile().mkdirs()) { - System.out.println( - "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); - } - } - System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); - try { - downloadFileFromURL(url, outputFile); - System.out.println("Done"); - System.exit(0); - } catch (Throwable e) { - System.out.println("- Error downloading"); - e.printStackTrace(); - System.exit(1); - } - } - - private static void downloadFileFromURL(String urlString, File destination) throws Exception { - if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { - String username = System.getenv("MVNW_USERNAME"); - char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); - Authenticator.setDefault(new Authenticator() { - @Override - protected PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(username, password); - } - }); - } - URL website = new URL(urlString); - ReadableByteChannel rbc; - rbc = Channels.newChannel(website.openStream()); - FileOutputStream fos = new FileOutputStream(destination); - fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); - fos.close(); - rbc.close(); - } - -} diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar index 2cc7d4a5..c1dd12f1 100644 Binary files a/.mvn/wrapper/maven-wrapper.jar and b/.mvn/wrapper/maven-wrapper.jar differ diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index ffdc10e5..8c79a83a 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,2 +1,18 @@ -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar +# 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. +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar diff --git a/README.md b/README.md index 03479078..adc75f5f 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ wcm.io Samples ====== -[![Build](https://github.com/wcm-io/wcm-io-samples/workflows/Build/badge.svg?branch=develop)](https://github.com/wcm-io/wcm-io-samples/actions?query=workflow%3ABuild+branch%3Adevelop) -[![Code Coverage](https://codecov.io/gh/wcm-io/wcm-io-samples/branch/develop/graph/badge.svg)](https://codecov.io/gh/wcm-io/wcm-io-samples) +[![Build](https://github.com/wcm-io/io.wcm.samples/workflows/Build/badge.svg?branch=develop)](https://github.com/wcm-io/io.wcm.samples/actions?query=workflow%3ABuild+branch%3Adevelop) +[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=wcm-io_io.wcm.samples&metric=coverage)](https://sonarcloud.io/summary/new_code?id=wcm-io_io.wcm.samples) Sample projects and applications to demonstrate and test wcm.io features. Documentation: https://wcm.io/samples/
-Issues: https://wcm-io.atlassian.net/browse/WSAM
+Issues: https://github.com/wcm-io/io.wcm.samples/issues
Wiki: https://wcm-io.atlassian.net/wiki/
-Continuous Integration: https://github.com/wcm-io/wcm-io-samples/actions
+Continuous Integration: https://github.com/wcm-io/io.wcm.samples/actions
Commercial support: https://wcm.io/commercial-support.html @@ -16,9 +16,9 @@ Commercial support: https://wcm.io/commercial-support.html If you want to build wcm.io from sources make sure you have configured all [Maven Repositories](https://wcm.io/maven.html) in your settings.xml. -See [Maven Settings](https://github.com/wcm-io/wcm-io-samples/blob/develop/.maven-settings.xml) for an example with a full configuration. +See [Maven Settings](https://github.com/wcm-io/io.wcm.samples/blob/develop/.maven-settings.xml) for an example with a full configuration. -- Clone the github repository https://github.com/wcm-io/wcm-io-samples +- Clone the github repository https://github.com/wcm-io/io.wcm.samples - Start an AEM author instance at http://localhost:4502 - Execute deploy script `build-deploy.sh` to deploy the application and sample content and configuration to the instance. - Open http://localhost:4502/editor.html/content/wcm-io-samples/en.html in your browser @@ -26,5 +26,5 @@ See [Maven Settings](https://github.com/wcm-io/wcm-io-samples/blob/develop/.mave ### System requirements -- AEM 6.5 or AEMaaCS -- JDK 1.8 or Java 11 +- AEM 6.5.7+ or AEMaaCS SDK +- Java 11 diff --git a/build-deploy_aem65.sh b/build-deploy_aem65.sh new file mode 100644 index 00000000..3842e941 --- /dev/null +++ b/build-deploy_aem65.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# #%L +# wcm.io +# %% +# Copyright (C) 2021 wcm.io +# %% +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# #L% + + +SLING_URL="http://localhost:45025" + +if [[ $0 == *":\\"* ]]; then + DISPLAY_PAUSE_MESSAGE=true +fi + +if [ "$?" -ne "0" ]; then + exit +fi + +./build-deploy.sh --sling.url=${SLING_URL} --display.pause.message=${DISPLAY_PAUSE_MESSAGE} "$@" diff --git a/bundles/clientlibs/pom.xml b/bundles/clientlibs/pom.xml index 76cdc59f..e11b0849 100644 --- a/bundles/clientlibs/pom.xml +++ b/bundles/clientlibs/pom.xml @@ -25,13 +25,13 @@ io.wcm.samples io.wcm.samples.parent - 1.4.0 + 1.4.2 ../../parent/pom.xml io.wcm.samples io.wcm.samples.clientlibs - 1.4.0 + 1.4.2 jar Sample Application Clientlibs diff --git a/bundles/core/pom.xml b/bundles/core/pom.xml index ca0e204f..937d346c 100644 --- a/bundles/core/pom.xml +++ b/bundles/core/pom.xml @@ -25,13 +25,13 @@ io.wcm.samples io.wcm.samples.parent - 1.4.0 + 1.4.2 ../../parent/pom.xml io.wcm.samples io.wcm.samples.core - 1.4.0 + 1.4.2 jar Sample Application @@ -155,19 +155,6 @@ com.adobe.aem uber-jar - apis - provided - - - org.apache.geronimo.specs - geronimo-atinject_1.0_spec - provided - - - - - org.apache.geronimo.specs - geronimo-annotation_1.3_spec provided diff --git a/bundles/core/src/main/java/io/wcm/samples/core/business/navigation/impl/NavigationManagerImpl.java b/bundles/core/src/main/java/io/wcm/samples/core/business/navigation/impl/NavigationManagerImpl.java index 7b5981d9..381f732a 100644 --- a/bundles/core/src/main/java/io/wcm/samples/core/business/navigation/impl/NavigationManagerImpl.java +++ b/bundles/core/src/main/java/io/wcm/samples/core/business/navigation/impl/NavigationManagerImpl.java @@ -174,10 +174,8 @@ private List createChildItemsRecursively(final Page parentPa @Override public NavigationPageItem create(final Page pPage) { NavigationPageItem item = itemCreator.create(pPage); - if (item != null) { - if (level < maxLevels) { - item.setChildren(createChildItemsRecursively(pPage, itemCreator, level + 1, maxLevels)); - } + if (item != null && level < maxLevels) { + item.setChildren(createChildItemsRecursively(pPage, itemCreator, level + 1, maxLevels)); } return item; } diff --git a/bundles/core/src/main/java/io/wcm/samples/core/config/AppTemplate.java b/bundles/core/src/main/java/io/wcm/samples/core/config/AppTemplate.java index d3e9290d..32a0cede 100644 --- a/bundles/core/src/main/java/io/wcm/samples/core/config/AppTemplate.java +++ b/bundles/core/src/main/java/io/wcm/samples/core/config/AppTemplate.java @@ -56,11 +56,6 @@ public enum AppTemplate implements TemplatePathInfo { this.resourceType = Template.getResourceTypeFromTemplatePath(templatePath); } - AppTemplate(String templatePath, String resourceType) { - this.templatePath = templatePath; - this.resourceType = resourceType; - } - /** * Template path * @return Path diff --git a/bundles/core/src/main/java/io/wcm/samples/core/config/impl/LinkHandlerConfigImpl.java b/bundles/core/src/main/java/io/wcm/samples/core/config/impl/LinkHandlerConfigImpl.java index 6c9ab7d0..2df84a7d 100644 --- a/bundles/core/src/main/java/io/wcm/samples/core/config/impl/LinkHandlerConfigImpl.java +++ b/bundles/core/src/main/java/io/wcm/samples/core/config/impl/LinkHandlerConfigImpl.java @@ -27,7 +27,6 @@ import org.osgi.service.component.annotations.Component; import com.day.cq.wcm.api.Page; -import com.google.common.collect.ImmutableList; import io.wcm.handler.link.spi.LinkHandlerConfig; import io.wcm.handler.link.spi.LinkType; @@ -44,7 +43,7 @@ @Component(service = LinkHandlerConfig.class) public class LinkHandlerConfigImpl extends LinkHandlerConfig { - private static final List> LINK_TYPES = ImmutableList.>of( + private static final List> LINK_TYPES = List.of( InternalLinkType.class, ExternalLinkType.class, MediaLinkType.class, diff --git a/bundles/core/src/main/java/io/wcm/samples/core/config/impl/MediaHandlerConfigImpl.java b/bundles/core/src/main/java/io/wcm/samples/core/config/impl/MediaHandlerConfigImpl.java index d3900e80..0791a8a1 100644 --- a/bundles/core/src/main/java/io/wcm/samples/core/config/impl/MediaHandlerConfigImpl.java +++ b/bundles/core/src/main/java/io/wcm/samples/core/config/impl/MediaHandlerConfigImpl.java @@ -25,7 +25,6 @@ import org.osgi.service.component.annotations.Component; import com.day.cq.wcm.api.Page; -import com.google.common.collect.ImmutableList; import io.wcm.handler.media.markup.DummyImageMediaMarkupBuilder; import io.wcm.handler.media.spi.MediaHandlerConfig; @@ -44,11 +43,11 @@ public class MediaHandlerConfigImpl extends MediaHandlerConfig { static final String DAM_ROOT = "/content/dam/wcm-io-samples"; - private static final List> MEDIA_SOURCES = ImmutableList.>of( + private static final List> MEDIA_SOURCES = List.of( DamMediaSource.class, InlineMediaSource.class); - private static final List> MEDIA_MARKUP_BUILDERS = ImmutableList.>of( + private static final List> MEDIA_MARKUP_BUILDERS = List.of( ResponsiveImageMediaMarkupBuilder.class, DamVideoMediaMarkupBuilder.class, DummyImageMediaMarkupBuilder.class); diff --git a/bundles/core/src/main/webapp/app-root/components/global/linktype/wikipedia/wikipedia.jsp b/bundles/core/src/main/webapp/app-root/components/global/linktype/wikipedia/wikipedia.jsp index f73c75b5..61fc54a3 100644 --- a/bundles/core/src/main/webapp/app-root/components/global/linktype/wikipedia/wikipedia.jsp +++ b/bundles/core/src/main/webapp/app-root/components/global/linktype/wikipedia/wikipedia.jsp @@ -17,12 +17,12 @@ limitations under the License. #L% --%> +<%@page import="java.util.List"%> <%@page import="org.apache.sling.api.resource.Resource"%> <%@page import="com.adobe.granite.ui.components.Config"%> <%@page import="com.adobe.granite.ui.components.ComponentHelper.Options"%> <%@page import="com.adobe.granite.ui.components.Tag"%> <%@page import="com.day.cq.commons.jcr.JcrConstants"%> -<%@page import="com.google.common.collect.ImmutableList"%> <%@page import="io.wcm.handler.link.LinkNameConstants"%> <%@page import="io.wcm.sling.commons.resource.ImmutableValueMap"%> <%@page import="io.wcm.wcm.ui.granite.resource.GraniteUiSyntheticResource"%> @@ -60,7 +60,7 @@ ImmutableValueMap.Builder linkWikipediaLanguageProps = ImmutableValueMap.builder Resource languageSelect = GraniteUiSyntheticResource.child(items, WikipediaLinkType.PN_LINK_WIKIPEDIA_LANGUAGE, "granite/ui/components/coral/foundation/form/select", linkWikipediaLanguageProps.build()); Resource languageItems = GraniteUiSyntheticResource.child(languageSelect, "items", JcrConstants.NT_UNSTRUCTURED); -for (String language : ImmutableList.of("en", "de")) { +for (String language : List.of("en", "de")) { GraniteUiSyntheticResource.child(languageItems, language, JcrConstants.NT_UNSTRUCTURED, ImmutableValueMap.builder() .put("value", language) diff --git a/bundles/core/src/test/java/io/wcm/samples/core/testcontext/AppAemContext.java b/bundles/core/src/test/java/io/wcm/samples/core/testcontext/AppAemContext.java index 00f6a285..22d81648 100644 --- a/bundles/core/src/test/java/io/wcm/samples/core/testcontext/AppAemContext.java +++ b/bundles/core/src/test/java/io/wcm/samples/core/testcontext/AppAemContext.java @@ -53,8 +53,7 @@ private AppAemContext() { public static AemContext newAemContext() { return new AemContextBuilder() - .plugin(CACONFIG) - .plugin(WCMIO_SLING, WCMIO_WCM, WCMIO_CACONFIG, WCMIO_HANDLER) + .plugin(CACONFIG, WCMIO_SLING, WCMIO_WCM, WCMIO_CACONFIG, WCMIO_HANDLER) .afterSetUp(SETUP_CALLBACK) .build(); } diff --git a/changes.xml b/changes.xml index 298ce7e1..09f426ac 100644 --- a/changes.xml +++ b/changes.xml @@ -23,6 +23,15 @@ xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd"> + + + Switch to Java 11 as minimum version. + + + Switch to AEM 6.5.7 as minimum version. + + + Switch to AEM 6.5 as minimum version. diff --git a/config-definition/pom.xml b/config-definition/pom.xml index ee4df79b..da64f3a1 100644 --- a/config-definition/pom.xml +++ b/config-definition/pom.xml @@ -25,14 +25,14 @@ io.wcm.samples io.wcm.samples.parent - 1.4.0 + 1.4.2 ../parent/pom.xml io.wcm.samples io.wcm.samples.config-definition AEM Application CONGA roles and templates - 1.4.0 + 1.4.2 config-definition @@ -48,14 +48,14 @@ io.wcm.samples io.wcm.samples.complete - 1.4.0 + 1.4.2 zip compile io.wcm.samples io.wcm.samples.sample-content - 1.4.0 + 1.4.2 zip compile diff --git a/config-definition/src/main/dev-environments/local.yaml b/config-definition/src/main/dev-environments/local.yaml index 86776cc9..36618ddc 100644 --- a/config-definition/src/main/dev-environments/local.yaml +++ b/config-definition/src/main/dev-environments/local.yaml @@ -8,7 +8,7 @@ nodes: variant: aem-author config: replication.author.publishTargets: - - name: publish1 + - name: publish url: ${maven::sling.publish.url} transportUser: admin transportPassword: admin diff --git a/config-definition/src/main/templates/wcm-io-samples-aem-cms/wcm-io-samples-aem-cms-config.provisioning.hbs b/config-definition/src/main/templates/wcm-io-samples-aem-cms/wcm-io-samples-aem-cms-config.provisioning.hbs index d09ceea2..5159fe16 100644 --- a/config-definition/src/main/templates/wcm-io-samples-aem-cms/wcm-io-samples-aem-cms-config.provisioning.hbs +++ b/config-definition/src/main/templates/wcm-io-samples-aem-cms/wcm-io-samples-aem-cms-config.provisioning.hbs @@ -3,33 +3,11 @@ [configurations] - # Default LogManager configuration - org.apache.sling.commons.log.LogManager - org.apache.sling.commons.log.pattern="{0,date,dd.MM.yyyy\ HH:mm:ss.SSS}\ *{4}*\ [{2}]\ {3}\ {5}" - org.apache.sling.commons.log.file="logs/error.log" - org.apache.sling.commons.log.level="warn" - org.apache.sling.commons.log.file.size="'.'yyyy-MM-dd" - org.apache.sling.commons.log.file.number=I"15" - # Set loglevel for project-specific bundles org.apache.sling.commons.log.LogManager.factory.config-wcm-io-samples org.apache.sling.commons.log.file="logs/error.log" org.apache.sling.commons.log.level="{{log.projectSpecificLogLevel}}" org.apache.sling.commons.log.names=["io.wcm"] - org.apache.sling.commons.log.pattern="{0,date,dd.MM.yyyy\ HH:mm:ss.SSS}\ *{4}*\ [{2}]\ {3}\ {5}" - - # Configure Sling Context-Aware Configuration for AEM - add lookup in jcr:content subnodes, ignore cq:* properties - org.apache.sling.caconfig.resource.impl.def.DefaultContextPathStrategy - configRefResourceNames=["jcr:content","."] - configRefPropertyNames=["cq:conf"] - - org.apache.sling.caconfig.resource.impl.def.DefaultConfigurationResourceResolvingStrategy - fallbackPaths=["/conf/global","/apps","/libs"] - configCollectionInheritancePropertyNames=["jcr:content/sling:configCollectionInherit", "jcr:content/mergeList","mergeList"] - - org.apache.sling.caconfig.management.impl.ConfigurationManagementSettingsImpl - ignorePropertyNameRegex=["^(jcr|cq):.+$"] - configCollectionPropertiesResourceNames=["jcr:content","."] # Context path strategy io.wcm.caconfig.extensions.contextpath.impl.RootTemplateContextPathStrategy-wcm-io-samples @@ -57,10 +35,6 @@ com.day.cq.commons.servlets.RootMappingServlet rootmapping.target="/sites.html" - # Set TouchUI as primary authoring UI - com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl - authoringUIModeService.default="TOUCH" - # Instance type io.wcm.wcm.commons.instancetype.impl.InstanceTypeServiceImpl instance.type="author" @@ -83,11 +57,11 @@ # Disable default renderings for Sling GET servlet on publish org.apache.sling.servlets.get.DefaultGetServlet enable.html=B"false" - enable.json=B"false" + enable.json=B"true" enable.txt=B"false" enable.xml=B"false" index=B"false" - index.files="[index,index.html]" + index.files=["index","index.html"] aliases="xml:pdf" json.maximumresults=I"100" diff --git a/content-packages/complete/pom.xml b/content-packages/complete/pom.xml index 1e9195d4..61936ed7 100644 --- a/content-packages/complete/pom.xml +++ b/content-packages/complete/pom.xml @@ -25,13 +25,13 @@ io.wcm.samples io.wcm.samples.parent - 1.4.0 + 1.4.2 ../../parent/pom.xml io.wcm.samples io.wcm.samples.complete - 1.4.0 + 1.4.2 content-package Samples Application @@ -47,13 +47,13 @@ io.wcm.samples io.wcm.samples.core - 1.4.0 + 1.4.2 provided io.wcm.samples io.wcm.samples.clientlibs - 1.4.0 + 1.4.2 provided @@ -73,11 +73,6 @@ io.wcm.dam.asset-service provided - - io.wcm - io.wcm.wcm.ui.extjs - provided - diff --git a/content-packages/sample-content/pom.xml b/content-packages/sample-content/pom.xml index a7d4aeff..43860746 100644 --- a/content-packages/sample-content/pom.xml +++ b/content-packages/sample-content/pom.xml @@ -25,14 +25,14 @@ io.wcm.samples io.wcm.samples.parent - 1.4.0 + 1.4.2 ../../parent/pom.xml io.wcm.samples io.wcm.samples.sample-content AEM Application sample content - 1.4.0 + 1.4.2 content-package diff --git a/mvnw b/mvnw index 41c0f0c2..5643201c 100755 --- a/mvnw +++ b/mvnw @@ -36,6 +36,10 @@ if [ -z "$MAVEN_SKIP_RC" ] ; then + if [ -f /usr/local/etc/mavenrc ] ; then + . /usr/local/etc/mavenrc + fi + if [ -f /etc/mavenrc ] ; then . /etc/mavenrc fi @@ -145,7 +149,7 @@ if [ -z "$JAVACMD" ] ; then JAVACMD="$JAVA_HOME/bin/java" fi else - JAVACMD="`which java`" + JAVACMD="`\\unset -f command; \\command -v java`" fi fi @@ -212,9 +216,9 @@ else echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." fi if [ -n "$MVNW_REPOURL" ]; then - jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" else - jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" fi while IFS="=" read key value; do case "$key" in (wrapperUrl) jarUrl="$value"; break ;; @@ -233,9 +237,9 @@ else echo "Found wget ... using wget" fi if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget "$jarUrl" -O "$wrapperJarPath" + wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" else - wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" + wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" fi elif command -v curl > /dev/null; then if [ "$MVNW_VERBOSE" = true ]; then @@ -305,6 +309,8 @@ WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain exec "$JAVACMD" \ $MAVEN_OPTS \ + $MAVEN_DEBUG_OPTS \ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + "-Dmaven.home=${M2_HOME}" \ + "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd index 86115719..8a15b7f3 100644 --- a/mvnw.cmd +++ b/mvnw.cmd @@ -46,8 +46,8 @@ if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") @REM Execute a user defined script before this one if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre @REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" -if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* +if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* :skipRcPre @setlocal @@ -120,9 +120,9 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain -set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" -FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B ) @@ -134,7 +134,7 @@ if exist %WRAPPER_JAR% ( ) ) else ( if not "%MVNW_REPOURL%" == "" ( - SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" ) if "%MVNW_VERBOSE%" == "true" ( echo Couldn't find %WRAPPER_JAR%, downloading it ... @@ -158,7 +158,13 @@ if exist %WRAPPER_JAR% ( @REM work with both Windows and non-Windows executions. set MAVEN_CMD_LINE_ARGS=%* -%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +%MAVEN_JAVA_EXE% ^ + %JVM_CONFIG_MAVEN_PROPS% ^ + %MAVEN_OPTS% ^ + %MAVEN_DEBUG_OPTS% ^ + -classpath %WRAPPER_JAR% ^ + "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ + %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* if ERRORLEVEL 1 goto error goto end @@ -168,15 +174,15 @@ set ERROR_CODE=1 :end @endlocal & set ERROR_CODE=%ERROR_CODE% -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost @REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" -if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" +if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" :skipRcPost @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%" == "on" pause +if "%MAVEN_BATCH_PAUSE%"=="on" pause -if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% +if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% -exit /B %ERROR_CODE% +cmd /C exit /B %ERROR_CODE% diff --git a/parent/pom.xml b/parent/pom.xml index abf673a5..716c86f3 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -25,13 +25,13 @@ io.wcm.maven io.wcm.maven.aem-global-parent - 1.15.14 + 2.1.2 io.wcm.samples io.wcm.samples.parent - 1.4.0 + 1.4.2 pom Samples @@ -43,12 +43,12 @@ http://localhost:4502 http://localhost:4503 - - 1.8 - 8 + + 11 + 5.3.0 - 2021-05-27T00:00:00Z + 2023-04-20T09:28:43Z @@ -116,12 +116,13 @@ io.wcm io.wcm.caconfig.extensions + 1.8.8 io.wcm io.wcm.caconfig.editor - 1.8.6 + 1.15.6 io.wcm @@ -131,74 +132,69 @@ io.wcm io.wcm.sling.commons - 1.4.0 + 1.6.2 io.wcm io.wcm.handler.commons - 1.4.2 + 1.5.0 io.wcm io.wcm.handler.url - 1.6.0 + 1.10.2 io.wcm io.wcm.handler.link - 1.8.0 + 1.10.2 io.wcm io.wcm.handler.media - 1.13.8 + 1.15.6 io.wcm io.wcm.handler.richtext - 1.5.6 + 1.6.4 io.wcm io.wcm.wcm.commons - 1.9.0 + 1.10.0 io.wcm io.wcm.wcm.parsys - 1.6.8 + 1.7.0 io.wcm io.wcm.wcm.ui.granite - 1.8.2 + 1.9.10 io.wcm io.wcm.wcm.ui.clientlibs 1.2.2 - - io.wcm - io.wcm.wcm.ui.extjs - 1.1.0 - io.wcm io.wcm.dam.asset-service - 1.4.0 + 1.5.0 io.wcm.devops.conga.definitions io.wcm.devops.conga.definitions.aem - 1.11.2 + 1.15.0 io.wcm io.wcm.testing.aem-mock.junit5 - 4.1.6 + 5.2.0 org.apache.sling @@ -208,12 +204,12 @@ org.apache.sling org.apache.sling.testing.caconfig-mock-plugin - 1.3.4 + 1.4.2 io.wcm io.wcm.testing.wcm-io-mock.sling - 1.1.0 + 1.2.0 io.wcm @@ -223,7 +219,7 @@ io.wcm io.wcm.testing.wcm-io-mock.caconfig - 1.1.0 + 1.2.0 io.wcm @@ -235,7 +231,7 @@ io.wcm.maven io.wcm.maven.aem-dependencies - 6.5.0.0005 + 6.5.7.0003 pom import @@ -244,26 +240,19 @@ org.junit junit-bom - 5.8.2 + 5.9.2 pom import org.mockito mockito-core - 4.1.0 + ${mockito.version} org.mockito mockito-junit-jupiter - 4.1.0 - - - - - org.apache.geronimo.specs - geronimo-annotation_1.3_spec - 1.0 + ${mockito.version} @@ -292,25 +281,6 @@ - - - io.wcm.maven.plugins - sling-initial-content-transform-maven-plugin - 1.0.0 - - - - transform - - - wcm-io - - - - - diff --git a/pom.xml b/pom.xml index d7cb1354..d9715fdb 100644 --- a/pom.xml +++ b/pom.xml @@ -25,13 +25,13 @@ io.wcm io.wcm.parent_toplevel - 1.6.10 + 2.2.0 io.wcm.samples io.wcm.samples - 1.4.0 + 1.4.2 pom Samples Root @@ -39,15 +39,15 @@ ${site.url}/${site.url.module.prefix}/ - scm:git:https://github.com/wcm-io/wcm-io-samples.git - scm:git:https://github.com/wcm-io/wcm-io-samples.git - https://github.com/wcm-io/wcm-io-samples + scm:git:https://github.com/wcm-io/io.wcm.samples.git + scm:git:https://github.com/wcm-io/io.wcm.samples.git + https://github.com/wcm-io/io.wcm.samples HEAD GitHub Actions - https://github.com/wcm-io/wcm-io-samples/actions + https://github.com/wcm-io/io.wcm.samples/actions diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md index cba34629..bebaa0cd 100644 --- a/src/site/markdown/index.md +++ b/src/site/markdown/index.md @@ -5,7 +5,7 @@ Sample application to demonstrate the usage of the wcm.io Handler infrastructure ### Build and deploy samples from source -- Clone the github repository https://github.com/wcm-io/wcm-io-samples +- Clone the github repository https://github.com/wcm-io/io.wcm.samples - Start an AEM author instance at http://localhost:4502 - Execute deploy script `build-deploy.sh` to deploy the application and sample content and configuration to the instance. - Open http://localhost:4502/editor.html/content/wcm-io-samples/en.html in your browser @@ -19,4 +19,4 @@ Sample application to demonstrate the usage of the wcm.io Handler infrastructure ### GitHub Repository -Sources: https://github.com/wcm-io/wcm-io-samples +Sources: https://github.com/wcm-io/io.wcm.samples diff --git a/src/site/site.xml b/src/site/site.xml new file mode 100644 index 00000000..f8332325 --- /dev/null +++ b/src/site/site.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + +