From c7ad77d001131bba7bd0708db72ffa256e05ec98 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 fa39d3198e..a5449aac2e 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 aa00a23f9d..ddc7190eb3 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 beccac7d10..c514092214 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 205dc8cd6e..df0d6aa79a 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 50799a7b49..3608d9ba99 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 da516fae71..fa4012c31c 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 d4a54ae886..19c76c2b4d 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 5fe92429a9..8570abb0bf 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 463a9715d2..8d28c85f1a 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 a2e40a0bca..fc40bd3f1d 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 d9b49e90bb..c8f16e5156 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 77f6dbd170..5303b24000 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 c6f10aec30..2b5bac134f 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 d2ebdce922..bc60078b38 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