Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Apr 20, 2023
2 parents beaf301 + 36fedb6 commit b7cfc8b
Show file tree
Hide file tree
Showing 30 changed files with 233 additions and 359 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "daily"
38 changes: 12 additions & 26 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- master
- experimental/**
pull_request:
types: [opened, synchronize, reopened]
branches-ignore:
- master
- experimental/**
Expand All @@ -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 }}
24 changes: 6 additions & 18 deletions .github/workflows/maven-deploy.yml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/release-from-tag.yml
Original file line number Diff line number Diff line change
@@ -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 }}
26 changes: 0 additions & 26 deletions .maven-settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,6 @@
</snapshots>
</repository>

<repository>
<id>wcm-io-apache-intermediate-release</id>
<url>https://wcm.io/maven/repositories/apache-intermediate-release</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>

<repository>
<id>oss-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
Expand Down Expand Up @@ -98,19 +85,6 @@
</snapshots>
</pluginRepository>

<pluginRepository>
<id>wcm-io-apache-intermediate-release</id>
<url>https://wcm.io/maven/repositories/apache-intermediate-release</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>

<pluginRepository>
<id>oss-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
Expand Down
117 changes: 0 additions & 117 deletions .mvn/wrapper/MavenWrapperDownloader.java

This file was deleted.

Binary file modified .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
20 changes: 18 additions & 2 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
<img src="https://wcm.io/images/[email protected]"/> 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/<br/>
Issues: https://wcm-io.atlassian.net/browse/WSAM<br/>
Issues: https://github.com/wcm-io/io.wcm.samples/issues<br/>
Wiki: https://wcm-io.atlassian.net/wiki/<br/>
Continuous Integration: https://github.com/wcm-io/wcm-io-samples/actions<br/>
Continuous Integration: https://github.com/wcm-io/io.wcm.samples/actions<br/>
Commercial support: https://wcm.io/commercial-support.html


### Build and deploy samples from source

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


### System requirements

- AEM 6.5 or AEMaaCS
- JDK 1.8 or Java 11
- AEM 6.5.7+ or AEMaaCS SDK
- Java 11
31 changes: 31 additions & 0 deletions build-deploy_aem65.sh
Original file line number Diff line number Diff line change
@@ -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} "$@"
4 changes: 2 additions & 2 deletions bundles/clientlibs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
<parent>
<groupId>io.wcm.samples</groupId>
<artifactId>io.wcm.samples.parent</artifactId>
<version>1.4.0</version>
<version>1.4.2</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>

<groupId>io.wcm.samples</groupId>
<artifactId>io.wcm.samples.clientlibs</artifactId>
<version>1.4.0</version>
<version>1.4.2</version>
<packaging>jar</packaging>

<name>Sample Application Clientlibs</name>
Expand Down
Loading

0 comments on commit b7cfc8b

Please sign in to comment.