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

feat: Cleanup Dependencies to rely on Spring Dependencies Tree - Meeds-io/MIPs#57 #180

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data-upgrade-app-registry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<name>eXo Add-on:: Data Upgrade Add-on - ApplicationRegistery - Upgrade</name>

<properties>
<exo.test.coverage.ratio>0.82</exo.test.coverage.ratio>
<exo.test.coverage.ratio>0.80</exo.test.coverage.ratio>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.exoplatform.application.upgrade;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import jakarta.persistence.EntityManager;
import jakarta.persistence.Query;

import org.apache.commons.lang3.StringUtils;
import org.exoplatform.commons.persistence.impl.EntityManagerService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/
package org.exoplatform.application.upgrade;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import jakarta.persistence.EntityManager;
import jakarta.persistence.Query;

import org.exoplatform.commons.persistence.impl.EntityManagerService;
import org.exoplatform.commons.upgrade.UpgradeProductPlugin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import jakarta.persistence.EntityManager;
import jakarta.persistence.Query;

public class TemplateParamsUpgradePlugin extends UpgradeProductPlugin {
private static final Log LOG = ExoLogger.getExoLogger(TemplateParamsUpgradePlugin.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import javax.jcr.NodeIterator;
import javax.jcr.Workspace;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import org.exoplatform.commons.info.MissingProductInformationException;
import org.exoplatform.commons.info.ProductInformations;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import javax.jcr.query.Query;
import javax.jcr.query.QueryManager;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import org.exoplatform.commons.upgrade.UpgradeProductPlugin;
import org.exoplatform.commons.utils.PrivilegedSystemHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import javax.jcr.NodeIterator;
import javax.jcr.Session;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import org.exoplatform.commons.upgrade.UpgradeProductPlugin;
import org.exoplatform.commons.utils.PrivilegedSystemHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import java.util.List;
import java.util.stream.Collectors;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import jakarta.persistence.EntityManager;
import jakarta.persistence.Query;

import org.apache.commons.lang3.StringUtils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import javax.persistence.TypedQuery;
import jakarta.persistence.EntityManager;
import jakarta.persistence.Query;
import jakarta.persistence.TypedQuery;
import java.io.Serializable;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import java.util.List;
import java.util.stream.Collectors;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import jakarta.persistence.EntityManager;
import jakarta.persistence.Query;

import org.apache.commons.collections4.ListUtils;
import org.apache.commons.lang3.StringUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import java.util.LinkedList;
import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import jakarta.persistence.EntityManager;
import jakarta.persistence.Query;

import org.hibernate.Transaction;
import org.junit.AfterClass;
Expand Down
43 changes: 0 additions & 43 deletions data-upgrade-packaging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,49 +84,6 @@
<groupId>${project.groupId}</groupId>
<artifactId>data-upgrade-move-folders</artifactId>
</dependency>

<!-- Transitive dependencies provided by eXo : set to provided -->
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<scope>provided</scope>
</dependency>

</dependencies>
<build>
<finalName>data-upgrade-addon</finalName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,76 +30,8 @@
<dependencySet>
<outputDirectory>/lib</outputDirectory>
<includes>
<include>*:*:jar</include>
<include>${project.groupId}:*:jar</include>
</includes>
<excludes>
<!-- No Apache Tomcat artifacts have to be added in the packaging -->
<exclude>org.apache.tomcat:*</exclude>
<!-- Ant and related aren't really useful for us at runtime -->
<exclude>org.apache.ant:*</exclude>
<exclude>org.apache.axis:axis-ant:*</exclude>
<!-- commons-logging is forbidden and must be replaced by org.slf4j:jcl-over-slf4j -->
<exclude>commons-logging:*</exclude>
<!-- log4j is forbidden and must be replaced by org.slf4j:log4j-over-slf4j -->
<exclude>log4j:*</exclude>
<exclude>org.apache.logging.log4j:*</exclude>
<!-- We use jcl-over-slf4j, thus this one is forbidden to avoid infinite loops -->
<exclude>org.slf4j:slf4j-jcl:*</exclude>
<!-- We use log4j-over-slf4j, thus this one is forbidden to avoid infinite loops -->
<exclude>org.slf4j:slf4j-logj12:*</exclude>
<!-- We use jul-to-slf4j, thus this one is forbidden to avoid infinite loops -->
<exclude>org.slf4j:slf4j-jdk14:*</exclude>
<!-- These old versions of jdom are in conflict with new ones under org.jdom -->
<exclude>jdom:*:*</exclude>
<!-- Servlet API are provided by the app server. It shouldn't come from a project -->
<exclude>javax.servlet:*</exclude>
<exclude>com.google.gwt:gwt-user:*</exclude>
<exclude>javax.servlet.jsp:*</exclude>
<!-- Testing stuffs should never come here -->
<exclude>junit:*</exclude>
<exclude>org.testng:*</exclude>
<exclude>org.exoplatform.tool:exo.tool.framework.junit</exclude>
<exclude>org.jmock:*</exclude>
<exclude>jmock:*</exclude>
<exclude>org.mockito:*</exclude>
<!-- These old versions of jdom are in conflict with new ones under org.jdom:* -->
<exclude>jdom:*</exclude>
<!-- These artifacts are in conflict with others ones under xpp3:xpp3 -->
<exclude>xpp3:xpp3_min</exclude>
<!-- DEP-105: These artifacts are in conflict with others ones under org.ogce:xpp3 -->
<exclude>xpp3:xpp3</exclude>
<!-- These artifact is in conflict with ones under commons-beanutils:commons-beanutils -->
<exclude>commons-beanutils:commons-beanutils-core</exclude>
<!-- This artifact is in conflict with the one under org.jboss.logging:jboss-logging -->
<exclude>org.jboss.logging:jboss-logging-spi</exclude>
<!-- This artifact is in conflict with the one under org.codehaus.woodstox:woodstox-core-asl -->
<exclude>org.codehaus.woodstox:wstx-asl</exclude>
<!-- These are provided APIs by Java itself or the app server -->
<exclude>xml-apis:*</exclude>
<exclude>org.apache.geronimo.specs:geronimo-stax-api_1.0_spec</exclude>
<exclude>stax:*</exclude>
<exclude>javax.xml.stream:*</exclude>
<exclude>org.apache.geronimo.specs:geronimo-activation_1.0.2_spec</exclude>
<exclude>org.jboss.javaee:jboss-transaction-api</exclude>
<exclude>org.jboss.spec.javax.transaction:*</exclude>
<exclude>org.ow2.spec.ee:ow2-jta-1.1-spec</exclude>
<!-- PLF-4528 / CAL-148 : Conflict with com.totsp.feedpod:itunes-com-podcast -->
<exclude>rome:modules:*</exclude>
<!-- this is a build resource -->
<exclude>org.exoplatform.resources:exo-lgpl-license-resource-bundle:*</exclude>
<!-- Don't package any XML APIs dep to avoid conflicts the JVM -->
<exclude>*:xmlParserAPIs:*</exclude>
<!-- PLF-6122: Exclude icepdf older than 5.1.0. The groupId for Open Source bundles is now org.icepdf.os -->
<exclude>org.icepdf:icepdf-core:*</exclude>
<!-- COR-338: Exclude Apache poi-ooxml 3.8. Platform uses now 3.8-eXo01 -->
<exclude>org.apache.poi:poi-ooxml:[3.8]</exclude>
<exclude>org.slf4j:*:*</exclude>
<exclude>javax.*:*:*</exclude>
<exclude>org.gatein.mop:mop-api:*</exclude>
<exclude>org.gatein.mop:mop-spi:*</exclude>
<exclude>*:jdom2:*</exclude>
<exclude>*:dom4j:*</exclude>
</excludes>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
<useProjectArtifact>false</useProjectArtifact>
</dependencySet>
Expand Down
17 changes: 0 additions & 17 deletions data-upgrade-pages/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,9 @@
</properties>

<dependencies>
<dependency>
<groupId>org.exoplatform.commons</groupId>
<artifactId>commons-component-upgrade</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.exoplatform.gatein.portal</groupId>
<artifactId>exo.portal.component.api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.exoplatform.social</groupId>
<artifactId>social-component-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.exoplatform.gatein.portal</groupId>
<artifactId>exo.portal.component.portal</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.exoplatform.social</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import java.util.*;
import java.util.Map.Entry;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import jakarta.persistence.EntityManager;
import jakarta.persistence.Query;

import org.apache.commons.lang3.StringUtils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import jakarta.persistence.EntityManager;
import jakarta.persistence.Query;

public class PopularSpacesRemovePreferences extends UpgradeProductPlugin {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
import org.exoplatform.social.core.space.model.Space;
import org.exoplatform.social.core.space.spi.SpaceService;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import jakarta.persistence.EntityManager;
import jakarta.persistence.Query;
import java.util.Arrays;

public class SpaceApplicationMigration extends UpgradeProductPlugin {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package org.exoplatform.migration;

import org.exoplatform.component.test.AbstractKernelTest;
import org.exoplatform.component.test.ConfigurationUnit;
import org.exoplatform.component.test.ConfiguredBy;
import org.exoplatform.component.test.ContainerScope;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.container.xml.ValueParam;
import org.exoplatform.portal.config.model.Container;
Expand All @@ -16,11 +20,16 @@
import java.util.ArrayList;
import java.util.List;

import static org.junit.Assert.*;
import static org.mockito.Mockito.*;

@ConfiguredBy({
@ConfigurationUnit(scope = ContainerScope.ROOT, path = "conf/configuration.xml"),
@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/portal/configuration.xml"),
@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.portal-configuration-local.xml"),
@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "org/exoplatform/portal/config/conf/configuration.xml"),
})
@RunWith(MockitoJUnitRunner.class)
public class AddCSSClassToPageTest {
public class AddCSSClassToPageTest extends AbstractKernelTest {

private PageStorage pageStorage;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@
import java.util.ArrayList;

import static org.junit.Assert.*;

@ConfiguredBy({
@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.portal-configuration-local.xml"),
@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "org/exoplatform/portal/config/conf/configuration.xml")
@ConfigurationUnit(scope = ContainerScope.ROOT, path = "conf/configuration.xml"),
@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/portal/configuration.xml"),
@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.portal-configuration-local.xml"),
@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "org/exoplatform/portal/config/conf/configuration.xml"),
})
public class PopularSpacesRemovePreferencesTest extends AbstractKernelTest {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
package org.exoplatform.migration;

import org.exoplatform.container.xml.InitParams;
import org.exoplatform.container.xml.ValueParam;
import org.exoplatform.portal.config.UserPortalConfigService;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.times;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.junit.MockitoJUnitRunner;

import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.times;
import org.exoplatform.component.test.AbstractKernelTest;
import org.exoplatform.component.test.ConfigurationUnit;
import org.exoplatform.component.test.ConfiguredBy;
import org.exoplatform.component.test.ContainerScope;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.container.xml.ValueParam;
import org.exoplatform.portal.config.UserPortalConfigService;

@ConfiguredBy({
@ConfigurationUnit(scope = ContainerScope.ROOT, path = "conf/configuration.xml"),
@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/portal/configuration.xml"),
@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.portal-configuration-local.xml"),
@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "org/exoplatform/portal/config/conf/configuration.xml"),
})
@RunWith(MockitoJUnitRunner.class)
public class ReloadPortalConfigurationMigrationTest {
public class ReloadPortalConfigurationMigrationTest extends AbstractKernelTest {

@Mock
UserPortalConfigService userPortalConfigService;
Expand Down
Loading