Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Actions & Dependencies #42

Merged
merged 15 commits into from
Aug 30, 2021
1 change: 1 addition & 0 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
jobs:
changelog:
runs-on: ubuntu-latest
if: github.repository == 'adobe/aem-modernize-tools'
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/javadocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,20 @@ on:
jobs:
generate-javadocs:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
if: github.event.workflow_run.conclusion == 'success' && github.repository == 'adobe/aem-modernize-tools'

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: 'main'

- name: Setup JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v2.3.0
with:
distribution: 'zulu'
java-version: 11

- 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-
cache: maven

- name: Build JavaDocs
run: mvn -U clean verify -Pgenerate-site-javadoc
Expand Down
43 changes: 14 additions & 29 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
tag:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
if: github.repository == 'adobe/aem-modernize-tools' && github.ref == 'refs/heads/main'

outputs:
version: ${{ steps.store-version.outputs.version }}
Expand All @@ -20,17 +20,11 @@ jobs:
uses: actions/checkout@v2

- name: Setup JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v2.3.0
with:
distribution: 'zulu'
java-version: 11

- 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-
cache: maven

- name: Initialize mandatory git config
run: |
Expand All @@ -56,17 +50,11 @@ jobs:
ref: aem-modernize-tools-${{ needs.tag.outputs.version }}

- name: Setup JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v2.3.0
with:
distribution: 'zulu'
java-version: 11

- 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-
cache: maven

- name: Maven Verify
run: mvn -U clean verify && mvn verify -P java8
Expand Down Expand Up @@ -106,7 +94,10 @@ jobs:
with:
tag_name: aem-modernize-tools-${{ needs.tag.outputs.version }}
files: |
./target/aem-modernize-tools-*.jar
all/target/aem-modernize-tools.all-*.zip
core/target/aem-modernize-tools.core-*.jar
ui.apps/target/aem-modernize-tools.ui.apps-*.zip
ui.apps.structure/target/aem-modernize-tools.ui.apps.structure-*.zip

maven-central-deploy:
needs: tag
Expand All @@ -120,9 +111,11 @@ jobs:

# See https://github.com/actions/setup-java#publishing-using-apache-maven
- name: Setup JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v2.3.0
with:
distribution: 'zulu'
java-version: 11
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
Expand All @@ -137,14 +130,6 @@ jobs:
echo $GPG_SECRET_KEYS | base64 --decode | gpg --import --no-tty --batch --yes
echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust --no-tty --batch --yes

- 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-

- name: Build Java8 Artifact
run: mvn clean package -P release,java8
env:
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/snapshot-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
jobs:
deploy-snapshot:
runs-on: ubuntu-latest
if: github.repository == 'adobe/aem-modernize-tools' && github.ref == 'refs/heads/main'

steps:
- name: Checkout code
Expand All @@ -16,9 +17,11 @@ jobs:
# Set up environment with Java and Maven
# See https://github.com/actions/setup-java#publishing-using-apache-maven
- name: Setup JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v2.3.0
with:
distribution: 'zulu'
java-version: 11
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
Expand All @@ -33,14 +36,6 @@ jobs:
echo $GPG_SECRET_KEYS | base64 --decode | gpg --import --no-tty --batch --yes
echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust --no-tty --batch --yes

- 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-

- name: Publish Java8 to Apache Maven Central
run: mvn clean deploy -P release,java8
env:
Expand All @@ -56,7 +51,7 @@ jobs:
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Upload CodeCov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v2.0.3
with:
file: core/target/site/jacoco/jacoco.xml
flags: unittests
14 changes: 4 additions & 10 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,17 @@ jobs:
uses: actions/checkout@v2

- name: Setup JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v2.3.0
with:
distribution: 'zulu'
java-version: 11

- 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-
cache: maven

- name: Build & Test with Maven
run: mvn -U clean verify

- name: Upload CodeCov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v2.0.3
with:
file: core/target/site/jacoco/jacoco.xml
flags: unittests
13 changes: 0 additions & 13 deletions all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@
<type>zip</type>
<target>/apps/aem-modernize-packages/content/install</target>
</embedded>
<embedded>
<groupId>com.adobe.cq</groupId>
<artifactId>aem-modernize-tools.ui.config</artifactId>
<type>zip</type>
<target>/apps/aem-modernize-packages/application/install</target>
</embedded>
</embeddeds>
</configuration>
</plugin>
Expand Down Expand Up @@ -172,12 +166,5 @@
<version>${project.version}</version>
<type>zip</type>
</dependency>
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>aem-modernize-tools.ui.config</artifactId>
<version>${project.version}</version>
<type>zip</type>
</dependency>

</dependencies>
</project>
65 changes: 58 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,59 @@
<artifactId>aem-modernize-tools</artifactId>
<packaging>pom</packaging>
<version>2.0.0-SNAPSHOT</version>
<name>AEM Modernize Tools</name>
<description>AEM Modernize Tools</description>
<name>AEM Modernization Tools</name>
<description>AEM Modernization Tools</description>

<organization>
<name>Adobe Inc.</name>
</organization>
<inceptionYear>2019</inceptionYear>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>

<scm>
<connection>scm:git:https://github.com/adobe/aem-modernize-tools.git</connection>
<developerConnection>scm:git:https://github.com/adobe/aem-modernize-tools.git</developerConnection>
<url>https://github.com/adobe/aem-modernize-tools/tree/main</url>
<tag>HEAD</tag>
</scm>

<issueManagement>
<system>GitHub</system>
<url>https://github.com/adobe/aem-modernize-tools/issues</url>
</issueManagement>

<developers>
<developer>
<name>Bryan Stopp</name>
<organization>Adobe Inc.</organization>
<organizationUrl>https://www.adobe.com</organizationUrl>
<url>https://github.com/bstopp</url>
</developer>
<developer>
<name>Gilles Knobloch</name>
<organization>Adobe Inc.</organization>
<organizationUrl>https://www.adobe.com</organizationUrl>
<url>https://github.com/gknobloch</url>
</developer>
</developers>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<modules>
<module>all</module>
Expand Down Expand Up @@ -259,7 +310,7 @@ Bundle-DocURL:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.1</version>
<version>2.22.2</version>
</plugin>
<!-- Maven Deploy Plugin -->
<plugin>
Expand Down Expand Up @@ -322,7 +373,7 @@ Bundle-DocURL:
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<version>1.0.2</version>
<version>1.0.4</version>
<configuration>
<targetURL>http://${aem.host}:${aem.port}/crx/packmgr/service.jsp</targetURL>
<failOnError>true</failOnError>
Expand Down Expand Up @@ -685,7 +736,7 @@ Bundle-DocURL:
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.annotation.versioning</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -739,7 +790,7 @@ Bundle-DocURL:
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.framework</artifactId>
<version>1.9.0</version>
<version>1.10.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -786,7 +837,7 @@ Bundle-DocURL:
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<version>2.2</version>
<scope>provided</scope>
</dependency>

Expand Down