From ded125237585a2b9022607f0864ed2a4bfe9f257 Mon Sep 17 00:00:00 2001 From: Bruno Sinou Date: Thu, 11 Dec 2014 15:25:43 +0000 Subject: [PATCH] Fix projects dependencies and build strategies after refactoring. git-svn-id: https://svn.argeo.org/commons/trunk@7564 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- dep/org.argeo.security.dep.node.rcp/pom.xml | 19 +++-- org.argeo.eclipse.ui.rap/pom.xml | 24 ++++--- org.argeo.eclipse.ui.rcp/bnd.bnd | 29 +++++--- org.argeo.eclipse.ui.rcp/pom.xml | 56 +++------------ org.argeo.eclipse.ui.workbench/bnd.bnd | 3 +- org.argeo.eclipse.ui.workbench/pom.xml | 44 +++--------- .../jcr/internal/model/WorkspaceElem.java | 2 +- .../ui/workbench/osgi/BundlesView.java | 5 +- org.argeo.eclipse.ui/bnd.bnd | 20 ++++-- org.argeo.eclipse.ui/pom.xml | 24 ++++--- org.argeo.security.ui.admin/bnd.bnd | 20 ++++++ org.argeo.security.ui.admin/pom.xml | 69 ++++--------------- .../ui/admin/editors/ArgeoUserEditor.java | 13 ++-- org.argeo.security.ui/bnd.bnd | 15 ++++ org.argeo.security.ui/pom.xml | 48 +------------ pom.xml | 1 - 16 files changed, 151 insertions(+), 241 deletions(-) diff --git a/dep/org.argeo.security.dep.node.rcp/pom.xml b/dep/org.argeo.security.dep.node.rcp/pom.xml index 9f8b48de0..31c1f0b45 100644 --- a/dep/org.argeo.security.dep.node.rcp/pom.xml +++ b/dep/org.argeo.security.dep.node.rcp/pom.xml @@ -54,30 +54,29 @@ org.argeo.eclipse.ui 2.1.12-SNAPSHOT + + org.argeo.commons - org.argeo.security.equinox + org.argeo.security.ui.rcp 2.1.12-SNAPSHOT org.argeo.commons - org.argeo.security.ui + org.argeo.security.equinox 2.1.12-SNAPSHOT - - org.argeo.commons - org.argeo.security.dep.node + org.argeo.security.ui 2.1.12-SNAPSHOT - pom - org.argeo.commons - org.argeo.security.ui.rcp + org.argeo.security.dep.node 2.1.12-SNAPSHOT + pom @@ -140,8 +139,8 @@ false - org.argeo.commons.base:org.argeo.eclipse.ui.rcp - org.argeo.commons.security:org.argeo.security.ui.rcp + org.argeo.commons:org.argeo.eclipse.ui.rcp + org.argeo.commons:org.argeo.security.ui.rcp diff --git a/org.argeo.eclipse.ui.rap/pom.xml b/org.argeo.eclipse.ui.rap/pom.xml index d2795efe6..1d083187c 100644 --- a/org.argeo.eclipse.ui.rap/pom.xml +++ b/org.argeo.eclipse.ui.rap/pom.xml @@ -10,25 +10,17 @@ org.argeo.eclipse.ui.rap Commons Eclipse UI RAP + Provide rap specific classes and behaviour in order to provide single sourcing abilities jar - - org.argeo.commons - org.argeo.util - 2.1.12-SNAPSHOT - + org.argeo.commons org.argeo.eclipse.ui 2.1.12-SNAPSHOT - - - org.argeo.tp - slf4j.org.apache.commons.logging - - + org.argeo.commons org.argeo.eclipse.dep.rap @@ -36,5 +28,15 @@ 2.1.12-SNAPSHOT + + + org.argeo.commons + org.argeo.util + 2.1.12-SNAPSHOT + + + org.argeo.tp + slf4j.org.apache.commons.logging + \ No newline at end of file diff --git a/org.argeo.eclipse.ui.rcp/bnd.bnd b/org.argeo.eclipse.ui.rcp/bnd.bnd index 8e43cdfdf..4fd32e8c8 100644 --- a/org.argeo.eclipse.ui.rcp/bnd.bnd +++ b/org.argeo.eclipse.ui.rcp/bnd.bnd @@ -1,11 +1,18 @@ -Bundle-ActivationPolicy: lazy -Bundle-Activator: org.argeo.eclipse.ui.ArgeoUiPlugin -Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime -Import-Package: org.springframework.beans.factory,\ -org.springframework.core.io.support,\ -org.apache.commons.io,\ -org.argeo,\ -!org.eclipse.core.runtime,\ -!org.eclipse.core.commands,\ -!org.eclipse.ui.plugin,\ -* +Require-Bundle: org.eclipse.ui,\ + org.eclipse.core.runtime +Import-Package: org.apache.commons.io,\ + org.argeo,\ + org.eclipse.core.commands,\ + org.eclipse.swt.widgets;version="[0,4.0)",\ + org.springframework.beans.factory,\ + org.springframework.core.io.support,\ + !org.eclipse.core.runtime,\ + !org.eclipse.ui.plugin,\ + * + + +# Was !org.eclipse.core.commands,\ why ? + +#Bundle-Activator: org.argeo.eclipse.ui.ArgeoUiPlugin +#Bundle-ActivationPolicy: lazy +#Ignore-Package: org.eclipse.core.commands \ No newline at end of file diff --git a/org.argeo.eclipse.ui.rcp/pom.xml b/org.argeo.eclipse.ui.rcp/pom.xml index 8282250c6..ed2d76185 100644 --- a/org.argeo.eclipse.ui.rcp/pom.xml +++ b/org.argeo.eclipse.ui.rcp/pom.xml @@ -10,46 +10,10 @@ org.argeo.eclipse.ui.rcp Commons Eclipse UI RCP + Provide RCP specific classes and behaviour in order to enable single sourcing jar - - - - org.apache.maven.plugins - maven-compiler-plugin - - - org.apache.maven.plugins - maven-source-plugin - - - org.apache.maven.plugins - maven-jar-plugin - - - org.apache.felix - maven-bundle-plugin - - - - lazy - org.argeo.eclipse.ui.ArgeoUiPlugin - org.eclipse.ui,org.eclipse.core.runtime - - org.springframework.beans.factory, - org.springframework.core.io.support, - org.apache.commons.io, - org.argeo, - !org.eclipse.core.runtime, - !org.eclipse.core.commands, - !org.eclipse.ui.plugin, - * - - - - - - + org.argeo.commons @@ -57,7 +21,7 @@ 2.1.12-SNAPSHOT - + org.argeo.commons org.argeo.eclipse.dep.rcp @@ -65,20 +29,16 @@ 2.1.12-SNAPSHOT - - - org.argeo.commons - org.argeo.util - 2.1.12-SNAPSHOT - - org.argeo.tp org.apache.commons.io - - + + org.argeo.commons + org.argeo.util + 2.1.12-SNAPSHOT + org.argeo.tp slf4j.org.apache.commons.logging diff --git a/org.argeo.eclipse.ui.workbench/bnd.bnd b/org.argeo.eclipse.ui.workbench/bnd.bnd index 12e9e59eb..cc75c057e 100644 --- a/org.argeo.eclipse.ui.workbench/bnd.bnd +++ b/org.argeo.eclipse.ui.workbench/bnd.bnd @@ -9,7 +9,8 @@ Require-Bundle: org.eclipse.ui;resolution:=optional,\ Import-Package: org.argeo.eclipse.ui.specific,\ org.argeo.eclipse.spring,\ - org.osgi.framework,\ + org.eclipse.swt.widgets;version="[0,1)",\ + org.osgi.framework;version="[1.5,2)",\ org.osgi.service.packageadmin,\ org.springframework.beans.factory,\ org.springframework.core.io.support,\ diff --git a/org.argeo.eclipse.ui.workbench/pom.xml b/org.argeo.eclipse.ui.workbench/pom.xml index 67451c833..c1ebe46cc 100644 --- a/org.argeo.eclipse.ui.workbench/pom.xml +++ b/org.argeo.eclipse.ui.workbench/pom.xml @@ -9,38 +9,26 @@ org.argeo.eclipse.ui.workbench Commons Eclipse UI Workbench - - - - - - - - - - - - - - - - - - - - org.argeo.commons org.argeo.eclipse.ui 2.1.12-SNAPSHOT + + + + org.argeo.tp + org.osgi.core + + - + org.argeo.commons - org.argeo.eclipse.ui.rcp + org.argeo.eclipse.ui.rap 2.1.12-SNAPSHOT provided @@ -53,23 +41,11 @@ provided - - - org.argeo.tp - org.eclipse.osgi - provided - - org.argeo.commons org.argeo.util 2.1.12-SNAPSHOT - - diff --git a/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/jcr/internal/model/WorkspaceElem.java b/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/jcr/internal/model/WorkspaceElem.java index 8cd08d96e..710df928f 100644 --- a/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/jcr/internal/model/WorkspaceElem.java +++ b/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/jcr/internal/model/WorkspaceElem.java @@ -19,7 +19,7 @@ import javax.jcr.Node; import javax.jcr.NodeIterator; import javax.jcr.RepositoryException; import javax.jcr.Session; -import javax.jcr.Workspace; +// import javax.jcr.Workspace; import org.argeo.ArgeoException; import org.argeo.eclipse.ui.TreeParent; diff --git a/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/osgi/BundlesView.java b/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/osgi/BundlesView.java index ca32da0d8..0734ef56d 100644 --- a/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/osgi/BundlesView.java +++ b/org.argeo.eclipse.ui.workbench/src/org/argeo/eclipse/ui/workbench/osgi/BundlesView.java @@ -108,9 +108,10 @@ public class BundlesView extends ViewPart { public String getText(Object element) { - return ""; + // return ""; // FIXME triggers compilation failure - // return ((Bundle) element).getVersion().toString(); + Bundle bundle = (org.osgi.framework.Bundle) element; + return bundle.getVersion().toString(); } }); new ColumnViewerComparator(column, new Comparator() { diff --git a/org.argeo.eclipse.ui/bnd.bnd b/org.argeo.eclipse.ui/bnd.bnd index 41f9266c9..ca6aaf028 100644 --- a/org.argeo.eclipse.ui/bnd.bnd +++ b/org.argeo.eclipse.ui/bnd.bnd @@ -1,9 +1,15 @@ Bundle-ActivationPolicy: lazy -Bundle-Activator: org.argeo.eclipse.ui.ArgeoUiPlugin -Require-Bundle: org.eclipse.ui;resolution:=optional,org.eclipse.rap.ui;resolution:=optional,org.eclipse.core.runtime +#Bundle-SymbolicName: org.argeo.eclipse.ui;singleton:=true +#Bundle-Activator: org.argeo.eclipse.ui.ArgeoUiPlugin +Require-Bundle: org.eclipse.ui;resolution:=optional,\ + org.eclipse.rap.ui;resolution:=optional,\ + org.eclipse.core.runtime Import-Package: org.springframework.beans.factory,\ -org.springframework.core.io.support,\ -!org.eclipse.core.runtime,\ -!org.eclipse.core.commands,\ -!org.eclipse.ui.plugin,\ -* + org.springframework.core.io.support,\ + org.eclipse.swt.widgets;version="[0,1)",\ + org.osgi.framework;version="[1.5,2)",\ + org.osgi.util.tracker;version="[1.4,2)",\ + !org.eclipse.core.runtime,\ + !org.eclipse.core.commands,\ + !org.eclipse.ui.plugin,\ + * diff --git a/org.argeo.eclipse.ui/pom.xml b/org.argeo.eclipse.ui/pom.xml index e79f62e1c..b831bf204 100644 --- a/org.argeo.eclipse.ui/pom.xml +++ b/org.argeo.eclipse.ui/pom.xml @@ -25,14 +25,7 @@ - - - org.argeo.commons - org.argeo.server.jcr - 2.1.12-SNAPSHOT - - - + org.argeo.commons org.argeo.eclipse.dep.rap @@ -48,16 +41,25 @@ 2.1.12-SNAPSHOT - + - org.argeo.tp - org.springframework.context + org.argeo.commons + org.argeo.server.jcr + 2.1.12-SNAPSHOT + + org.argeo.tp org.springframework.osgi.extender + + + org.argeo.tp + org.springframework.context + + org.argeo.tp diff --git a/org.argeo.security.ui.admin/bnd.bnd b/org.argeo.security.ui.admin/bnd.bnd index e69de29bb..8bfac3a9a 100644 --- a/org.argeo.security.ui.admin/bnd.bnd +++ b/org.argeo.security.ui.admin/bnd.bnd @@ -0,0 +1,20 @@ +Bundle-SymbolicName: org.argeo.security.ui.admin;singleton:=true +Bundle-ActivationPolicy: lazy +Bundle-Activator: org.argeo.security.ui.admin.SecurityAdminPlugin +Require-Bundle: org.eclipse.core.runtime +Import-Package: *,\ + org.eclipse.core.runtime.jobs,\ + org.argeo.eclipse.spring,\ + org.eclipse.jface.window,\ + org.eclipse.swt,\ + org.eclipse.ui.services,\ + org.springframework.dao,\ + org.eclipse.swt.widgets;version="[0,1)",\ + org.springframework.core +Export-Packages: org.argeo.security.ui.admin.* + +# FIXME Import issue: target plateform and imports are not OK for security.dep.node.rcp +# org.eclipse.core.runtime.jobs;version="[3.2,4)",\ +# Useless this bundle? +# org.eclipse.ui;resolution:=optional,\ +# org.eclipse.rap.ui;resolution:=optional diff --git a/org.argeo.security.ui.admin/pom.xml b/org.argeo.security.ui.admin/pom.xml index 48ce91017..e96324d29 100644 --- a/org.argeo.security.ui.admin/pom.xml +++ b/org.argeo.security.ui.admin/pom.xml @@ -11,44 +11,6 @@ org.argeo.security.ui.admin Commons Security Admin UI jar - - - - org.apache.maven.plugins - maven-compiler-plugin - - - org.apache.maven.plugins - maven-source-plugin - - - org.apache.maven.plugins - maven-jar-plugin - - - org.apache.felix - maven-bundle-plugin - - - ${project.artifactId};singleton:=true - lazy - org.argeo.security.ui.admin.SecurityAdminPlugin - org.eclipse.core.runtime - - *, - org.eclipse.swt, - org.eclipse.ui.services, - org.eclipse.jface.window, - org.argeo.eclipse.spring, - org.springframework.dao, - org.springframework.core, - - org.argeo.security.ui.admin.* - - - - - @@ -56,14 +18,26 @@ org.argeo.security.ui 2.1.12-SNAPSHOT - org.argeo.commons org.argeo.security.core 2.1.12-SNAPSHOT - + + + org.argeo.commons + org.argeo.eclipse.ui.rap + 2.1.12-SNAPSHOT + provided + + + org.argeo.commons + org.argeo.eclipse.dep.rap + pom + 2.1.12-SNAPSHOT + provided + org.argeo.commons org.argeo.eclipse.ui @@ -89,20 +63,5 @@ slf4j.org.apache.commons.logging - - - - org.argeo.commons - org.argeo.eclipse.dep.rap - pom - 2.1.12-SNAPSHOT - provided - - - org.argeo.commons - org.argeo.eclipse.ui.rap - 2.1.12-SNAPSHOT - provided - \ No newline at end of file diff --git a/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/editors/ArgeoUserEditor.java b/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/editors/ArgeoUserEditor.java index ebc08319e..990c4ac82 100644 --- a/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/editors/ArgeoUserEditor.java +++ b/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/editors/ArgeoUserEditor.java @@ -56,8 +56,13 @@ public class ArgeoUserEditor extends FormEditor { userProfile = UserJcrUtils.getUserProfile(session, username); if (userAdminService.userExists(username)) { - userDetails = (JcrUserDetails) userAdminService - .loadUserByUsername(username); + try { + userDetails = (JcrUserDetails) userAdminService + .loadUserByUsername(username); + } catch (Exception e) { + throw new ArgeoException("Cannot retrieve userDetails for " + + username, e); + } } else { GrantedAuthority[] authorities = {}; try { @@ -142,12 +147,12 @@ public class ArgeoUserEditor extends FormEditor { JcrUtils.logoutQuietly(session); super.dispose(); } - + /* DEPENDENCY INJECTION */ public void setUserAdminService(UserAdminService userAdminService) { this.userAdminService = userAdminService; } - + public void setRepository(Repository repository) { try { session = repository.login(); diff --git a/org.argeo.security.ui/bnd.bnd b/org.argeo.security.ui/bnd.bnd index e69de29bb..176c72a71 100644 --- a/org.argeo.security.ui/bnd.bnd +++ b/org.argeo.security.ui/bnd.bnd @@ -0,0 +1,15 @@ +Bundle-SymbolicName: org.argeo.security.ui;singleton:=true +Bundle-ActivationPolicy: lazy +Bundle-Activator: org.argeo.security.ui.SecurityUiPlugin + +Require-Bundle: org.eclipse.ui;resolution:=optional,\ + org.eclipse.core.runtime,\ + org.eclipse.rap.ui;resolution:=optional + +Import-Package: org.argeo.eclipse.spring,\ + org.apache.log4j;resolution:=optional,\ + org.eclipse.swt.widgets;version="[0,4.0)",\ + * + +Export-Packages: !org.argeo.security.ui.internal.*,\ + org.argeo.security.ui.* diff --git a/org.argeo.security.ui/pom.xml b/org.argeo.security.ui/pom.xml index 11feae9d9..848fc26c1 100644 --- a/org.argeo.security.ui/pom.xml +++ b/org.argeo.security.ui/pom.xml @@ -11,43 +11,6 @@ org.argeo.security.ui Commons Security UI jar - - - - org.apache.maven.plugins - maven-compiler-plugin - - - org.apache.maven.plugins - maven-source-plugin - - - org.apache.maven.plugins - maven-jar-plugin - - - org.apache.felix - maven-bundle-plugin - - - ${project.artifactId};singleton:=true - lazy - org.argeo.security.ui.SecurityUiPlugin - org.eclipse.ui;resolution:=optional,org.eclipse.rap.ui;resolution:=optional,org.eclipse.core.runtime - - org.argeo.eclipse.spring, - org.apache.log4j;resolution:=optional, - * - - - !org.argeo.security.ui.internal.*, - org.argeo.security.ui.* - - - - - - @@ -56,14 +19,14 @@ 2.1.12-SNAPSHOT - + org.argeo.commons org.argeo.eclipse.ui 2.1.12-SNAPSHOT - + org.argeo.commons org.argeo.eclipse.dep.rap @@ -72,24 +35,19 @@ provided - + org.argeo.commons org.argeo.util 2.1.12-SNAPSHOT - - org.argeo.tp org.springframework.security.core - - org.argeo.tp slf4j.org.apache.commons.logging - \ No newline at end of file diff --git a/pom.xml b/pom.xml index a4df50190..a5b11d142 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,6 @@ org.argeo.cms org.argeo.eclipse.ui.workbench - org.argeo.security.equinox org.argeo.security.ui org.argeo.security.ui.admin -- 2.30.2