From 4e9bbaad1ef9fcb10d77f67a893e47f8dbba69b6 Mon Sep 17 00:00:00 2001 From: Boubaker Khanfir Date: Sun, 22 Sep 2024 19:53:44 +0100 Subject: [PATCH] feat: Replace Jcabi Plugin by AspectJ Maven Plugin - Meeds-io/meeds#2417 Prior to this change, the jcabi maven plugin was used to weave classes for annotation processing, especially and annotations. This plugin isn't maintained and should be replace by the default AspectJ libraries for Annotation Processing. In addition, the Jcabi plugin makes the build longer and takes a lot of time in addition to heigh I/O operations on disk. This change applies the required configuration (In addition to https://github.com/Meeds-io/maven-parent-pom/commit/bea09a8fcbc02b87ee8748cd9bbf9a524e4d74cd) in order to replace usage of Jcabi plugin. --- component/api/pom.xml | 4 --- component/common/pom.xml | 11 +++++--- component/file-storage/pom.xml | 16 +++++++++--- .../file/services/FileServiceImplTest.java | 7 ++--- component/identity/pom.xml | 26 +++++++++++++++++++ component/management/pom.xml | 16 ++++++++++++ component/pc/pom.xml | 16 ++++++++++++ component/portal/pom.xml | 12 +++++++++ component/resources/pom.xml | 16 ++++++++++++ component/scripting/pom.xml | 16 ++++++++++++ component/web/api/pom.xml | 16 ++++++++++++ component/web/controller/pom.xml | 16 ++++++++++++ component/web/resources/pom.xml | 12 +++++++++ component/web/security/pom.xml | 14 +++++++--- webui/pom.xml | 12 +++++++++ 15 files changed, 190 insertions(+), 20 deletions(-) diff --git a/component/api/pom.xml b/component/api/pom.xml index 3894b32d30..9f3e5c8bdc 100644 --- a/component/api/pom.xml +++ b/component/api/pom.xml @@ -195,10 +195,6 @@ org.apache.commons commons-lang3 - - org.aspectj - aspectjrt - org.hibernate.orm hibernate-core diff --git a/component/common/pom.xml b/component/common/pom.xml index c76858b665..a6cb0e76cd 100644 --- a/component/common/pom.xml +++ b/component/common/pom.xml @@ -28,6 +28,8 @@ Meeds Portal Component Common + 1.9.22.1 + 1.18.34 0.42 @@ -47,6 +49,11 @@ org.apache.commons commons-fileupload2-jakarta + + org.projectlombok + lombok + provided + io.meeds.kernel @@ -68,10 +75,6 @@ - - com.jcabi - jcabi-maven-plugin - maven-compiler-plugin diff --git a/component/file-storage/pom.xml b/component/file-storage/pom.xml index a113a7b452..5a99b17150 100644 --- a/component/file-storage/pom.xml +++ b/component/file-storage/pom.xml @@ -42,6 +42,18 @@ + + org.codehaus.mojo + aspectj-maven-plugin + + + + ${project.groupId} + portal.component.common + + + + org.apache.maven.plugins maven-surefire-plugin @@ -52,10 +64,6 @@ - - com.jcabi - jcabi-maven-plugin - diff --git a/component/file-storage/src/test/java/org/exoplatform/commons/file/services/FileServiceImplTest.java b/component/file-storage/src/test/java/org/exoplatform/commons/file/services/FileServiceImplTest.java index e4dd1d00eb..9b684ba292 100644 --- a/component/file-storage/src/test/java/org/exoplatform/commons/file/services/FileServiceImplTest.java +++ b/component/file-storage/src/test/java/org/exoplatform/commons/file/services/FileServiceImplTest.java @@ -23,7 +23,7 @@ import org.junit.rules.TemporaryFolder; import org.junit.runner.RunWith; import org.mockito.Mock; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import jakarta.persistence.EntityManager; import jakarta.persistence.EntityTransaction; @@ -34,10 +34,7 @@ import static org.mockito.Matchers.*; import static org.mockito.Mockito.*; -/** - * - */ -@RunWith(MockitoJUnitRunner.class) +@RunWith(MockitoJUnitRunner.Silent.class) public class FileServiceImplTest { @Rule diff --git a/component/identity/pom.xml b/component/identity/pom.xml index aff3eea1cd..7827168b77 100644 --- a/component/identity/pom.xml +++ b/component/identity/pom.xml @@ -82,11 +82,37 @@ ${berkeleydb.version} test + + org.springframework.boot + spring-boot-configuration-processor + true + + + org.projectlombok + lombok + provided + + + org.springframework + spring-aop + + + org.codehaus.mojo + aspectj-maven-plugin + + + + ${project.groupId} + portal.component.common + + + + org.apache.maven.plugins maven-surefire-plugin diff --git a/component/management/pom.xml b/component/management/pom.xml index cc4a72a2c0..3e33a50f6c 100644 --- a/component/management/pom.xml +++ b/component/management/pom.xml @@ -78,4 +78,20 @@ test-jar + + + + org.codehaus.mojo + aspectj-maven-plugin + + + + ${project.groupId} + portal.component.common + + + + + + diff --git a/component/pc/pom.xml b/component/pc/pom.xml index b0cfd0acfe..f8ec2f2d29 100644 --- a/component/pc/pom.xml +++ b/component/pc/pom.xml @@ -46,4 +46,20 @@ test-jar + + + + org.codehaus.mojo + aspectj-maven-plugin + + + + ${project.groupId} + portal.component.common + + + + + + diff --git a/component/portal/pom.xml b/component/portal/pom.xml index d648a9a7f4..fb54cbaea3 100644 --- a/component/portal/pom.xml +++ b/component/portal/pom.xml @@ -99,6 +99,18 @@ + + org.codehaus.mojo + aspectj-maven-plugin + + + + ${project.groupId} + portal.component.common + + + + org.apache.maven.plugins maven-surefire-plugin diff --git a/component/resources/pom.xml b/component/resources/pom.xml index 493fa928de..e799904490 100644 --- a/component/resources/pom.xml +++ b/component/resources/pom.xml @@ -43,4 +43,20 @@ test-jar + + + + org.codehaus.mojo + aspectj-maven-plugin + + + + ${project.groupId} + portal.component.common + + + + + + diff --git a/component/scripting/pom.xml b/component/scripting/pom.xml index 6bb2b02308..59d7da4299 100644 --- a/component/scripting/pom.xml +++ b/component/scripting/pom.xml @@ -44,4 +44,20 @@ groovy-all + + + + org.codehaus.mojo + aspectj-maven-plugin + + + + ${project.groupId} + portal.component.common + + + + + + diff --git a/component/web/api/pom.xml b/component/web/api/pom.xml index f7e4c0251a..881eaa1107 100644 --- a/component/web/api/pom.xml +++ b/component/web/api/pom.xml @@ -39,4 +39,20 @@ portal.component.web.controller + + + + org.codehaus.mojo + aspectj-maven-plugin + + + + ${project.groupId} + portal.component.common + + + + + + diff --git a/component/web/controller/pom.xml b/component/web/controller/pom.xml index 9fabe42374..08f3f6421d 100644 --- a/component/web/controller/pom.xml +++ b/component/web/controller/pom.xml @@ -76,4 +76,20 @@ + + + + org.codehaus.mojo + aspectj-maven-plugin + + + + ${project.groupId} + portal.component.common + + + + + + diff --git a/component/web/resources/pom.xml b/component/web/resources/pom.xml index 8faaf15610..35555055b3 100644 --- a/component/web/resources/pom.xml +++ b/component/web/resources/pom.xml @@ -104,6 +104,18 @@ + + org.codehaus.mojo + aspectj-maven-plugin + + + + ${project.groupId} + portal.component.common + + + + org.apache.maven.plugins maven-resources-plugin diff --git a/component/web/security/pom.xml b/component/web/security/pom.xml index b700ae47c6..227c229b07 100644 --- a/component/web/security/pom.xml +++ b/component/web/security/pom.xml @@ -59,13 +59,21 @@ sso-agent - - com.jcabi - jcabi-maven-plugin + org.codehaus.mojo + aspectj-maven-plugin + + + + ${project.groupId} + portal.component.common + + + + diff --git a/webui/pom.xml b/webui/pom.xml index 180c841032..1469da1bcb 100644 --- a/webui/pom.xml +++ b/webui/pom.xml @@ -68,6 +68,18 @@ + + org.codehaus.mojo + aspectj-maven-plugin + + + + ${project.groupId} + portal.component.common + + + + org.apache.maven.plugins maven-surefire-plugin