finalist / liferay-oidc-plugin

Plugin for Liferay, enabling OpenID Connect authentication
Apache License 2.0
21 stars 31 forks source link

DXP 7.1 support #32

Open mperico opened 6 years ago

mperico commented 6 years ago

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

gvanderploeg commented 6 years ago

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.

mcgitty commented 5 years ago

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

gvanderploeg commented 5 years ago

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

mcgitty commented 5 years ago

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.

gvanderploeg commented 5 years ago

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 notifications@github.com 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 @@

com.liferay.portal com.liferay.portal.kernel - 2.0.0 + 3.0.0 provided
     <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 @@

com.liferay com.liferay.frontend.taglib - 2.0.0 + 3.0.0 provided

@@ -28,13 +28,13 @@

com.liferay.portal com.liferay.util.taglib - 2.0.0 + 3.0.0 provided
     <dependency>
         <groupId>com.liferay.portal</groupId>
         <artifactId>com.liferay.portal.kernel</artifactId>
  • 2.0.0
  • 3.0.0
         <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 commented 5 years ago

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.

cnr-roxx commented 5 years ago

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