From 6b79abeaeba747ea226c5676ed5979fe0a8832ed Mon Sep 17 00:00:00 2001 From: pasindu Date: Mon, 26 Feb 2024 20:21:01 +0530 Subject: [PATCH] Fix Osgi issues --- .../internal/APIManagerServiceComponent.java | 2 +- .../org.wso2.carbon.apimgt.handlers/pom.xml | 4 -- .../pom.xml | 13 +++--- .../APIIntegrationClientServiceComponent.java | 1 + .../pom.xml | 4 -- .../pom.xml | 17 +++----- .../pom.xml | 9 +++-- .../pom.xml | 4 ++ .../pom.xml | 4 -- .../pom.xml | 11 ++--- .../pom.xml | 13 ++---- .../DataPublisherServiceComponent.java | 1 + .../pom.xml | 13 +++--- .../OAuthAuthenticatorServiceComponent.java | 1 + .../pom.xml | 4 -- pom.xml | 40 ++++++++++++++++++- 16 files changed, 80 insertions(+), 61 deletions(-) diff --git a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.extension.rest.api/src/main/java/io/entgra/device/mgt/core/apimgt/extension/rest/api/internal/APIManagerServiceComponent.java b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.extension.rest.api/src/main/java/io/entgra/device/mgt/core/apimgt/extension/rest/api/internal/APIManagerServiceComponent.java index 51fbdc912e..69015d5697 100644 --- a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.extension.rest.api/src/main/java/io/entgra/device/mgt/core/apimgt/extension/rest/api/internal/APIManagerServiceComponent.java +++ b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.extension.rest.api/src/main/java/io/entgra/device/mgt/core/apimgt/extension/rest/api/internal/APIManagerServiceComponent.java @@ -32,7 +32,7 @@ import org.osgi.service.component.annotations.*; import org.wso2.carbon.apimgt.impl.APIManagerConfigurationService; @Component( - name = "io.entgra.device.mgt.core.apimgt.extension.rest.api.internal.PublisherRESTAPIServiceComponent", + name = "io.entgra.device.mgt.core.apimgt.extension.rest.api.internal.APIManagerServiceComponent", immediate = true) public class APIManagerServiceComponent { diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml index c1cfef2e3e..d31e7093e5 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml @@ -65,10 +65,6 @@ - - org.apache.felix - maven-scr-plugin - org.apache.felix maven-bundle-plugin diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml index 8620769238..51b9f17fcb 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml @@ -34,10 +34,6 @@ - - org.apache.felix - maven-scr-plugin - org.apache.felix maven-bundle-plugin @@ -54,8 +50,8 @@ !org.wso2.carbon.apimgt.integration.client.internal - org.osgi.framework, - org.osgi.service.component, + org.osgi.framework.*;version="${imp.package.version.osgi.framework}", + org.osgi.service.*;version="${imp.package.version.osgi.service}", feign, feign.codec, feign.auth, @@ -126,6 +122,11 @@ + + org.apache.felix + org.apache.felix.scr.ds-annotations + provided + com.squareup.okhttp3 okhttp diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/internal/APIIntegrationClientServiceComponent.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/internal/APIIntegrationClientServiceComponent.java index 8343372d54..536a5e6c34 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/internal/APIIntegrationClientServiceComponent.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/src/main/java/org/wso2/carbon/apimgt/integration/client/internal/APIIntegrationClientServiceComponent.java @@ -25,6 +25,7 @@ import org.osgi.service.component.ComponentContext; import org.wso2.carbon.apimgt.integration.client.IntegrationClientServiceImpl; import org.wso2.carbon.apimgt.integration.client.configs.APIMConfigReader; import org.wso2.carbon.apimgt.integration.client.service.IntegrationClientService; +import org.osgi.service.component.annotations.*; import io.entgra.device.mgt.core.identity.jwt.client.extension.service.JWTClientManagerService; @Component( diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/pom.xml b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/pom.xml index d74ae06662..582e766c04 100644 --- a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/pom.xml +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.common/pom.xml @@ -43,10 +43,6 @@ 1.8 - - org.apache.felix - maven-scr-plugin - org.apache.felix maven-bundle-plugin diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.core/pom.xml b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.core/pom.xml index ab6ecb71e1..8d9fc5a86c 100644 --- a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.core/pom.xml +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.core/pom.xml @@ -34,10 +34,6 @@ - - org.apache.felix - maven-scr-plugin - org.apache.maven.plugins maven-compiler-plugin @@ -81,14 +77,11 @@ - - - - - - - - + + org.apache.felix + org.apache.felix.scr.ds-annotations + provided + org.wso2.carbon org.wso2.carbon.utils diff --git a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.enforce/pom.xml b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.enforce/pom.xml index 1e5507acdf..c623d45b07 100644 --- a/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.enforce/pom.xml +++ b/components/cea-mgt/io.entgra.device.mgt.core.cea.mgt.enforce/pom.xml @@ -34,10 +34,6 @@ - - org.apache.felix - maven-scr-plugin - org.apache.maven.plugins maven-compiler-plugin @@ -106,6 +102,11 @@ + + org.apache.felix + org.apache.felix.scr.ds-annotations + provided + diff --git a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.api/pom.xml b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.api/pom.xml index 8765bab195..9fa160fe27 100644 --- a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.api/pom.xml +++ b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.api/pom.xml @@ -128,6 +128,10 @@ + + org.wso2.orbit.com.fasterxml.jackson.core + jackson-annotations + org.springframework spring-web diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.organization/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.organization/pom.xml index 3de4acb1f7..144145dceb 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.organization/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.device.organization/pom.xml @@ -325,10 +325,6 @@ 1.8 - - org.apache.felix - maven-scr-plugin - org.apache.felix maven-bundle-plugin diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/pom.xml index 4cc4db9df3..7f8b9e1131 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/pom.xml @@ -36,16 +36,12 @@ - org.apache.felix - maven-scr-plugin - - + org.apache.maven.plugins maven-compiler-plugin 1.8 1.8 - 2.3.2 org.apache.felix @@ -129,6 +125,11 @@ + + org.apache.felix + org.apache.felix.scr.ds-annotations + provided + org.wso2.carbon org.wso2.carbon.core diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml index 314beb5e65..43d912832e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml @@ -35,12 +35,9 @@ - org.eclipse.osgi - org.eclipse.osgi - - - org.eclipse.osgi - org.eclipse.osgi.services + org.apache.felix + org.apache.felix.scr.ds-annotations + provided org.testng @@ -87,10 +84,6 @@ - - org.apache.felix - maven-scr-plugin - org.apache.felix maven-bundle-plugin diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/internal/DataPublisherServiceComponent.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/internal/DataPublisherServiceComponent.java index 0e83028553..7472d3800b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/internal/DataPublisherServiceComponent.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/src/main/java/org/wso2/carbon/device/mgt/analytics/data/publisher/internal/DataPublisherServiceComponent.java @@ -23,6 +23,7 @@ import org.apache.commons.logging.LogFactory; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceRegistration; import org.osgi.service.component.ComponentContext; +import org.osgi.service.component.annotations.*; import org.wso2.carbon.device.mgt.analytics.data.publisher.config.AnalyticsConfiguration; import org.wso2.carbon.device.mgt.analytics.data.publisher.service.EventsPublisherService; import org.wso2.carbon.device.mgt.analytics.data.publisher.service.EventsPublisherServiceImpl; diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml index c1c9255354..9c784d0af3 100644 --- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml @@ -30,6 +30,11 @@ org.wso2.carbon.identity.authenticator.backend.oauth + + org.apache.felix + org.apache.felix.scr.ds-annotations + provided + org.wso2.carbon org.wso2.carbon.utils @@ -80,10 +85,6 @@ - - org.apache.felix - maven-scr-plugin - org.apache.felix maven-bundle-plugin @@ -110,8 +111,8 @@ org.apache.commons.httpclient, org.apache.commons.logging, org.apache.commons.codec.binary;version="${commons-codec.wso2.osgi.version.range}", - org.osgi.framework, - org.osgi.service.component, + org.osgi.framework.*;version="${imp.package.version.osgi.framework}", + org.osgi.service.*;version="${imp.package.version.osgi.service}", org.wso2.carbon.core.security, org.wso2.carbon.core.services.authentication, org.wso2.carbon.utils.multitenancy, diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/internal/OAuthAuthenticatorServiceComponent.java b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/internal/OAuthAuthenticatorServiceComponent.java index c4ec7e8aa1..30de0c2522 100755 --- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/internal/OAuthAuthenticatorServiceComponent.java +++ b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/src/main/java/org/wso2/carbon/identity/authenticator/backend/oauth/internal/OAuthAuthenticatorServiceComponent.java @@ -25,6 +25,7 @@ import org.osgi.service.component.ComponentContext; import org.wso2.carbon.core.services.authentication.CarbonServerAuthenticator; import org.wso2.carbon.identity.authenticator.backend.oauth.OauthAuthenticator; import org.wso2.carbon.identity.oauth2.OAuth2TokenValidationService; +import org.osgi.service.component.annotations.*; @Component( name = "org.wso2.carbon.identity.backend.oauth.authenticator", diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml index 41edc660b2..2a0aec705c 100644 --- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml @@ -36,10 +36,6 @@ - - org.apache.felix - maven-scr-plugin - org.apache.felix maven-bundle-plugin diff --git a/pom.xml b/pom.xml index 4b34fddaf4..a08eff82a5 100644 --- a/pom.xml +++ b/pom.xml @@ -172,6 +172,12 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.device.mgt.common ${io.entgra.device.mgt.core.version} + + + com.fasterxml.jackson.core + jackson-annotations + + io.entgra.device.mgt.core @@ -766,6 +772,10 @@ org.wso2.carbon.user.core ${carbon.kernel.version} + + com.fasterxml.jackson.core + jackson-annotations + org.apache.felix javax.servlet @@ -921,11 +931,23 @@ org.wso2.carbon.apimgt org.wso2.carbon.apimgt.api ${carbon.api.mgt.version} + + + com.fasterxml.jackson.core + jackson-annotations + + org.wso2.carbon.apimgt org.wso2.carbon.apimgt.impl ${carbon.api.mgt.version} + + + com.fasterxml.jackson.core + jackson-annotations + + @@ -1430,6 +1452,10 @@ org.wso2.carbon.registry.indexing ${carbon.registry.version} + + com.fasterxml.jackson.core + jackson-annotations + org.wso2.carbon.identity org.wso2.carbon.user.mgt.stub @@ -1510,6 +1536,12 @@ io.swagger swagger-core ${swagger.version} + + + com.fasterxml.jackson.core + jackson-annotations + + io.swagger @@ -1610,6 +1642,12 @@ com.fasterxml.jackson.core jackson-databind ${fasterxml.jackson.databind.version} + + + com.fasterxml.jackson.core + jackson-annotations + + @@ -2194,7 +2232,7 @@ 2.7.18 2.6.1.wso2v2 - [1.6.0, 2.0.0) + [1.3.0, 2.0.0) [1.2.0,1.3.0) 2.23.4