liferay-oidc-plugin icon indicating copy to clipboard operation
liferay-oidc-plugin copied to clipboard

DXP 7.1 support

Open mperico opened this issue 6 years ago • 7 comments

I downloaded and installed DXP 7.1, we are running java 8. I tried to install the open id app version 0.5.2. I get this error:

2018-08-30 14:26:41.880 ERROR [fileinstall-/usr/local/liferay-ce-portal-7.1.0-ga1/osgi/marketplace][org_apache_felix_fileinstall:97] Failed to install artifact: /usr/local/liferay-ce-portal-7.1.0-ga1/osgi/marketplace/OpenID-Connect-plugin.lpkg com.liferay.portal.lpkg.deployer.LPKGVerifyException: com.liferay.portal.lpkg.deployer.LPKGVerifyException: LPKG validation failed with {[missing requirement nl.finalist.liferay.oidc; version=0.5.2; type=osgi.bundle [caused by: Unable to resolve nl.finalist.liferay.oidc version=0.5.2: missing requirement com.liferay.portal.kernel.model; version=[1.0.0,2.0.0)]], [missing requirement nl.finalist.liferay.oidc.portalsettings; version=0.5.2; type=osgi.bundle [caused by: Unable to resolve nl.finalist.liferay.oidc.portalsettings version=0.5.2: missing requirement com.liferay.portal.kernel.model; version=[1.0.0,2.0.0)]]} at com.liferay.portal.lpkg.deployer.internal.DefaultLPKGVerifier.verify(DefaultLPKGVerifier.java:127) at com.liferay.portal.lpkg.deployer.internal.DefaultLPKGDeployer.deploy(DefaultLPKGDeployer.java:118) at com.liferay.portal.lpkg.deployer.internal.LPKGArtifactInstaller.install(LPKGArtifactInstaller.java:125) at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:937) at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:871) at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:485) at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312) Caused by: com.liferay.portal.lpkg.deployer.LPKGVerifyException: LPKG validation failed with {[missing requirement nl.finalist.liferay.oidc; version=0.5.2; type=osgi.bundle [caused by: Unable to resolve nl.finalist.liferay.oidc version=0.5.2: missing requirement com.liferay.portal.kernel.model; version=[1.0.0,2.0.0)]], [missing requirement nl.finalist.liferay.oidc.portalsettings; version=0.5.2; type=osgi.bundle [caused by: Unable to resolve nl.finalist.liferay.oidc.portalsettings version=0.5.2: missing requirement com.liferay.portal.kernel.model; version=[1.0.0,2.0.0)]]} at com.liferay.portal.lpkg.deployer.internal.LPKGIndexValidator.validate(LPKGIndexValidator.java:265) at com.liferay.portal.lpkg.deployer.internal.DefaultLPKGVerifier.verify(DefaultLPKGVerifier.java:93) ... 7 more

mperico avatar Aug 30 '18 14:08 mperico

Hi,

Thanks for trying out the plugin in 7.1. Apparently the dependency definitions are not ready yet for 7.1, so far it has only been tested (and running in prod) in 6.2 and DXP 7.0. I'll mark this issue as an enhancement and will try to find some time in the near future to add 7.1 support.

gvanderploeg avatar Aug 31 '18 07:08 gvanderploeg

Is there a near term plan (next few months) to support 7.1?

mcgitty avatar Dec 05 '18 05:12 mcgitty

No explicit plans, but it's still on the radar.

gvanderploeg avatar Dec 05 '18 15:12 gvanderploeg

For what it's worth, this diff will build both DXP modules that can be deployed to Liferay 7.1 to active state:

diff --git a/dxp-oidc-filter/pom.xml b/dxp-oidc-filter/pom.xml
index a3fdb73..21040ae 100644
--- a/dxp-oidc-filter/pom.xml
+++ b/dxp-oidc-filter/pom.xml
@@ -38,7 +38,7 @@
                <dependency>
                        <groupId>com.liferay.portal</groupId>
                        <artifactId>com.liferay.portal.kernel</artifactId>
-                       <version>2.0.0</version>
+                       <version>3.0.0</version>
                        <scope>provided</scope>
                </dependency>
         <dependency>
diff --git a/dxp-oidc-portalsettings-web/pom.xml b/dxp-oidc-portalsettings-web/pom.xml
index 59851ff..fabf298 100644
--- a/dxp-oidc-portalsettings-web/pom.xml
+++ b/dxp-oidc-portalsettings-web/pom.xml
@@ -15,7 +15,7 @@
         <dependency>
             <groupId>com.liferay</groupId>
             <artifactId>com.liferay.frontend.taglib</artifactId>
-            <version>2.0.0</version>
+            <version>3.0.0</version>
             <scope>provided</scope>
         </dependency>
 
@@ -28,13 +28,13 @@
         <dependency>
             <groupId>com.liferay.portal</groupId>
             <artifactId>com.liferay.util.taglib</artifactId>
-            <version>2.0.0</version>
+            <version>3.0.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>com.liferay.portal</groupId>
             <artifactId>com.liferay.portal.kernel</artifactId>
-            <version>2.0.0</version>
+            <version>3.0.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

However, the 2 dxp jars built from this change won't work in Liferay 7.0, so the team need a way to produce both or build selectively.

mcgitty avatar Dec 06 '18 16:12 mcgitty

Thanks for this initial work, Michael. I'll try and see whether we can rework that to a version range that gets properly translated into OSGi Import-Package statements with ranges, so that both 7.0 and 7.1 will be satisfied...

On Thu, 6 Dec 2018 at 17:29, Michael Chen [email protected] wrote:

For what is worth, this diff will build both DXP modules that can be deployed to Liferay 7.1 to active state:

diff --git a/dxp-oidc-filter/pom.xml b/dxp-oidc-filter/pom.xml index a3fdb73..21040ae 100644 --- a/dxp-oidc-filter/pom.xml +++ b/dxp-oidc-filter/pom.xml @@ -38,7 +38,7 @@ <groupId>com.liferay.portal</groupId> <artifactId>com.liferay.portal.kernel</artifactId>

  •                   <version>2.0.0</version>
    
  •                   <version>3.0.0</version>
                      <scope>provided</scope>
              </dependency>
       <dependency>
    

diff --git a/dxp-oidc-portalsettings-web/pom.xml b/dxp-oidc-portalsettings-web/pom.xml index 59851ff..fabf298 100644 --- a/dxp-oidc-portalsettings-web/pom.xml +++ b/dxp-oidc-portalsettings-web/pom.xml @@ -15,7 +15,7 @@ <groupId>com.liferay</groupId> <artifactId>com.liferay.frontend.taglib</artifactId>

  •        <version>2.0.0</version>
    
  •        <version>3.0.0</version>
           <scope>provided</scope>
       </dependency>
    

@@ -28,13 +28,13 @@ <groupId>com.liferay.portal</groupId> <artifactId>com.liferay.util.taglib</artifactId>

  •        <version>2.0.0</version>
    
  •        <version>3.0.0</version>
           <scope>provided</scope>
       </dependency>
       <dependency>
           <groupId>com.liferay.portal</groupId>
           <artifactId>com.liferay.portal.kernel</artifactId>
    
  •        <version>2.0.0</version>
    
  •        <version>3.0.0</version>
           <scope>provided</scope>
       </dependency>
       <dependency>
    

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/finalist/liferay-oidc-plugin/issues/32#issuecomment-444935036, or mute the thread https://github.com/notifications/unsubscribe-auth/ABG69vIPEP2Mab-z5X5eHabZR0Yk9sOpks5u2UYHgaJpZM4WToCr .

-- http://www.finalist.nl

gvanderploeg avatar Dec 10 '18 15:12 gvanderploeg

For future reference: https://stackoverflow.com/a/16599858/637423 TLDR; the fact that the version of the dependencies changed the major version, indicates breaking changes. Therefore the bnd-maven-plugin will always create a version range like [1.0,2), even if we explicitly set the version range in pom.xml like [2.0.0,3.0.0]. This might indeed mean that we need to create separate builds... To be continued.

gvanderploeg avatar Dec 12 '18 09:12 gvanderploeg

Big thanks for developing this plugin! Are there any plans for supporting Liferay 7.1 and/or 7.2?

cnr-roxx avatar Jul 05 '19 11:07 cnr-roxx