Skip to content

Commit

Permalink
[ACS-9040] Project refactoring
Browse files Browse the repository at this point in the history
* Update README.md, add contributing guide
* Update dependencies, switch to Junit Jupiter
* Cleanup POM
* Add dependabot
* Add Spotless
* Update gitignore
  • Loading branch information
kmagdziarz authored Nov 27, 2024
1 parent ca2267c commit 9d4ea60
Show file tree
Hide file tree
Showing 41 changed files with 981 additions and 888 deletions.
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2
registries:
maven-alfresco-internal:
type: maven-repository
url: https://artifacts.alfresco.com/nexus/content/groups/internal
username: ${{secrets.NEXUS_USERNAME}}
password: ${{secrets.NEXUS_PASSWORD}}
updates:
- package-ecosystem: "maven"
directory: "/"
registries:
- maven-alfresco-internal
schedule:
interval: "daily"
time: "22:00"
timezone: "Europe/London"
open-pull-requests-limit: 99
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ on:
jobs:
build_and_release:
name: "Build and Release"
uses: Alfresco/alfresco-build-tools/.github/workflows/build-and-release-maven.yml@v7.0.0
uses: Alfresco/alfresco-build-tools/.github/workflows/build-and-release-maven.yml@v8.4.0
secrets: inherit
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ hs_err_pid*

# maven
target/
*.log.*
pom.xml.*
.flattened-pom.xml
.flattened-pom.xml.*
release.properties

# IDE
.classpath
Expand All @@ -35,3 +40,8 @@ target/
.idea
*.iml
*.ipr
.gradle
.history

# Mac
.DS_Store
121 changes: 79 additions & 42 deletions README.md

Large diffs are not rendered by default.

315 changes: 191 additions & 124 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,137 +1,204 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-super-pom</artifactId>
<version>12</version>
</parent>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-super-pom</artifactId>
<version>12</version>
</parent>

<artifactId>acs-event-model</artifactId>
<version>1.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>acs-event-model</name>
<description>Alfresco Content Services Event Model</description>
<artifactId>acs-event-model</artifactId>
<version>1.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>acs-event-model</name>
<description>Alfresco Content Services Event Model</description>

<properties>
<java.version>17</java.version>
<maven.build.sourceVersion>${java.version}</maven.build.sourceVersion>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.release>${java.version}</maven.compiler.release>
<jackson.version>2.17.2</jackson.version>
<scm>
<connection>scm:git:https://github.com/Alfresco/acs-event-model.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/acs-event-model.git</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/Alfresco/acs-event-model</url>
</scm>

<jsonschema-generator.version>4.12.2</jsonschema-generator.version>
<license-maven-plugin.version>2.0.1</license-maven-plugin.version>
</properties>
<distributionManagement>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/releases</url>
</repository>
</distributionManagement>

<scm>
<connection>scm:git:https://github.com/Alfresco/acs-event-model.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/acs-event-model.git</developerConnection>
<url>https://github.com/Alfresco/acs-event-model</url>
<tag>HEAD</tag>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<distributionManagement>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/releases</url>
</repository>
</distributionManagement>
<java.version>17</java.version>
<maven.build.sourceVersion>${java.version}</maven.build.sourceVersion>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.release>${java.version}</maven.compiler.release>

<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
<scope>provided</scope>
</dependency>
<jsonschema-generator.version>4.12.2</jsonschema-generator.version>
<license-maven-plugin.version>2.0.1</license-maven-plugin.version>

<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
<version>1.5.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.14.0</version>
<scope>test</scope>
</dependency>
<dependency.jackson.version>2.18.0</dependency.jackson.version>
<dependency.junit-jupiter.version>5.11.3</dependency.junit-jupiter.version>
<dependency.commons-io.version>2.17.0</dependency.commons-io.version>
<dependency.jsonassert.version>1.5.3</dependency.jsonassert.version>
<dependency.maven-jar-plugin.version>3.4.2</dependency.maven-jar-plugin.version>
<dependency.spotless-maven-plugin.version>2.43.0</dependency.spotless-maven-plugin.version>
</properties>

<!-- JSON schema dependencies -->
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jsonSchema</artifactId>
<version>${jackson.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.victools</groupId>
<artifactId>jsonschema-generator</artifactId>
<version>${jsonschema-generator.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.victools</groupId>
<artifactId>jsonschema-module-jackson</artifactId>
<version>${jsonschema-generator.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.30</version>
<scope>test</scope>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${dependency.jackson.version}</version>
<scope>provided</scope>
</dependency>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${license-maven-plugin.version}</version>
<executions>
<execution>
<id>third-party-licenses</id>
<goals>
<goal>add-third-party</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<failOnMissing>true</failOnMissing>
<excludedScopes>provided,test</excludedScopes>
<excludedGroups>org.alfresco</excludedGroups>
<failIfWarning>true</failIfWarning>
<includedLicenses>https://raw.githubusercontent.com/Alfresco/third-party-license-overrides/master/includedLicenses.txt</includedLicenses>
<licenseMergesUrl>https://raw.githubusercontent.com/Alfresco/third-party-license-overrides/master/licenseMerges.txt</licenseMergesUrl>
<overrideUrl>https://raw.githubusercontent.com/Alfresco/third-party-license-overrides/master/override-THIRD-PARTY.properties</overrideUrl>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!-- test dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${dependency.junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
<version>${dependency.jsonassert.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${dependency.commons-io.version}</version>
<scope>test</scope>
</dependency>

<!-- JSON schema dependencies -->
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jsonSchema</artifactId>
<version>${dependency.jackson.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.victools</groupId>
<artifactId>jsonschema-generator</artifactId>
<version>${jsonschema-generator.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.victools</groupId>
<artifactId>jsonschema-module-jackson</artifactId>
<version>${jsonschema-generator.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${license-maven-plugin.version}</version>
<executions>
<execution>
<id>third-party-licenses</id>
<goals>
<goal>add-third-party</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<failOnMissing>true</failOnMissing>
<excludedScopes>provided,test</excludedScopes>
<excludedGroups>org.alfresco</excludedGroups>
<failIfWarning>true</failIfWarning>
<includedLicenses>https://raw.githubusercontent.com/Alfresco/third-party-license-overrides/master/includedLicenses.txt</includedLicenses>
<licenseMergesUrl>https://raw.githubusercontent.com/Alfresco/third-party-license-overrides/master/licenseMerges.txt</licenseMergesUrl>
<overrideUrl>https://raw.githubusercontent.com/Alfresco/third-party-license-overrides/master/override-THIRD-PARTY.properties</overrideUrl>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${dependency.maven-jar-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<configuration>
<flattenMode>minimum</flattenMode>
</configuration>
<executions>
<execution>
<id>flatten</id>
<goals>
<goal>flatten</goal>
</goals>
<phase>process-resources</phase>
</execution>
<execution>
<id>flatten.clean</id>
<goals>
<goal>clean</goal>
</goals>
<phase>clean</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${dependency.spotless-maven-plugin.version}</version>
<configuration>
<java>
<eclipse>
<file>https://raw.githubusercontent.com/Alfresco/alfresco-community-repo/refs/heads/master/alfresco-formatter.xml</file>
</eclipse>
<importOrder>
<order>\#java|\#javax|\#jakarta,\#,\#org.alfresco,java|javax|jakarta,,org.alfresco</order>
</importOrder>
<removeUnusedImports />
<formatAnnotations />
</java>
<pom>
<includes>
<include>pom.xml</include>
</includes>
<sortPom>
<expandEmptyElements>false</expandEmptyElements>
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
</sortPom>
</pom>
<markdown>
<includes>
<include>*.md</include>
</includes>
<flexmark />
</markdown>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
Loading

0 comments on commit 9d4ea60

Please sign in to comment.