WrenSecurity / wrensec-commons

Community fork of ForgeRock Commons, which contains common utility code used by multiple products originally developed by ForgeRock.
http://wrensecurity.org
0 stars 10 forks source link

Merge wrensec-i18n-framework project with wrensec-commons #40

Closed karelmaxa closed 1 year ago

karelmaxa commented 1 year ago

We don't want the overhead of managing separate small projects. This change is based on https://github.com/WrenSecurity/wrensec-i18n-framework/issues/7.

fyrbach commented 1 year ago

Would it be possible to replace the i18n-core dependency in json-resouce module, or it should be in separate PR?

Here is my suggestion:

diff --git a/commons-bom/pom.xml b/commons-bom/pom.xml
index a283298bb..da2de2b75 100644
--- a/commons-bom/pom.xml
+++ b/commons-bom/pom.xml
@@ -544,9 +544,9 @@
             </dependency>

             <dependency>
-                <groupId>org.forgerock.commons</groupId>
+                <groupId>org.wrensecurity.commons</groupId>
                 <artifactId>i18n-core</artifactId>
-                <version>${i18nFrameworkVersion}</version>
+                <version>${project.version}</version>
             </dependency>

             <!-- ForgeRock Auth filters dependencies -->
diff --git a/rest/json-resource/pom.xml b/rest/json-resource/pom.xml
index ff6c05f7c..7d47a3eb8 100644
--- a/rest/json-resource/pom.xml
+++ b/rest/json-resource/pom.xml
@@ -36,7 +36,7 @@
         </dependency>

         <dependency>
-            <groupId>org.forgerock.commons</groupId>
+            <groupId>org.wrensecurity.commons</groupId>
             <artifactId>i18n-core</artifactId>
         </dependency>

Then there would remain only single org.forgerock.commons:i18n-core transient dependency comming from wrends project which I'm currently upgrading. So it will be gone soon.

$ mvn dependency:tree -pl :security -Dincludes="org.forgerock.commons:i18n-*" 
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------< org.wrensecurity.commons:security >------------------
[INFO] Building Wren Security Commons JSON Patch - Library 22.3.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:3.1.2:tree (default-cli) @ security ---
[INFO] org.wrensecurity.commons:security:jar:22.3.0-SNAPSHOT
[INFO] \- org.forgerock.opendj:opendj-ldap-toolkit:jar:4.0.0-M3:test
[INFO]    +- org.forgerock.opendj:opendj-core:jar:4.0.0-M3:test
[INFO]    |  \- org.forgerock.commons:i18n-slf4j:jar:1.4.2:test
[INFO]    \- org.forgerock.commons:i18n-core:jar:1.4.2:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.810 s
[INFO] Finished at: 2022-11-01T18:04:16+01:00
[INFO] ------------------------------------------------------------------------
karelmaxa commented 1 year ago

I wanted to separate it to the two different PRs:

1) Merge wrensec-i18n-framework into wrensec-commons. 2) Upgrade i18n-framework to the latest version.

But ok, there is no problem to do it in a single PR. I have added a commit with the i18n-framework upgrade.