From: Mathieu Baudier Date: Sat, 10 Jan 2015 21:32:00 +0000 (+0000) Subject: [maven-release-plugin] copy for tag argeo-commons-2.1.12 X-Git-Tag: svn/tags/argeo-commons-2.1.12^0 X-Git-Url: http://git.argeo.org/?a=commitdiff_plain;h=6557d5c011af7f0cc68a8d756a4682d2d7189634;hp=9a77d4f3b65b7659c22fec911b681d775497c5d1;p=lgpl%2Fargeo-commons.git [maven-release-plugin] copy for tag argeo-commons-2.1.12 git-svn-id: https://svn.argeo.org/commons/tags/argeo-commons-2.1.12@7668 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- diff --git a/demo/argeo_node_cms.properties b/demo/argeo_node_cms.properties index d53298060..aba171da5 100644 --- a/demo/argeo_node_cms.properties +++ b/demo/argeo_node_cms.properties @@ -1,5 +1,5 @@ argeo.osgi.start.1.node=\ -org.springframework.osgi.extender,\ +org.eclipse.gemini.blueprint.extender argeo.osgi.start.3.node=\ org.argeo.node.repo.jackrabbit,\ diff --git a/demo/argeo_node_rap.properties b/demo/argeo_node_rap.properties index c04eea2a7..8596df804 100644 --- a/demo/argeo_node_rap.properties +++ b/demo/argeo_node_rap.properties @@ -1,5 +1,5 @@ argeo.osgi.start.1.node=\ -org.springframework.osgi.extender +org.eclipse.gemini.blueprint.extender #org.argeo.server.ads.server,\ diff --git a/demo/argeo_node_rcp.properties b/demo/argeo_node_rcp.properties index a2e7105a2..69b835dd4 100644 --- a/demo/argeo_node_rcp.properties +++ b/demo/argeo_node_rcp.properties @@ -1,5 +1,5 @@ argeo.osgi.start=\ -org.springframework.osgi.extender,\ +org.eclipse.gemini.blueprint.extender,\ org.argeo.node.repo.jackrabbit,\ org.argeo.security.dao.os,\ @@ -11,6 +11,8 @@ log4j.configuration=file:../../log4j.properties org.argeo.security.ui.initialPerspective=org.argeo.jcr.ui.explorer.perspective eclipse.application=org.argeo.security.ui.rcp.secureUi +osgi.console.enable.builtin=true + #argeo.node.repo.configuration=classpath:/org/argeo/jackrabbit/repository-fs.xml #argeo.node.repo.configuration=classpath:/org/argeo/jackrabbit/repository-memory.xml #argeo.node.repo.configuration=osgibundle:repository-h2.xml diff --git a/dep/org.argeo.dep.cms/pom.xml b/dep/org.argeo.dep.cms/pom.xml index d084fdbd4..b4328395c 100644 --- a/dep/org.argeo.dep.cms/pom.xml +++ b/dep/org.argeo.dep.cms/pom.xml @@ -36,39 +36,50 @@ - org.argeo.commons org.argeo.cms 2.1.12 - - org.argeo.commons org.argeo.util 2.1.12 - + org.argeo.commons org.argeo.security.dep.node + pom 2.1.12 + + + org.argeo.tp.rap.platform + org.eclipse.rap.ui.workbench + + + org.argeo.tp.rap.platform + org.eclipse.rap.ui + + + org.argeo.tp.rap.platform + org.eclipse.rap.ui.cheatsheets + + + org.argeo.tp.rap.platform + org.eclipse.rap.ui.forms + + + org.argeo.tp.rap.platform + org.eclipse.rap.ui.views + - org.argeo.tp - org.eclipse.osgi + org.argeo.tp.rap.platform + org.eclipse.help - - - - org.argeo.commons - org.argeo.eclipse.dep.rwt - 2.1.12 - pom - \ No newline at end of file diff --git a/dep/org.argeo.dep.jackrabbit/pom.xml b/dep/org.argeo.dep.jackrabbit/pom.xml deleted file mode 100644 index f85aed736..000000000 --- a/dep/org.argeo.dep.jackrabbit/pom.xml +++ /dev/null @@ -1,110 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12 - dep - .. - - org.argeo.dep.jackrabbit - pom - Commons Minimal Jackrabbit - - - - org.argeo.tp - org.apache.jackrabbit - - - - - org.argeo.tp - org.h2 - - - - - org.argeo.tp - javax.jcr - - - org.argeo.tp - org.apache.lucene - - - org.argeo.commons - org.argeo.dep.log4j - 2.1.12 - pom - - - - - org.argeo.tp - org.apache.commons.collections - - - org.argeo.tp - org.apache.commons.io - - - org.argeo.tp - org.apache.commons.httpclient - - - org.argeo.tp - org.apache.commons.fileupload - - - org.argeo.tp - org.apache.commons.compress - - - org.argeo.tp - org.apache.commons.pool - - - org.argeo.tp - org.apache.commons.dbcp - - - - - org.argeo.tp - edu.oswego.cs.dl.util.concurrent - - - - - org.argeo.tp - javax.servlet - - - - - org.argeo.tp - org.apache.tika - - - - org.argeo.tp - org.dom4j - - - org.argeo.tp - org.jdom - - - org.argeo.tp - org.objectweb.asm - - - org.argeo.tp - org.jaxen - - - org.argeo.tp - org.xmlpull - - - \ No newline at end of file diff --git a/dep/org.argeo.dep.log4j/pom.xml b/dep/org.argeo.dep.log4j/pom.xml deleted file mode 100644 index cc86dbf8a..000000000 --- a/dep/org.argeo.dep.log4j/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12 - dep - .. - - org.argeo.dep.log4j - pom - Commons Apache Log4j (SLF4J) Dependencies - - - org.argeo.tp - slf4j.org.apache.commons.logging - - - org.argeo.tp - org.apache.log4j - - - org.argeo.tp - slf4j.log4j - - - org.argeo.tp - slf4j.api - - - - \ No newline at end of file diff --git a/dep/org.argeo.eclipse.dep.rap/pom.xml b/dep/org.argeo.eclipse.dep.rap/pom.xml deleted file mode 100644 index f6e3547d4..000000000 --- a/dep/org.argeo.eclipse.dep.rap/pom.xml +++ /dev/null @@ -1,208 +0,0 @@ - - - 4.0.0 - - org.argeo.commons - dep - 2.1.12 - .. - - org.argeo.eclipse.dep.rap - Eclipse RAP Dependencies - pom - - - org.argeo.tp.rap.addons - binaries - ${version.rap.addons} - pom - - - - org.argeo.tp.rap.addons - org.eclipse.osgi - - - - - - org.argeo.tp.rap.platform - binaries - ${version.rap} - pom - - - - org.argeo.tp.rap.platform - org.eclipse.rap.ui.cheatsheets - - - - - org.argeo.tp.rap.platform - org.eclipse.rap.demo - - - org.argeo.tp.rap.platform - org.eclipse.rap.demo.databinding - - - org.argeo.tp.rap.platform - org.eclipse.rap.design.example - - - org.argeo.tp.rap.platform - org.eclipse.rap.demo.controls - - - org.argeo.tp.rap.platform - org.eclipse.rap.examples - - - org.argeo.tp.rap.platform - org.eclipse.rap.examples.pages - - - - - org.argeo.tp.rap.platform - org.junit - - - org.argeo.tp.rap.platform - org.eclipse.rap.junit - - - org.argeo.tp.rap.platform - org.eclipse.jdt.junit.runtime - - - org.argeo.tp.rap.platform - org.eclipse.rap.junit.runtime - - - org.argeo.tp.rap.platform - org.eclipse.rap.rwt.testfixture - - - - org.argeo.tp.rap.platform - org.apache.felix.gogo.runtime - - - org.argeo.tp.rap.platform - org.apache.felix.gogo.shell - - - org.argeo.tp.rap.platform - org.apache.felix.gogo.command - - - org.argeo.tp.rap.platform - org.eclipse.equinox.console - - - - - - - org.argeo.tp - org.apache.commons.io - - - org.argeo.tp - org.apache.commons.fileupload - - - - - - - - - - - org.argeo.tp.rap - org.eclipse.equinox.security - - - - - - check-osgi - - - - org.argeo.maven.plugins - maven-argeo-osgi-plugin - - - check-osgi - test - - equinox - - - true - - - - - - - - - rpmbuild-tp - - - - org.codehaus.mojo - rpm-maven-plugin - - - rpm-rap - package - - rpm - - - eclipse-rap - ${version.rap} - - - /usr/share/eclipse-rap - root - root - 644 - false - - - - - - - - - maven-antrun-plugin - - - install - - run - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/dep/org.argeo.eclipse.dep.rcp/pom.xml b/dep/org.argeo.eclipse.dep.rcp/pom.xml deleted file mode 100644 index 354760a54..000000000 --- a/dep/org.argeo.eclipse.dep.rcp/pom.xml +++ /dev/null @@ -1,254 +0,0 @@ - - - 4.0.0 - - org.argeo.commons - dep - 2.1.12 - .. - - org.argeo.eclipse.dep.rcp - Eclipse RCP Dependencies - pom - - - - org.argeo.tp - org.eclipse.osgi - - - - org.argeo.tp.rcp.platform - binaries - ${version.argeo-distribution} - pom - - - - org.argeo.tp.rcp.platform - org.eclipse.update.configurator - - - - org.argeo.tp.rcp.platform - org.eclipse.swt.win32.win32.x86_64 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.carbon.macosx - - - org.argeo.tp.rcp.platform - org.eclipse.swt.cocoa.macosx.x86_64 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.gtk.solaris.sparc - - - org.argeo.tp.rcp.platform - org.eclipse.swt.gtk.solaris.x86 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.motif.solaris.sparc - - - org.argeo.tp.rcp.platform - org.eclipse.swt.gtk.linux.s390 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.gtk.linux.s390x - - - org.argeo.tp.rcp.platform - org.eclipse.swt.gtk.linux.ppc64 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.motif.linux.x86 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.gtk.linux.ppc - - - org.argeo.tp.rcp.platform - org.eclipse.swt.photon.qnx.x86 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.motif.aix.ppc - - - org.argeo.tp.rcp.platform - org.eclipse.swt.motif.aix.ppc64 - - - org.argeo.tp.rcp.platform - org.eclipse.swt.motif.hpux.ia64_32 - - - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.win32.win32.x86_64 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.carbon.macosx - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.cocoa.macosx.x86_64 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.gtk.solaris.sparc - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.gtk.solaris.x86 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.motif.solaris.sparc - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.gtk.linux.s390 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.gtk.linux.s390x - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.gtk.linux.ppc64 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.motif.linux.x86 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.gtk.linux.ppc - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.photon.qnx.x86 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.motif.aix.ppc - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.motif.aix.ppc64 - - - org.argeo.tp.rcp.platform - org.eclipse.equinox.launcher.motif.hpux.ia64_32 - - - - - org.argeo.tp.rcp.platform - org.eclipse.ui.carbon - - - - - - - org.argeo.tp.rcp - org.eclipse.equinox.security - - - - - - org.argeo.tp.rcp - binaries - ${version.argeo-distribution} - pom - import - - - org.argeo.tp.rcp.platform - binaries - ${version.argeo-distribution} - pom - import - - - - - - check-osgi - - - - org.argeo.maven.plugins - maven-argeo-osgi-plugin - - - check-osgi - test - - equinox - - - true - - - - - - - - - \ No newline at end of file diff --git a/dep/org.argeo.eclipse.dep.rwt/pom.xml b/dep/org.argeo.eclipse.dep.rwt/pom.xml deleted file mode 100644 index a1cc3604b..000000000 --- a/dep/org.argeo.eclipse.dep.rwt/pom.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - 4.0.0 - - org.argeo.commons - 2.1.12 - dep - .. - - org.argeo.eclipse.dep.rwt - Eclipse RWT Dependencies - pom - - - - org.argeo.commons - org.argeo.eclipse.dep.rap - pom - 2.1.12 - - - - org.argeo.tp.rap.platform - org.eclipse.rap.ui.workbench - - - org.argeo.tp.rap.platform - org.eclipse.rap.ui - - - org.argeo.tp.rap.platform - org.eclipse.rap.ui.cheatsheets - - - org.argeo.tp.rap.platform - org.eclipse.rap.ui.forms - - - org.argeo.tp.rap.platform - org.eclipse.rap.ui.views - - - org.argeo.tp.rap.platform - org.eclipse.help - - - - - \ No newline at end of file diff --git a/dep/org.argeo.security.dep.node.rap/pom.xml b/dep/org.argeo.security.dep.node.rap/pom.xml index b05ab8853..7f42169ad 100644 --- a/dep/org.argeo.security.dep.node.rap/pom.xml +++ b/dep/org.argeo.security.dep.node.rap/pom.xml @@ -46,11 +46,11 @@ org.argeo.security.ui.admin 2.1.12 - - org.argeo.commons - org.argeo.security.mvc - 2.1.12 - + + + + + @@ -59,30 +59,12 @@ 2.1.12 pom + - org.argeo.commons org.argeo.security.dao.os - - - org.argeo.commons - org.argeo.server.catalina.start - - - org.argeo.commons - org.argeo.server.webextender - - - org.argeo.tp - org.apache.jasper - - - org.argeo.tp - org.springframework.osgi.web.extender - + --> @@ -91,13 +73,17 @@ 2.1.12 - + + --> + @@ -122,72 +108,6 @@ - - - - org.argeo.commons - org.argeo.osgi.boot - 2.1.12 - test - - - - - rpmbuild - - - - org.codehaus.mojo - rpm-maven-plugin - - - rpm-node-rap - package - - rpm - - - argeo-node-rap - - - - - - - - - - - - - - - - /usr/share/osgi/rap - root - root - 644 - false - - - org.argeo.commons.base:org.argeo.eclipse.ui.rap - org.argeo.commons.server:org.argeo.server.rap.webapp - org.argeo.commons.security:org.argeo.security.ui.rap - - - - - - argeo-node - argeo-node-eclipse - eclipse-rap - - - - - - - diff --git a/dep/org.argeo.security.dep.node.rcp/bnd.bnd b/dep/org.argeo.security.dep.node.rcp/bnd.bnd deleted file mode 100644 index e69de29bb..000000000 diff --git a/dep/org.argeo.security.dep.node.rcp/p2.inf b/dep/org.argeo.security.dep.node.rcp/p2.inf deleted file mode 100644 index 0423aa509..000000000 --- a/dep/org.argeo.security.dep.node.rcp/p2.inf +++ /dev/null @@ -1,2 +0,0 @@ -properties.1.name=org.eclipse.equinox.p2.type.category -properties.1.value=true \ No newline at end of file diff --git a/dep/org.argeo.security.dep.node.rcp/pom.xml b/dep/org.argeo.security.dep.node.rcp/pom.xml deleted file mode 100644 index f2dcf0921..000000000 --- a/dep/org.argeo.security.dep.node.rcp/pom.xml +++ /dev/null @@ -1,160 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12 - dep - .. - - org.argeo.security.dep.node.rcp - Node Eclipse RCP - - - - org.apache.felix - maven-bundle-plugin - - - default - - - - - org.argeo.maven.plugins - maven-argeo-osgi-plugin - - - generate-descriptors - - descriptors - - generate-resources - - - - - - - - - org.argeo.commons - org.argeo.eclipse.ui.workbench - 2.1.12 - - - org.argeo.commons - org.argeo.security.ui.admin - 2.1.12 - - - - - org.argeo.commons - org.argeo.eclipse.ui - 2.1.12 - - - - - org.argeo.commons - org.argeo.security.ui.rcp - 2.1.12 - - - org.argeo.commons - org.argeo.security.equinox - 2.1.12 - - - org.argeo.commons - org.argeo.security.ui - 2.1.12 - - - - org.argeo.commons - org.argeo.security.dep.node - 2.1.12 - pom - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - rpmbuild - - - - org.codehaus.mojo - rpm-maven-plugin - - - - - rpm-node-rcp - package - - rpm - - - argeo-node-rcp - - - /usr/share/osgi/rcp - root - root - 644 - false - - - org.argeo.commons:org.argeo.eclipse.ui.rcp - org.argeo.commons:org.argeo.security.ui.rcp - - - - - - argeo-node - argeo-node-eclipse - eclipse-platform - - - - - - - - - - diff --git a/dep/org.argeo.security.dep.node.rcp/src/assembly/linux.x86.xml b/dep/org.argeo.security.dep.node.rcp/src/assembly/linux.x86.xml deleted file mode 100644 index 0b321cdca..000000000 --- a/dep/org.argeo.security.dep.node.rcp/src/assembly/linux.x86.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - linux.x86 - argeo-node-ui - - tar.gz - - - - false - ${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension} - - lib - - *:jar - - - org.eclipse.swt:org.eclipse.swt*:jar - - - - false - ${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension} - - lib - - org.eclipse.swt:org.eclipse.swt.gtk.linux.x86:jar - - - - \ No newline at end of file diff --git a/dep/org.argeo.security.dep.node.rcp/src/assembly/linux.x86_64.xml b/dep/org.argeo.security.dep.node.rcp/src/assembly/linux.x86_64.xml deleted file mode 100644 index 12a0a3278..000000000 --- a/dep/org.argeo.security.dep.node.rcp/src/assembly/linux.x86_64.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - linux.x86_64 - argeo-node-ui - - tar.gz - - - - false - ${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension} - - lib - - *:jar - - - org.eclipse.swt:org.eclipse.swt*:jar - - - - false - ${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension} - - lib - - org.eclipse.swt:org.eclipse.swt.gtk.linux.x86_64:jar - - - - \ No newline at end of file diff --git a/dep/org.argeo.security.dep.node.rcp/src/assembly/win32.x86.xml b/dep/org.argeo.security.dep.node.rcp/src/assembly/win32.x86.xml deleted file mode 100644 index 15cec0da6..000000000 --- a/dep/org.argeo.security.dep.node.rcp/src/assembly/win32.x86.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - win32.x86 - argeo-node-ui - - zip - - - - false - ${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension} - - lib - - *:jar - - - org.eclipse.swt:org.eclipse.swt*:jar - - - - false - ${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension} - - lib - - org.eclipse.swt:org.eclipse.swt.win32.win32.x86:jar - - - - \ No newline at end of file diff --git a/dep/org.argeo.security.dep.node/pom.xml b/dep/org.argeo.security.dep.node/pom.xml index 09a8669ce..c72311588 100644 --- a/dep/org.argeo.security.dep.node/pom.xml +++ b/dep/org.argeo.security.dep.node/pom.xml @@ -36,6 +36,13 @@ + + + org.argeo.tp + argeo-tp + ${version.argeo-distribution} + + org.argeo.commons @@ -50,21 +57,6 @@ 2.1.12 - - - org.argeo.commons - org.argeo.dep.log4j - 2.1.12 - pom - - - - - org.argeo.commons - org.argeo.server.core - 2.1.12 - - org.argeo.commons @@ -72,76 +64,6 @@ 2.1.12 - - - org.argeo.tp - org.apache.xmlcommons - - - org.argeo.tp - org.apache.xalan - - - - - org.argeo.tp - javax.annotation - - - org.argeo.tp - javax.mail - - - - - org.argeo.tp - bcprov - - - org.argeo.tp - bcmail - - - - - org.argeo.tp - org.apache.commons.vfs - - - org.argeo.tp - org.apache.commons.exec - - - org.argeo.tp - org.apache.commons.cli - - - org.argeo.tp - org.apache.commons.dbcp - - - - - org.argeo.tp - jxl - - - org.argeo.tp - org.apache.pdfbox - - - - - org.argeo.tp - org.springframework.context.support - - - - - org.argeo.tp - org.springframework.osgi.extender - - org.argeo.commons @@ -154,20 +76,7 @@ 2.1.12 - - - org.argeo.tp - org.quartz - - - - - - + org.argeo.commons org.argeo.security.dao.jackrabbit @@ -175,81 +84,17 @@ - + - - org.argeo.tp - org.springframework.osgi.web.extender + 2.1.12-SNAPSHOT - - org.argeo.tp - org.springframework.osgi.web - - - - - - - - - - - - + --> org.argeo.commons org.argeo.server.jcr.mvc 2.1.12 - - org.argeo.commons - org.argeo.jackrabbit.webapp - 2.1.12 - - - - - org.argeo.tp - org.h2 - - - - - - - org.argeo.tp - org.postgresql.jdbc3 - - - - - org.argeo.commons - org.argeo.server.dep.ads - 2.1.12 - pom - - - org.argeo.commons - org.argeo.server.ads.server - 2.1.12 - - - org.argeo.commons - org.argeo.server.ads - 2.1.12 - - - - - - - - @@ -274,132 +119,6 @@ - - - - org.argeo.commons - org.argeo.osgi.boot - 2.1.12 - test - - - - - rpmbuild - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-node - package - - copy-dependencies - - - jar - org.argeo.commons.base,org.argeo.commons.server,org.argeo.commons.security - org.argeo.osgi.boot - ${project.build.directory}/node - - - - - - org.codehaus.mojo - rpm-maven-plugin - - - rpm-node - package - - rpm - - - argeo-node - - - /usr/share/osgi - root - root - 644 - false - - - ${project.build.directory}/node - - - - - - argeo-node-tp - - - - - - - - - - rpmbuild-tp - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-tp - package - - copy-dependencies - - - jar - org.argeo.commons.base,org.argeo.commons.server,org.argeo.commons.security - org.eclipse.osgi - ${project.build.directory}/node-tp - - - - - - org.codehaus.mojo - rpm-maven-plugin - - - rpm-node-tp - package - - rpm - - - argeo-node-tp - rpm-tp - ${version.argeo-distribution} - - - /usr/share/osgi - root - root - 644 - false - - - ${project.build.directory}/node-tp - - - - - - - - - - \ No newline at end of file diff --git a/dep/org.argeo.server.dep.ads/pom.xml b/dep/org.argeo.server.dep.ads/pom.xml deleted file mode 100644 index 14ebb8c79..000000000 --- a/dep/org.argeo.server.dep.ads/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12 - dep - .. - - org.argeo.server.dep.ads - pom - Commons Apache Directory Server Dependencies - - - - org.argeo.commons - org.argeo.dep.log4j - 2.1.12 - pom - - - - - org.argeo.tp - org.apache.directory.server.core - - - org.argeo.tp - org.apache.directory.shared.asn.codec - - - org.argeo.tp - org.apache.mina.filter.ssl - - - org.argeo.tp - org.apache.directory.server.jndi - - - org.argeo.tp - jdbm - - - org.argeo.commons - org.argeo.ext.jdbm - 2.1.12 - - - - org.argeo.tp - org.apache.commons.lang - - - \ No newline at end of file diff --git a/dep/org.argeo.server.dep.jackrabbit.server/pom.xml b/dep/org.argeo.server.dep.jackrabbit.server/pom.xml deleted file mode 100644 index 40afce983..000000000 --- a/dep/org.argeo.server.dep.jackrabbit.server/pom.xml +++ /dev/null @@ -1,79 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12 - dep - .. - - org.argeo.server.dep.jackrabbit.server - pom - Commons Jackrabbit Dependencies - - - org.argeo.commons - org.argeo.dep.jackrabbit - pom - 2.1.12 - - - - - org.argeo.tp - bcprov - - - org.argeo.tp - bcmail - - - - - - - - org.argeo.tp - org.apache.xmlbeans - - - org.argeo.tp - org.apache.xmlcommons - - - org.argeo.tp - org.apache.pdfbox - - - org.argeo.tp - org.apache.poi - - - org.argeo.tp - com.sun.syndication - - - org.argeo.tp - org.cyberneko.html - - - org.argeo.tp - de.l3s.boilerpipe - - - org.argeo.tp - javax.mail - - - org.argeo.tp - com.drewnoakes.metadata_extractor - - - org.argeo.tp - edu.ucar.unidata.netcdf - - - org.argeo.tp - org.ccil.cowan.tagsoup - - - \ No newline at end of file diff --git a/dep/pom.xml b/dep/pom.xml index dc41021d4..fcfaa1c69 100644 --- a/dep/pom.xml +++ b/dep/pom.xml @@ -11,17 +11,9 @@ Commons Base Dependencies pom - org.argeo.dep.log4j - org.argeo.dep.jackrabbit - org.argeo.eclipse.dep.rap - org.argeo.eclipse.dep.rwt - org.argeo.eclipse.dep.rcp - org.argeo.server.dep.ads - org.argeo.server.dep.jackrabbit.server org.argeo.security.dep.node - org.argeo.security.dep.node.rap - org.argeo.security.dep.node.rcp org.argeo.dep.cms + org.argeo.security.dep.node.rap diff --git a/dist/osgi-boot/pom.xml b/dist/osgi-boot/pom.xml index eda8c0aae..d8aa3c7a8 100644 --- a/dist/osgi-boot/pom.xml +++ b/dist/osgi-boot/pom.xml @@ -9,40 +9,46 @@ osgi-boot pom Commons OSGi Boot Distribution - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - package - - copy-dependencies - - - jar - true - ${project.build.directory}/lib - - - - - - - - - org.argeo.commons - org.argeo.osgi.boot - 2.1.12 - - + + 3.9.1.v20140110-1610 + rpmbuild + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + package + + copy + + + jar + true + ${project.build.directory}/lib + + + org.argeo.commons + org.argeo.osgi.boot + ${version.argeo-commons} + jar + + + org.argeo.tp.equinox + org.eclipse.osgi + ${version.equinox} + jar + + + + + + org.codehaus.mojo rpm-maven-plugin diff --git a/org.argeo.cms/META-INF/spring/osgi.xml b/org.argeo.cms/META-INF/spring/osgi.xml index 3a103ce87..48609a1e4 100644 --- a/org.argeo.cms/META-INF/spring/osgi.xml +++ b/org.argeo.cms/META-INF/spring/osgi.xml @@ -11,7 +11,7 @@ filter="(argeo.jcr.repository.alias=node)" /> + interface="org.springframework.security.authentication.AuthenticationManager" /> diff --git a/org.argeo.cms/bnd.bnd b/org.argeo.cms/bnd.bnd index eb58d0be2..149e66fde 100644 --- a/org.argeo.cms/bnd.bnd +++ b/org.argeo.cms/bnd.bnd @@ -4,6 +4,8 @@ Import-Package: org.springframework.core,\ org.eclipse.swt,\ org.eclipse.jface.window,\ javax.jcr.security,\ + org.eclipse.swt.widgets;version="0.0.0",\ + org.eclipse.rap.*;resolution:=optional,\ * # Useless #Private-Package: org.argeo.cms.internal.* \ No newline at end of file diff --git a/org.argeo.cms/pom.xml b/org.argeo.cms/pom.xml index da26df68a..eb290cd19 100644 --- a/org.argeo.cms/pom.xml +++ b/org.argeo.cms/pom.xml @@ -24,17 +24,17 @@ - + - + org.argeo.commons @@ -55,14 +55,14 @@ - - org.argeo.tp - org.springframework.osgi.core - - - org.argeo.tp.rap.platform - org.eclipse.osgi - provided - + + + + + + + + + \ No newline at end of file diff --git a/org.argeo.cms/src/org/argeo/cms/AbstractCmsEntryPoint.java b/org.argeo.cms/src/org/argeo/cms/AbstractCmsEntryPoint.java index 8d68fc120..6043980e9 100644 --- a/org.argeo.cms/src/org/argeo/cms/AbstractCmsEntryPoint.java +++ b/org.argeo.cms/src/org/argeo/cms/AbstractCmsEntryPoint.java @@ -19,7 +19,7 @@ import org.eclipse.rap.rwt.client.service.BrowserNavigationEvent; import org.eclipse.rap.rwt.client.service.BrowserNavigationListener; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; -import org.springframework.security.context.SecurityContextHolder; +import org.springframework.security.core.context.SecurityContextHolder; /** Manages history and navigation */ public abstract class AbstractCmsEntryPoint extends AbstractEntryPoint diff --git a/org.argeo.cms/src/org/argeo/cms/CmsApplication.java b/org.argeo.cms/src/org/argeo/cms/CmsApplication.java index afb915d24..af8fa1c99 100644 --- a/org.argeo.cms/src/org/argeo/cms/CmsApplication.java +++ b/org.argeo.cms/src/org/argeo/cms/CmsApplication.java @@ -9,6 +9,7 @@ import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.eclipse.gemini.blueprint.context.BundleContextAware; import org.eclipse.rap.rwt.application.Application; import org.eclipse.rap.rwt.application.Application.OperationMode; import org.eclipse.rap.rwt.application.ApplicationConfiguration; @@ -20,7 +21,6 @@ import org.eclipse.rap.rwt.lifecycle.PhaseId; import org.eclipse.rap.rwt.lifecycle.PhaseListener; import org.eclipse.rap.rwt.service.ResourceLoader; import org.osgi.framework.BundleContext; -import org.springframework.osgi.context.BundleContextAware; /** Configures an Argeo CMS RWT application. */ public class CmsApplication implements CmsConstants, ApplicationConfiguration, diff --git a/org.argeo.cms/src/org/argeo/cms/CmsLink.java b/org.argeo.cms/src/org/argeo/cms/CmsLink.java index 753d7f503..5ccfd63e3 100644 --- a/org.argeo.cms/src/org/argeo/cms/CmsLink.java +++ b/org.argeo.cms/src/org/argeo/cms/CmsLink.java @@ -9,6 +9,7 @@ import javax.jcr.Node; import org.apache.commons.io.IOUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.eclipse.gemini.blueprint.context.BundleContextAware; import org.eclipse.rap.rwt.RWT; import org.eclipse.rap.rwt.service.ResourceManager; import org.eclipse.swt.SWT; @@ -20,7 +21,6 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.osgi.framework.BundleContext; import org.springframework.beans.factory.InitializingBean; -import org.springframework.osgi.context.BundleContextAware; /** A link to an internal or external location. */ public class CmsLink implements CmsUiProvider, InitializingBean, diff --git a/org.argeo.cms/src/org/argeo/cms/CmsLogin.java b/org.argeo.cms/src/org/argeo/cms/CmsLogin.java index 7c4dd5f4b..ac63351e3 100644 --- a/org.argeo.cms/src/org/argeo/cms/CmsLogin.java +++ b/org.argeo.cms/src/org/argeo/cms/CmsLogin.java @@ -1,16 +1,18 @@ package org.argeo.cms; +import java.util.Collections; +import java.util.List; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.springframework.security.Authentication; -import org.springframework.security.AuthenticationManager; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.GrantedAuthorityImpl; -import org.springframework.security.context.SecurityContextHolder; -import org.springframework.security.providers.UsernamePasswordAuthenticationToken; -import org.springframework.security.providers.anonymous.AnonymousAuthenticationToken; -import org.springframework.security.userdetails.User; -import org.springframework.security.userdetails.UserDetails; +import org.springframework.security.authentication.AnonymousAuthenticationToken; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.User; +import org.springframework.security.core.userdetails.UserDetails; /** Gateway for user login, can also generate the related UI. */ public class CmsLogin { @@ -21,8 +23,8 @@ public class CmsLogin { protected void logInAsAnonymous() { // TODO Better deal with anonymous authentication try { - GrantedAuthority[] anonAuthorities = { new GrantedAuthorityImpl( - "ROLE_ANONYMOUS") }; + List anonAuthorities = Collections + .singletonList(new SimpleGrantedAuthority("ROLE_ANONYMOUS")); UserDetails anonUser = new User("anonymous", "", true, true, true, true, anonAuthorities); AnonymousAuthenticationToken anonToken = new AnonymousAuthenticationToken( diff --git a/org.argeo.cms/src/org/argeo/cms/UserMenu.java b/org.argeo.cms/src/org/argeo/cms/UserMenu.java index 57de51526..da48237fa 100644 --- a/org.argeo.cms/src/org/argeo/cms/UserMenu.java +++ b/org.argeo.cms/src/org/argeo/cms/UserMenu.java @@ -14,7 +14,7 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; -import org.springframework.security.context.SecurityContextHolder; +import org.springframework.security.core.context.SecurityContextHolder; /** The site-related user menu */ public class UserMenu extends Shell implements CmsStyles { diff --git a/org.argeo.cms/src/org/argeo/cms/users/UserRolesPart.java b/org.argeo.cms/src/org/argeo/cms/users/UserRolesPart.java index 204158a75..8efcba261 100644 --- a/org.argeo.cms/src/org/argeo/cms/users/UserRolesPart.java +++ b/org.argeo.cms/src/org/argeo/cms/users/UserRolesPart.java @@ -33,7 +33,7 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; -import org.springframework.security.GrantedAuthority; +import org.springframework.security.core.GrantedAuthority; /** Display a single user main info once it has been created. */ public class UserRolesPart extends StyledControl implements EditablePart, diff --git a/org.argeo.cms/src/org/argeo/cms/users/Users.java b/org.argeo.cms/src/org/argeo/cms/users/Users.java index 4336a23d8..cc164b769 100644 --- a/org.argeo.cms/src/org/argeo/cms/users/Users.java +++ b/org.argeo.cms/src/org/argeo/cms/users/Users.java @@ -40,7 +40,7 @@ import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; -import org.springframework.security.userdetails.UserDetailsManager; +import org.springframework.security.provisioning.UserDetailsManager; /** * Simple page to manage users of a given repository. We still rely on Argeo diff --git a/org.argeo.eclipse.ui.rap/pom.xml b/org.argeo.eclipse.ui.rap/pom.xml index a6b66d280..b1a9d54b2 100644 --- a/org.argeo.eclipse.ui.rap/pom.xml +++ b/org.argeo.eclipse.ui.rap/pom.xml @@ -20,12 +20,12 @@ - + @@ -33,9 +33,9 @@ org.argeo.util 2.1.12 - - org.argeo.tp - slf4j.org.apache.commons.logging - + + + + \ No newline at end of file diff --git a/org.argeo.eclipse.ui.rcp/.classpath b/org.argeo.eclipse.ui.rcp/.classpath deleted file mode 100644 index d2953a684..000000000 --- a/org.argeo.eclipse.ui.rcp/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/org.argeo.eclipse.ui.rcp/.project b/org.argeo.eclipse.ui.rcp/.project deleted file mode 100644 index ef2dc2dbb..000000000 --- a/org.argeo.eclipse.ui.rcp/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.argeo.eclipse.ui.rcp - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.argeo.eclipse.ui.rcp/bnd.bnd b/org.argeo.eclipse.ui.rcp/bnd.bnd deleted file mode 100644 index 4fd32e8c8..000000000 --- a/org.argeo.eclipse.ui.rcp/bnd.bnd +++ /dev/null @@ -1,18 +0,0 @@ -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/build.properties b/org.argeo.eclipse.ui.rcp/build.properties deleted file mode 100644 index fd806ca05..000000000 --- a/org.argeo.eclipse.ui.rcp/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -source.. = src/ -output.. = bin/ diff --git a/org.argeo.eclipse.ui.rcp/pom.xml b/org.argeo.eclipse.ui.rcp/pom.xml deleted file mode 100644 index 51daf09ee..000000000 --- a/org.argeo.eclipse.ui.rcp/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - 4.0.0 - - org.argeo.commons - 2.1.12 - argeo-commons - .. - - org.argeo.eclipse.ui.rcp - Commons Eclipse UI RCP - Provide RCP specific classes and behaviour in order to enable single sourcing - jar - - - - - org.argeo.commons - org.argeo.eclipse.ui - 2.1.12 - - - - - org.argeo.commons - org.argeo.eclipse.dep.rcp - pom - 2.1.12 - - - - - org.argeo.tp - org.apache.commons.io - - - org.argeo.commons - org.argeo.util - 2.1.12 - - - org.argeo.tp - slf4j.org.apache.commons.logging - - - \ No newline at end of file diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/DefaultNLS.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/DefaultNLS.java deleted file mode 100644 index 71a0c898d..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/DefaultNLS.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import org.eclipse.osgi.util.NLS; - -/** RCP specific {@link NLS} to be extended */ -public class DefaultNLS extends NLS { - public final static String DEFAULT_BUNDLE_LOCATION = "/properties/plugin"; - - public DefaultNLS() { - this(DEFAULT_BUNDLE_LOCATION); - } - - public DefaultNLS(String bundleName) { - NLS.initializeMessages(bundleName, getClass()); - } -} diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/EclipseUiSpecificUtils.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/EclipseUiSpecificUtils.java deleted file mode 100644 index 2642a35a1..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/EclipseUiSpecificUtils.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import org.eclipse.jface.viewers.ColumnViewer; -import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; -import org.eclipse.jface.viewers.Viewer; - -/** Static utilities to bridge differences between RCP and RAP */ -public class EclipseUiSpecificUtils { - /** - * TootlTip support is supported for {@link ColumnViewer} in RCP - * - * @see ColumnViewerToolTipSupport#enableFor(Viewer) - */ - public static void enableToolTipSupport(Viewer viewer) { - if (viewer instanceof ColumnViewer) - ColumnViewerToolTipSupport.enableFor((ColumnViewer) viewer); - } - - private EclipseUiSpecificUtils() { - } - -} diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/FileHandler.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/FileHandler.java deleted file mode 100644 index 5da49736d..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/FileHandler.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import java.awt.Desktop; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - -import org.apache.commons.io.IOUtils; -import org.argeo.ArgeoException; - -/** - * Abstraction that enable to implement runtime environment specific (typically - * RCP or RAP) methods while dealing with files in the UI. - * - */ -public class FileHandler { - - private FileProvider provider; - - public FileHandler(FileProvider provider) { - this.provider = provider; - } - - public void openFile(String fileName, String fileId) { - String tmpFileName = fileName; - String prefix = "", extension = ""; - if (fileName != null) { - int ind = fileName.lastIndexOf('.'); - if (ind > 0) { - prefix = fileName.substring(0, ind); - extension = fileName.substring(ind); - } - } - - InputStream is = null; - try { - is = provider.getInputStreamFromFileId(fileId); - File file = createTmpFile(prefix, extension, is); - tmpFileName = file.getName(); - Desktop desktop = null; - if (Desktop.isDesktopSupported()) { - desktop = Desktop.getDesktop(); - } - desktop.open(file); - } catch (IOException e) { - // Note : tmpFileName = fileName if the error has been thrown while - // creating the tmpFile. - throw new ArgeoException("Cannot open file " + tmpFileName, e); - } finally { - IOUtils.closeQuietly(is); - } - } - - private File createTmpFile(String prefix, String suffix, InputStream is) { - File tmpFile = null; - OutputStream os = null; - try { - tmpFile = File.createTempFile(prefix, suffix); - os = new FileOutputStream(tmpFile); - IOUtils.copy(is, os); - } catch (IOException e) { - throw new ArgeoException("Cannot open file " + prefix + "." - + suffix, e); - } finally { - IOUtils.closeQuietly(os); - } - return tmpFile; - } -} diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/FileProvider.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/FileProvider.java deleted file mode 100644 index 5c92260d7..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/FileProvider.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import java.io.InputStream; - -/** - * Used for file download : subclasses must implement model specific methods to - * get a byte array representing a file given is ID. - * - * @author bsinou - * - */ -public interface FileProvider { - - public byte[] getByteArrayFileFromId(String fileId); - - public InputStream getInputStreamFromFileId(String fileId); - -} diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/GenericUploadControl.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/GenericUploadControl.java deleted file mode 100644 index 80e1e539c..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/GenericUploadControl.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import java.io.File; -import java.io.IOException; - -import org.apache.commons.io.FileUtils; -import org.argeo.ArgeoException; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.FileDialog; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Text; - -/** - * RCP specific composite that provides a control to upload a file. WARNING: for - * the time being we set a GridLayout(2, false) on th eparent control. - */ -public class GenericUploadControl extends Composite { - // private final static Log log = LogFactory - // .getLog(GenericUploadControl.class); - - private FileDialog dialog; - private Text filePath; - - public GenericUploadControl(Composite parent, int style, String browseLabel) { - super(parent, style); - createControl(this, browseLabel); - - } - - private void createControl(final Composite parent, String browseLabel) { - parent.setLayout(new GridLayout(2, false)); - - filePath = new Text(parent, SWT.BORDER | SWT.SINGLE); - GridData gd = new GridData(GridData.GRAB_HORIZONTAL - | GridData.FILL_HORIZONTAL); - filePath.setEditable(false); - filePath.setLayoutData(gd); - - // Execute button - Button execute = new Button(parent, SWT.PUSH); - GridData gridData = new GridData(); - gridData.horizontalAlignment = GridData.BEGINNING; - execute.setLayoutData(gridData); - execute.setText(browseLabel); - - // Button listener - Listener executeListener = new Listener() { - public void handleEvent(Event event) { - dialog = new FileDialog(parent.getShell()); - filePath.setText(dialog.open()); - } - }; - parent.layout(); - execute.addListener(SWT.Selection, executeListener); - } - - public boolean isControlEmpty() { - String path = filePath.getText(); - if (path == null || "".equals(path.trim())) - return true; - else - return false; - } - - public byte[] performUpload() { - String path = filePath.getText(); - if (path != null) { - try { - File file = new File(path); - byte[] fileBA = FileUtils.readFileToByteArray(file); - return fileBA; - } catch (IOException e) { - throw new ArgeoException("Unexpected error while " - + "reading file at path " + path, e); - } - } - return null; - } - - public void addModifyListener(ModifyListener listener) { - filePath.addModifyListener(listener); - } - - /** - * Always returns null in an RCP environment - */ - public String getLastFileUploadedName() { - return null; - } -} diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/ImportToServerWizardPage.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/ImportToServerWizardPage.java deleted file mode 100644 index 55065bfa0..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/ImportToServerWizardPage.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import java.io.InputStream; - -import org.eclipse.jface.preference.DirectoryFieldEditor; -import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.swt.widgets.Composite; - -public class ImportToServerWizardPage extends WizardPage { - - public final static String FILE_ITEM_TYPE = "FILE"; - public final static String FOLDER_ITEM_TYPE = "FOLDER"; - - private DirectoryFieldEditor dfe; - - public ImportToServerWizardPage() { - super("Import from file system"); - setDescription("Import files from the local file system into the JCR repository"); - } - - public void createControl(Composite parent) { - dfe = new DirectoryFieldEditor("directory", "From", parent); - setControl(dfe.getTextControl(parent)); - } - - public String getObjectPath() { - return dfe.getStringValue(); - } - - public String getObjectType() { - return FOLDER_ITEM_TYPE; - } - - public boolean getNeedsProgressMonitor() { - return true; - } - - // Dummy methods : useless in RCP context but useful for RAP - /** WARNING : always return null in RCP context */ - public String getObjectName() { - return null; - } - - /** WARNING : do nothing in RCP context */ - public void performFinish() { - } - - /** WARNING : always return null in RCP context */ - public InputStream getFileInputStream() { - return null; - } -} \ No newline at end of file diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/OpenFile.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/OpenFile.java deleted file mode 100644 index 610020dd1..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/OpenFile.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import java.awt.Desktop; -import java.io.File; -import java.io.IOException; - -import org.argeo.ArgeoException; -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; - -/** - * RCP specific command handler to open a file. - * - * The parameter "URI" is used to determine the correct method to open it. - * - * Various instances of this handler with different command ID might coexist in - * order to provide context specific open file service. - * - */ -public class OpenFile extends AbstractHandler { - // private final static Log log = LogFactory.getLog(OpenFile.class); - - public final static String PARAM_FILE_NAME = "param.fileName"; - public final static String PARAM_FILE_URI = "param.fileURI"; - - private final static String FILE_SCHEME = "file"; - - public Object execute(ExecutionEvent event) throws ExecutionException { - @SuppressWarnings("unused") - @Deprecated - String fileName = event.getParameter(PARAM_FILE_NAME); - String fileUri = event.getParameter(PARAM_FILE_URI); - - // sanity check - if (fileUri == null || "".equals(fileUri.trim())) - return null; - - Desktop desktop = null; - if (Desktop.isDesktopSupported()) { - desktop = Desktop.getDesktop(); - } - - File file = getFileFromUri(fileUri); - if (file != null) - try { - desktop.open(file); - } catch (IOException e) { - throw new ArgeoException("Unable to open file with URI: " - + fileUri, e); - } - - return null; - } - - protected File getFileFromUri(String uri) { - if (uri.startsWith(FILE_SCHEME)) { - String path = uri.substring((FILE_SCHEME + "://").length()); - return new File(path); - } - return null; - } -} \ No newline at end of file diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/ThreadNLS.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/ThreadNLS.java deleted file mode 100644 index c87f6e54f..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/ThreadNLS.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -import org.argeo.util.LocaleUtils; -import org.eclipse.osgi.util.NLS; - -/** NLS attached to a given thread */ -public class ThreadNLS extends InheritableThreadLocal { - public final static String DEFAULT_BUNDLE_LOCATION = "/properties/plugin"; - - private final String bundleLocation; - - private Class type; - private Boolean utf8 = false; - - public ThreadNLS(String bundleLocation, Class type, Boolean utf8) { - this.bundleLocation = bundleLocation; - this.type = type; - this.utf8 = utf8; - } - - public ThreadNLS(Class type) { - this(DEFAULT_BUNDLE_LOCATION, type, false); - } - - @Override - protected T initialValue() { - ResourceBundle bundle = ResourceBundle.getBundle(bundleLocation, - LocaleUtils.threadLocale.get(), type.getClassLoader()); - T result; - try { - NLS.initializeMessages(bundleLocation, type); - Constructor constructor = type.getConstructor(); - constructor.setAccessible(true); - result = constructor.newInstance(); - final Field[] fieldArray = type.getDeclaredFields(); - for (int i = 0; i < fieldArray.length; i++) { - int modifiers = fieldArray[i].getModifiers(); - if (String.class.isAssignableFrom(fieldArray[i].getType()) - && Modifier.isPublic(modifiers) - && !Modifier.isStatic(modifiers)) { - try { - String value = bundle - .getString(fieldArray[i].getName()); - byte[] bytes = value.getBytes(); - - String forcedValue; - if (utf8) - forcedValue = new String(bytes, "UTF8"); - else - forcedValue = value; - if (value != null) { - fieldArray[i].setAccessible(true); - fieldArray[i].set(result, forcedValue); - } - } catch (final MissingResourceException mre) { - fieldArray[i].setAccessible(true); - fieldArray[i].set(result, ""); - mre.printStackTrace(); - } - } - } - return result; - } catch (final Exception ex) { - throw new IllegalStateException(ex.getMessage()); - } - } - -} diff --git a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/UploadFileWizardPage.java b/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/UploadFileWizardPage.java deleted file mode 100644 index 5bdaeceb5..000000000 --- a/org.argeo.eclipse.ui.rcp/src/org/argeo/eclipse/ui/specific/UploadFileWizardPage.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.eclipse.ui.specific; - -import java.io.InputStream; - -import org.eclipse.jface.preference.DirectoryFieldEditor; -import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.swt.widgets.Composite; - -public class UploadFileWizardPage extends WizardPage { - - public final static String FILE_ITEM_TYPE = "FILE"; - public final static String FOLDER_ITEM_TYPE = "FOLDER"; - - private DirectoryFieldEditor dfe; - - public UploadFileWizardPage() { - super("Import from file system"); - setDescription("Import files from the local file system into the JCR repository"); - } - - public void createControl(Composite parent) { - dfe = new DirectoryFieldEditor("directory", "From", parent); - setControl(dfe.getTextControl(parent)); - } - - public String getObjectPath() { - return dfe.getStringValue(); - } - - public String getObjectType() { - return FOLDER_ITEM_TYPE; - } - - public boolean getNeedsProgressMonitor() { - return true; - } - - // Dummy methods : useless in RCP context but useful for RAP - /** WARNING : always return null in RCP context */ - public String getObjectName() { - return null; - } - - /** WARNING : do nothing in RCP context */ - public void performFinish() { - } - - /** WARNING : always return null in RCP context */ - public InputStream getFileInputStream() { - return null; - } -} \ No newline at end of file diff --git a/org.argeo.eclipse.ui.workbench/pom.xml b/org.argeo.eclipse.ui.workbench/pom.xml index f6776aa4d..826959a20 100644 --- a/org.argeo.eclipse.ui.workbench/pom.xml +++ b/org.argeo.eclipse.ui.workbench/pom.xml @@ -17,10 +17,10 @@ - + @@ -32,13 +32,13 @@ provided - + diff --git a/org.argeo.eclipse.ui/bnd.bnd b/org.argeo.eclipse.ui/bnd.bnd index 9fe6f10f1..32bfbc1ad 100644 --- a/org.argeo.eclipse.ui/bnd.bnd +++ b/org.argeo.eclipse.ui/bnd.bnd @@ -9,6 +9,7 @@ Import-Package: org.eclipse.core.commands,\ org.springframework.core.io.support,\ org.springframework.dao,\ javax.jcr.nodetype,\ + org.springframework.security.core,\ * # Was: diff --git a/org.argeo.eclipse.ui/pom.xml b/org.argeo.eclipse.ui/pom.xml index 551fdc4ac..1cec347b4 100644 --- a/org.argeo.eclipse.ui/pom.xml +++ b/org.argeo.eclipse.ui/pom.xml @@ -15,52 +15,43 @@ --> - - org.argeo.commons - org.argeo.eclipse.dep.rap - pom - 2.1.12 - provided - - + org.argeo.commons org.argeo.util 2.1.12 - - org.argeo.commons org.argeo.server.jcr 2.1.12 - - - - org.argeo.tp - org.springframework.osgi.extender - - - - - org.argeo.tp - org.springframework.context - - - org.argeo.commons org.argeo.security.core 2.1.12 + + + + + + + + + + + + - - org.argeo.tp - slf4j.org.apache.commons.logging - + + + + \ No newline at end of file diff --git a/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/dialogs/ChangePasswordDialog.java b/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/dialogs/ChangePasswordDialog.java index 09fbc18d6..6c492ce97 100644 --- a/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/dialogs/ChangePasswordDialog.java +++ b/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/dialogs/ChangePasswordDialog.java @@ -28,7 +28,7 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; -import org.springframework.security.userdetails.UserDetailsManager; +import org.springframework.security.provisioning.UserDetailsManager; /** Dialog to change the current user password */ public class ChangePasswordDialog extends TitleAreaDialog { diff --git a/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/dialogs/UserCreationWizard.java b/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/dialogs/UserCreationWizard.java index 24ea3cb4c..ac7f0cee5 100644 --- a/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/dialogs/UserCreationWizard.java +++ b/org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/dialogs/UserCreationWizard.java @@ -15,6 +15,8 @@ */ package org.argeo.eclipse.ui.dialogs; +import java.util.ArrayList; + import javax.jcr.Node; import javax.jcr.Property; import javax.jcr.RepositoryException; @@ -39,9 +41,9 @@ import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Text; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.userdetails.UserDetails; -import org.springframework.security.userdetails.UsernameNotFoundException; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UsernameNotFoundException; /** Wizard to create a new user */ public class UserCreationWizard extends Wizard { @@ -80,7 +82,7 @@ public class UserCreationWizard extends Wizard { String password = mainUserInfo.getPassword(); // TODO add roles JcrUserDetails jcrUserDetails = new JcrUserDetails(userProfile, - password, new GrantedAuthority[0]); + password, new ArrayList()); session.save(); session.getWorkspace().getVersionManager() .checkin(userProfile.getPath()); diff --git a/org.argeo.ext.jdbm/.project b/org.argeo.ext.jdbm/.project deleted file mode 100644 index b1d7029b9..000000000 --- a/org.argeo.ext.jdbm/.project +++ /dev/null @@ -1,22 +0,0 @@ - - - org.argeo.ext.jdbm - - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - - diff --git a/org.argeo.ext.jdbm/bnd.bnd b/org.argeo.ext.jdbm/bnd.bnd deleted file mode 100644 index e69de29bb..000000000 diff --git a/org.argeo.ext.jdbm/build.properties b/org.argeo.ext.jdbm/build.properties deleted file mode 100644 index 5f22cdd44..000000000 --- a/org.argeo.ext.jdbm/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = META-INF/ diff --git a/org.argeo.ext.jdbm/pom.xml b/org.argeo.ext.jdbm/pom.xml deleted file mode 100644 index e42ead177..000000000 --- a/org.argeo.ext.jdbm/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12 - argeo-commons - .. - - org.argeo.ext.jdbm - Commons Server JDBM Extension - Add Apache Directory Server support to JDBM - - - - org.apache.felix - maven-bundle-plugin - - - jdbm - - org.apache.directory.server.core.partition.impl.btree.jdbm;resolution:=optional, - org.apache.directory.server.core.schema;resolution:=optional, - org.apache.directory.server.core.partition.impl;resolution:=optional, - org.apache.directory.server.core.partition.impl.btree;resolution:=optional, - org.apache.directory.shared.ldap.message;resolution:=optional, - - - - - - - \ No newline at end of file diff --git a/org.argeo.jackrabbit.webapp/.project b/org.argeo.jackrabbit.webapp/.project deleted file mode 100644 index 37eed0584..000000000 --- a/org.argeo.jackrabbit.webapp/.project +++ /dev/null @@ -1,22 +0,0 @@ - - - org.argeo.jackrabbit.webapp - - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - - diff --git a/org.argeo.jackrabbit.webapp/.settings/org.eclipse.pde.core.prefs b/org.argeo.jackrabbit.webapp/.settings/org.eclipse.pde.core.prefs deleted file mode 100644 index ee0c8b2c0..000000000 --- a/org.argeo.jackrabbit.webapp/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Tue Feb 22 17:15:24 CET 2011 -eclipse.preferences.version=1 -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/org.argeo.jackrabbit.webapp/WEB-INF/applicationContext.xml b/org.argeo.jackrabbit.webapp/WEB-INF/applicationContext.xml deleted file mode 100644 index 723e6c70f..000000000 --- a/org.argeo.jackrabbit.webapp/WEB-INF/applicationContext.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - osgibundle:jackrabbit-webapp.properties - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/org.argeo.jackrabbit.webapp/WEB-INF/osgi.xml b/org.argeo.jackrabbit.webapp/WEB-INF/osgi.xml deleted file mode 100644 index b4a3c48df..000000000 --- a/org.argeo.jackrabbit.webapp/WEB-INF/osgi.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/org.argeo.jackrabbit.webapp/WEB-INF/remoting-servlet.xml b/org.argeo.jackrabbit.webapp/WEB-INF/remoting-servlet.xml deleted file mode 100644 index f5cd4d609..000000000 --- a/org.argeo.jackrabbit.webapp/WEB-INF/remoting-servlet.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/org.argeo.jackrabbit.webapp/WEB-INF/security-filters.xml b/org.argeo.jackrabbit.webapp/WEB-INF/security-filters.xml deleted file mode 100644 index 52238a7de..000000000 --- a/org.argeo.jackrabbit.webapp/WEB-INF/security-filters.xml +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PATTERN_TYPE_APACHE_ANT - /**=ROLE_USER,ROLE_ADMIN - - - - - - - PATTERN_TYPE_APACHE_ANT - /**=IS_AUTHENTICATED_ANONYMOUSLY - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${argeo.server.realmName} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/org.argeo.jackrabbit.webapp/WEB-INF/web.xml b/org.argeo.jackrabbit.webapp/WEB-INF/web.xml deleted file mode 100644 index a1876b306..000000000 --- a/org.argeo.jackrabbit.webapp/WEB-INF/web.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - - Argeo Jackrabbit Webapp - - - - 5 - - - - - contextConfigLocation - /WEB-INF/applicationContext.xml - - - - Spring Context - org.springframework.web.context.ContextLoaderListener - - - contextClass - org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext - - - - - remoting - org.argeo.jackrabbit.remote.ExtendedDispatcherServlet - - contextClass - org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext - - - dispatchOptionsRequest - true - - 1 - - - - remoting - /jcr/* - - - - remoting - /pub/* - - - - - webdav - org.argeo.jackrabbit.remote.ExtendedDispatcherServlet - - contextClass - org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext - - - dispatchOptionsRequest - true - - 1 - - - - webdav - /files/* - - - - webdav - /public/* - - - - - filterChain.davex - org.springframework.web.filter.DelegatingFilterProxy - - - filterChain.davex - /jcr/* - - - - filterChain.private - org.springframework.web.filter.DelegatingFilterProxy - - - filterChain.private - /files/* - - - - filterChain.public - org.springframework.web.filter.DelegatingFilterProxy - - - filterChain.public - /pub/* - - - filterChain.public - /public/* - - - diff --git a/org.argeo.jackrabbit.webapp/WEB-INF/webdav-config.xml b/org.argeo.jackrabbit.webapp/WEB-INF/webdav-config.xml deleted file mode 100644 index da4e18b11..000000000 --- a/org.argeo.jackrabbit.webapp/WEB-INF/webdav-config.xml +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - nt:file - nt:resource - - - - - - - - - - - - - rep - jcr - - - - - - - diff --git a/org.argeo.jackrabbit.webapp/WEB-INF/webdav-servlet.xml b/org.argeo.jackrabbit.webapp/WEB-INF/webdav-servlet.xml deleted file mode 100644 index 561d20c03..000000000 --- a/org.argeo.jackrabbit.webapp/WEB-INF/webdav-servlet.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/org.argeo.jackrabbit.webapp/bnd.bnd b/org.argeo.jackrabbit.webapp/bnd.bnd deleted file mode 100644 index e69de29bb..000000000 diff --git a/org.argeo.jackrabbit.webapp/build.properties b/org.argeo.jackrabbit.webapp/build.properties deleted file mode 100644 index 5f22cdd44..000000000 --- a/org.argeo.jackrabbit.webapp/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = META-INF/ diff --git a/org.argeo.jackrabbit.webapp/jackrabbit-webapp.properties b/org.argeo.jackrabbit.webapp/jackrabbit-webapp.properties deleted file mode 100644 index 47f47b93b..000000000 --- a/org.argeo.jackrabbit.webapp/jackrabbit-webapp.properties +++ /dev/null @@ -1,3 +0,0 @@ -argeo.security.systemKey=argeo -argeo.server.realmName=Argeo -argeo.jcr.webapp.rememberMeValidity=3600 \ No newline at end of file diff --git a/org.argeo.jackrabbit.webapp/pom.xml b/org.argeo.jackrabbit.webapp/pom.xml deleted file mode 100644 index a6022fa17..000000000 --- a/org.argeo.jackrabbit.webapp/pom.xml +++ /dev/null @@ -1,61 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12 - argeo-commons - .. - - org.argeo.jackrabbit.webapp - Commons Server Jackrabbit Webapp - JCR remoting, WebDav - - - - org.apache.felix - maven-bundle-plugin - - - data - - - *, - javax.jcr, - javax.servlet, - javax.servlet.http, - javax.servlet.resources, - org.aopalliance.aop, - org.argeo.jackrabbit.remote, - org.argeo.jcr, - org.argeo.jcr.mvc, - org.springframework.aop, - org.springframework.aop.framework, - org.springframework.aop.scope, - org.springframework.beans.factory.config, - org.springframework.osgi.web.context.support, - org.springframework.security, - org.springframework.security.providers.anonymous, - org.springframework.security.ui, - org.springframework.security.ui.webapp, - org.springframework.security.ui.preauth.x509, - org.springframework.security.userdetails, - org.springframework.web.context, - org.springframework.web.filter, - org.springframework.web.servlet, - org.springframework.web.servlet.handler, - org.springframework.web.servlet.view, - org.springframework.security.util, - org.springframework.security.context, - org.springframework.security.ui.basicauth, - org.springframework.security.intercept.web, - org.springframework.security.vote, - org.springframework.security.ui.logout, - org.apache.jackrabbit.server, - - - - - - - \ No newline at end of file diff --git a/org.argeo.osgi.boot/build.properties b/org.argeo.osgi.boot/build.properties index f17a5821b..31b02d2fa 100644 --- a/org.argeo.osgi.boot/build.properties +++ b/org.argeo.osgi.boot/build.properties @@ -1 +1 @@ -additional.bundles = junit +additional.bundles = org.junit diff --git a/org.argeo.osgi.boot/pom.xml b/org.argeo.osgi.boot/pom.xml index dfaa0ecd1..db4aaf810 100644 --- a/org.argeo.osgi.boot/pom.xml +++ b/org.argeo.osgi.boot/pom.xml @@ -21,18 +21,25 @@ - - org.argeo.tp.rap.platform - org.eclipse.osgi - provided - + + + + + + + + + + + + - - org.argeo.tp - junit - test - + + + + + diff --git a/org.argeo.security.auth.ldap/META-INF/spring/security-ldap-osgi.xml b/org.argeo.security.auth.ldap/META-INF/spring/security-ldap-osgi.xml index d817f9644..c03964209 100644 --- a/org.argeo.security.auth.ldap/META-INF/spring/security-ldap-osgi.xml +++ b/org.argeo.security.auth.ldap/META-INF/spring/security-ldap-osgi.xml @@ -12,15 +12,15 @@ - + - + diff --git a/org.argeo.security.auth.ldap/META-INF/spring/security-ldap-services.xml b/org.argeo.security.auth.ldap/META-INF/spring/security-ldap-services.xml index 0b9a8b8f0..6fcf77dea 100644 --- a/org.argeo.security.auth.ldap/META-INF/spring/security-ldap-services.xml +++ b/org.argeo.security.auth.ldap/META-INF/spring/security-ldap-services.xml @@ -4,7 +4,7 @@ xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> - + @@ -35,7 +35,7 @@ + class="org.springframework.security.authentication.AnonymousAuthenticationProvider"> @@ -50,7 +50,7 @@ initialization himself, in order to prevent the following dependency cycle: Repository.login() <= AuthenticationManager <= LdapAuthenticationProvider <= Repository.login() in init() --> - + diff --git a/org.argeo.security.core/bnd.bnd b/org.argeo.security.core/bnd.bnd index 2bbd9c3b8..9124816cb 100644 --- a/org.argeo.security.core/bnd.bnd +++ b/org.argeo.security.core/bnd.bnd @@ -1,4 +1,5 @@ Bundle-ActivationPolicy: lazy Import-Package:org.bouncycastle.*;resolution:=optional,\ +org.springframework.util,\ javax.jcr.security,\ * diff --git a/org.argeo.security.core/build.properties b/org.argeo.security.core/build.properties index a25d2eaec..3ad70fd32 100644 --- a/org.argeo.security.core/build.properties +++ b/org.argeo.security.core/build.properties @@ -1,11 +1,6 @@ -additional.bundles = org.springframework.transaction,\ - org.springframework.core,\ - junit,\ - org.apache.commons.io,\ - org.apache.commons.codec,\ - org.springframework.security.core,\ - org.apache.log4j,\ - slf4j.api,\ - slf4j.org.apache.commons.logging source.. = src/,\ ext/test/ +additional.bundles = org.junit,\ + org.slf4j.commons.logging,\ + org.apache.commons.codec,\ + org.springframework.security.core diff --git a/org.argeo.security.core/ext/test/org/argeo/security/PasswordSandbox.java b/org.argeo.security.core/ext/test/org/argeo/security/PasswordSandbox.java index d8a084607..de9a1eb1e 100644 --- a/org.argeo.security.core/ext/test/org/argeo/security/PasswordSandbox.java +++ b/org.argeo.security.core/ext/test/org/argeo/security/PasswordSandbox.java @@ -18,7 +18,7 @@ package org.argeo.security; import org.apache.commons.codec.DecoderException; import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Hex; -import org.springframework.security.providers.ldap.authenticator.LdapShaPasswordEncoder; +import org.springframework.security.authentication.encoding.LdapShaPasswordEncoder; public class PasswordSandbox { public static void main(String[] args) { diff --git a/org.argeo.security.core/pom.xml b/org.argeo.security.core/pom.xml index 0e1d73a34..bcc0044be 100644 --- a/org.argeo.security.core/pom.xml +++ b/org.argeo.security.core/pom.xml @@ -9,42 +9,6 @@ org.argeo.security.core Commons Security Core - - - - 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.security.* - - - - org.bouncycastle.*;resolution:=optional, - javax.jcr.security, - *, - - - - - - org.argeo.commons @@ -57,82 +21,90 @@ 2.1.12 + + + + + + + + - - org.argeo.tp - bcprov - true - - - org.argeo.tp - org.apache.commons.codec - + + + + + + + + + - - org.argeo.tp - org.springframework.core - - - org.argeo.tp - org.springframework.beans - - - org.argeo.tp - org.springframework.context - - - org.argeo.tp - org.springframework.security.core - - - org.argeo.tp - org.springframework.transaction - + + + + + + + + + + + + + + + + + + + + - - org.argeo.tp - org.eclipse.osgi - provided - + + + + + - - org.argeo.tp - slf4j.org.apache.commons.logging - + + + + - - org.argeo.tp - org.apache.log4j - true - + + + + + - - org.argeo.tp - junit - test - - - org.argeo.commons - org.argeo.dep.log4j - 2.1.12 - pom - test - - - - - - - - - org.argeo.tp - com.springsource.json - test - + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/org.argeo.security.core/src/org/argeo/security/NodeAuthenticationToken.java b/org.argeo.security.core/src/org/argeo/security/NodeAuthenticationToken.java index 1870675d8..4a802553b 100644 --- a/org.argeo.security.core/src/org/argeo/security/NodeAuthenticationToken.java +++ b/org.argeo.security.core/src/org/argeo/security/NodeAuthenticationToken.java @@ -15,8 +15,10 @@ */ package org.argeo.security; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.providers.UsernamePasswordAuthenticationToken; +import java.util.Collection; + +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.GrantedAuthority; /** Credentials required for the authentication to a node. */ public class NodeAuthenticationToken extends @@ -39,7 +41,7 @@ public class NodeAuthenticationToken extends /** Authenticated constructor */ public NodeAuthenticationToken(NodeAuthenticationToken sat, - GrantedAuthority[] authorities) { + Collection authorities) { super(sat.getPrincipal(), sat.getCredentials(), authorities); this.url = sat.getUrl(); } diff --git a/org.argeo.security.core/src/org/argeo/security/OsAuthenticationToken.java b/org.argeo.security.core/src/org/argeo/security/OsAuthenticationToken.java index b3727b26f..5b71394dd 100644 --- a/org.argeo.security.core/src/org/argeo/security/OsAuthenticationToken.java +++ b/org.argeo.security.core/src/org/argeo/security/OsAuthenticationToken.java @@ -18,7 +18,7 @@ package org.argeo.security; import java.security.AccessController; import java.security.Principal; import java.util.ArrayList; -import java.util.Arrays; +import java.util.Collection; import java.util.List; import java.util.Set; @@ -26,10 +26,10 @@ import javax.security.auth.Subject; import org.argeo.ArgeoException; import org.argeo.OperatingSystem; -import org.springframework.security.Authentication; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.GrantedAuthorityImpl; -import org.springframework.security.userdetails.UserDetails; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; /** Abstracts principals provided by com.sun.security.auth.module login modules. */ public class OsAuthenticationToken implements Authentication { @@ -44,9 +44,9 @@ public class OsAuthenticationToken implements Authentication { private UserDetails details; /** Request */ - public OsAuthenticationToken(GrantedAuthority[] grantedAuthorities) { - this.grantedAuthorities = grantedAuthorities != null ? Arrays - .asList(grantedAuthorities) : null; + public OsAuthenticationToken( + Collection authorities) { + this.grantedAuthorities = new ArrayList(authorities); ClassLoader cl = getClass().getClassLoader(); switch (OperatingSystem.os) { case OperatingSystem.WINDOWS: @@ -83,7 +83,7 @@ public class OsAuthenticationToken implements Authentication { /** Authenticated */ public OsAuthenticationToken() { - this(null); + this(new ArrayList()); } /** @return the name, or null if not yet logged */ @@ -98,15 +98,15 @@ public class OsAuthenticationToken implements Authentication { * Should not be called during authentication since group IDs are not yet * available {@link Subject} has been set */ - public GrantedAuthority[] getAuthorities() { + public Collection getAuthorities() { // grantedAuthorities should not be null at this stage List gas = new ArrayList( grantedAuthorities); for (Principal groupPrincipal : getGroupsIds()) { - gas.add(new GrantedAuthorityImpl("OSGROUP_" + gas.add(new SimpleGrantedAuthority("OSGROUP_" + groupPrincipal.getName())); } - return gas.toArray(new GrantedAuthority[gas.size()]); + return gas; } public UserDetails getDetails() { diff --git a/org.argeo.security.core/src/org/argeo/security/SecurityUtils.java b/org.argeo.security.core/src/org/argeo/security/SecurityUtils.java index e5b8ae79c..44ddeac86 100644 --- a/org.argeo.security.core/src/org/argeo/security/SecurityUtils.java +++ b/org.argeo.security.core/src/org/argeo/security/SecurityUtils.java @@ -16,14 +16,15 @@ package org.argeo.security; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; import java.util.List; -import org.springframework.security.Authentication; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.context.SecurityContext; -import org.springframework.security.context.SecurityContextHolder; -import org.springframework.security.providers.anonymous.AnonymousAuthenticationToken; +import org.springframework.security.authentication.AnonymousAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.context.SecurityContext; +import org.springframework.security.core.context.SecurityContextHolder; /** Static utilities */ public class SecurityUtils { @@ -89,7 +90,7 @@ public class SecurityUtils { * read-only list of strings, for portability and integration */ public static List authoritiesToStringList( - GrantedAuthority[] authorities) { + Collection authorities) { List lst = new ArrayList(); for (GrantedAuthority ga : authorities) lst.add(ga.getAuthority()); diff --git a/org.argeo.security.core/src/org/argeo/security/UserAdminService.java b/org.argeo.security.core/src/org/argeo/security/UserAdminService.java index 0a84cf66f..8a391ff9f 100644 --- a/org.argeo.security.core/src/org/argeo/security/UserAdminService.java +++ b/org.argeo.security.core/src/org/argeo/security/UserAdminService.java @@ -17,7 +17,7 @@ package org.argeo.security; import java.util.Set; -import org.springframework.security.userdetails.UserDetailsManager; +import org.springframework.security.provisioning.UserDetailsManager; /** Enrich {@link UserDetailsManager} in order to provide roles semantics. */ public interface UserAdminService extends UserDetailsManager { diff --git a/org.argeo.security.core/src/org/argeo/security/core/AbstractSystemExecution.java b/org.argeo.security.core/src/org/argeo/security/core/AbstractSystemExecution.java index b84f3de00..3abc1b482 100644 --- a/org.argeo.security.core/src/org/argeo/security/core/AbstractSystemExecution.java +++ b/org.argeo.security.core/src/org/argeo/security/core/AbstractSystemExecution.java @@ -19,10 +19,10 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.argeo.ArgeoException; import org.argeo.security.SystemAuthentication; -import org.springframework.security.Authentication; -import org.springframework.security.AuthenticationManager; -import org.springframework.security.context.SecurityContext; -import org.springframework.security.context.SecurityContextHolder; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContext; +import org.springframework.security.core.context.SecurityContextHolder; /** Provides base method for executing code with system authorization. */ public abstract class AbstractSystemExecution { diff --git a/org.argeo.security.core/src/org/argeo/security/core/AuthenticatedApplicationContextInitialization.java b/org.argeo.security.core/src/org/argeo/security/core/AuthenticatedApplicationContextInitialization.java index 97dd6cae0..1c1059199 100644 --- a/org.argeo.security.core/src/org/argeo/security/core/AuthenticatedApplicationContextInitialization.java +++ b/org.argeo.security.core/src/org/argeo/security/core/AuthenticatedApplicationContextInitialization.java @@ -32,7 +32,7 @@ import org.springframework.context.event.ContextRefreshedEvent; */ public class AuthenticatedApplicationContextInitialization extends AbstractSystemExecution implements InstantiationAwareBeanPostProcessor, - ApplicationListener { + ApplicationListener { // private Log log = LogFactory // .getLog(AuthenticatedApplicationContextInitialization.class); /** If non empty, restricts to these beans */ diff --git a/org.argeo.security.core/src/org/argeo/security/core/InternalAuthentication.java b/org.argeo.security.core/src/org/argeo/security/core/InternalAuthentication.java index 267ddd312..ee5e145ba 100644 --- a/org.argeo.security.core/src/org/argeo/security/core/InternalAuthentication.java +++ b/org.argeo.security.core/src/org/argeo/security/core/InternalAuthentication.java @@ -15,13 +15,14 @@ */ package org.argeo.security.core; +import java.util.Collections; + import org.argeo.security.SystemAuthentication; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.GrantedAuthorityImpl; -import org.springframework.security.adapters.PrincipalSpringSecurityUserToken; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.authority.SimpleGrantedAuthority; /** A token base on a system key used to request a system authentication. */ -public class InternalAuthentication extends PrincipalSpringSecurityUserToken +public class InternalAuthentication extends UsernamePasswordAuthenticationToken implements SystemAuthentication { private static final long serialVersionUID = -6783376375615949315L; /** 'admin' for consistency with JCR */ @@ -32,12 +33,8 @@ public class InternalAuthentication extends PrincipalSpringSecurityUserToken public InternalAuthentication(String key, String systemUsername, String systemRole) { - super( - key, - systemUsername, - key, - new GrantedAuthority[] { new GrantedAuthorityImpl(systemRole) }, - systemUsername); + super(systemUsername, key, Collections + .singleton(new SimpleGrantedAuthority(systemRole))); } public InternalAuthentication(String key) { diff --git a/org.argeo.security.core/src/org/argeo/security/core/InternalAuthenticationProvider.java b/org.argeo.security.core/src/org/argeo/security/core/InternalAuthenticationProvider.java new file mode 100644 index 000000000..0efabcde0 --- /dev/null +++ b/org.argeo.security.core/src/org/argeo/security/core/InternalAuthenticationProvider.java @@ -0,0 +1,28 @@ +package org.argeo.security.core; + +import org.springframework.security.authentication.AuthenticationProvider; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; + +public class InternalAuthenticationProvider implements AuthenticationProvider { + private String key; + + @Override + public Authentication authenticate(Authentication arg0) + throws AuthenticationException { + InternalAuthentication authentication = (InternalAuthentication) arg0; + if (authentication.getCredentials().toString().equals(key)) + return authentication; + return null; + } + + public void setKey(String key) { + this.key = key; + } + + @Override + public boolean supports(Class authentication) { + return InternalAuthentication.class.isAssignableFrom(authentication); + } + +} diff --git a/org.argeo.security.core/src/org/argeo/security/core/MatchingAuthenticationProvider.java b/org.argeo.security.core/src/org/argeo/security/core/MatchingAuthenticationProvider.java index 0471151a2..8fa3f0d6d 100644 --- a/org.argeo.security.core/src/org/argeo/security/core/MatchingAuthenticationProvider.java +++ b/org.argeo.security.core/src/org/argeo/security/core/MatchingAuthenticationProvider.java @@ -21,14 +21,14 @@ import java.util.List; import java.util.Properties; import org.springframework.core.io.Resource; -import org.springframework.security.AuthenticationException; -import org.springframework.security.BadCredentialsException; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.GrantedAuthorityImpl; -import org.springframework.security.providers.UsernamePasswordAuthenticationToken; -import org.springframework.security.providers.dao.AbstractUserDetailsAuthenticationProvider; -import org.springframework.security.userdetails.User; -import org.springframework.security.userdetails.UserDetails; +import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.GrantedAuthorityImpl; +import org.springframework.security.core.userdetails.User; +import org.springframework.security.core.userdetails.UserDetails; /** @deprecated */ @Deprecated @@ -72,15 +72,8 @@ public class MatchingAuthenticationProvider extends List grantedAuthorities = new ArrayList(); for (String role : defaultRoles) grantedAuthorities.add(new GrantedAuthorityImpl(role)); - return new User( - username, - value, - true, - true, - true, - true, - grantedAuthorities - .toArray(new GrantedAuthority[grantedAuthorities.size()])); + return new User(username, value, true, true, true, true, + grantedAuthorities); } public void setMapping(Resource mapping) { diff --git a/org.argeo.security.core/src/org/argeo/security/core/OsAuthenticationProvider.java b/org.argeo.security.core/src/org/argeo/security/core/OsAuthenticationProvider.java index 0e29ecd59..4f1d56447 100644 --- a/org.argeo.security.core/src/org/argeo/security/core/OsAuthenticationProvider.java +++ b/org.argeo.security.core/src/org/argeo/security/core/OsAuthenticationProvider.java @@ -16,14 +16,15 @@ package org.argeo.security.core; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import org.argeo.security.OsAuthenticationToken; -import org.springframework.security.Authentication; -import org.springframework.security.AuthenticationException; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.GrantedAuthorityImpl; -import org.springframework.security.providers.AuthenticationProvider; +import org.springframework.security.authentication.AuthenticationProvider; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; /** * Validates an OS authentication. The id is that it will always be @@ -44,13 +45,13 @@ public class OsAuthenticationProvider implements AuthenticationProvider { return new OsAuthenticationToken(getBaseAuthorities()); } - public static GrantedAuthority[] getBaseAuthorities() { + public static Collection getBaseAuthorities() { List auths = new ArrayList(); - auths.add(new GrantedAuthorityImpl(osUserRole)); - auths.add(new GrantedAuthorityImpl(userRole)); + auths.add(new SimpleGrantedAuthority(osUserRole)); + auths.add(new SimpleGrantedAuthority(userRole)); if (isAdmin) - auths.add(new GrantedAuthorityImpl(adminRole)); - return auths.toArray(new GrantedAuthority[auths.size()]); + auths.add(new SimpleGrantedAuthority(adminRole)); + return auths; } @SuppressWarnings("rawtypes") diff --git a/org.argeo.security.core/src/org/argeo/security/jcr/JcrUserDetails.java b/org.argeo.security.core/src/org/argeo/security/jcr/JcrUserDetails.java index 2f7b97b78..208f85261 100644 --- a/org.argeo.security.core/src/org/argeo/security/jcr/JcrUserDetails.java +++ b/org.argeo.security.core/src/org/argeo/security/jcr/JcrUserDetails.java @@ -16,6 +16,7 @@ package org.argeo.security.jcr; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import javax.jcr.Node; @@ -25,12 +26,12 @@ import javax.jcr.Session; import org.argeo.jcr.ArgeoNames; import org.argeo.jcr.UserJcrUtils; -import org.springframework.security.BadCredentialsException; -import org.springframework.security.DisabledException; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.GrantedAuthorityImpl; -import org.springframework.security.LockedException; -import org.springframework.security.userdetails.User; +import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.security.authentication.DisabledException; +import org.springframework.security.authentication.LockedException; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.userdetails.User; /** User details based on a user profile node. */ public class JcrUserDetails extends User implements ArgeoNames { @@ -44,7 +45,8 @@ public class JcrUserDetails extends User implements ArgeoNames { protected JcrUserDetails(String securityWorkspace, String homePath, String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, - boolean accountNonLocked, GrantedAuthority[] authorities) + boolean accountNonLocked, + Collection authorities) throws IllegalArgumentException { super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities); @@ -53,7 +55,8 @@ public class JcrUserDetails extends User implements ArgeoNames { } public JcrUserDetails(Node userProfile, String password, - GrantedAuthority[] authorities) throws RepositoryException { + Collection authorities) + throws RepositoryException { super( userProfile.getProperty(ARGEO_USER_ID).getString(), password, @@ -89,7 +92,8 @@ public class JcrUserDetails extends User implements ArgeoNames { * the granted authorities */ public JcrUserDetails(Session session, String username, String password, - GrantedAuthority[] authorities) throws RepositoryException { + Collection authorities) + throws RepositoryException { this(UserJcrUtils.getUserProfile(session, username), password != null ? password : "", authorities); } @@ -114,12 +118,11 @@ public class JcrUserDetails extends User implements ArgeoNames { public JcrUserDetails cloneWithNewRoles(List roles) { List authorities = new ArrayList(); for (String role : roles) { - authorities.add(new GrantedAuthorityImpl(role)); + authorities.add(new SimpleGrantedAuthority(role)); } return new JcrUserDetails(securityWorkspace, homePath, getUsername(), getPassword(), isEnabled(), isAccountNonExpired(), - isAccountNonExpired(), isAccountNonLocked(), - authorities.toArray(new GrantedAuthority[authorities.size()])); + isAccountNonExpired(), isAccountNonLocked(), authorities); } /** Clone immutable with new password */ diff --git a/org.argeo.security.core/src/org/argeo/security/jcr/OsJcrAuthenticationProvider.java b/org.argeo.security.core/src/org/argeo/security/jcr/OsJcrAuthenticationProvider.java index aa95e322d..7125604c7 100644 --- a/org.argeo.security.core/src/org/argeo/security/jcr/OsJcrAuthenticationProvider.java +++ b/org.argeo.security.core/src/org/argeo/security/jcr/OsJcrAuthenticationProvider.java @@ -15,6 +15,8 @@ */ package org.argeo.security.jcr; +import java.util.Collection; + import javax.jcr.Node; import javax.jcr.Repository; import javax.jcr.RepositoryException; @@ -25,12 +27,12 @@ import org.argeo.jcr.JcrUtils; import org.argeo.security.OsAuthenticationToken; import org.argeo.security.SecurityUtils; import org.argeo.security.core.OsAuthenticationProvider; -import org.springframework.security.Authentication; -import org.springframework.security.AuthenticationException; -import org.springframework.security.BadCredentialsException; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.providers.UsernamePasswordAuthenticationToken; -import org.springframework.security.userdetails.UserDetails; +import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; /** Relies on OS to authenticate and additionally setup JCR */ public class OsJcrAuthenticationProvider extends OsAuthenticationProvider { @@ -76,7 +78,7 @@ public class OsJcrAuthenticationProvider extends OsAuthenticationProvider { try { // WARNING: at this stage we assume that the java properties // will have the same value - GrantedAuthority[] authorities = getBaseAuthorities(); + Collection authorities = getBaseAuthorities(); String username = JVM_OSUSER; Node userProfile = jcrSecurityModel.sync(nodeSession, username, SecurityUtils.authoritiesToStringList(authorities)); diff --git a/org.argeo.security.core/src/org/argeo/security/jcr/OsJcrUserAdminService.java b/org.argeo.security.core/src/org/argeo/security/jcr/OsJcrUserAdminService.java index c25bdb865..1eab37048 100644 --- a/org.argeo.security.core/src/org/argeo/security/jcr/OsJcrUserAdminService.java +++ b/org.argeo.security.core/src/org/argeo/security/jcr/OsJcrUserAdminService.java @@ -30,9 +30,9 @@ import org.argeo.jcr.JcrUtils; import org.argeo.jcr.UserJcrUtils; import org.argeo.security.UserAdminService; import org.springframework.dao.DataAccessException; -import org.springframework.security.userdetails.User; -import org.springframework.security.userdetails.UserDetails; -import org.springframework.security.userdetails.UsernameNotFoundException; +import org.springframework.security.core.userdetails.User; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UsernameNotFoundException; /** * Dummy user service to be used when running as a single OS user (typically diff --git a/org.argeo.security.core/src/org/argeo/security/jcr/RemoteJcrAuthenticationProvider.java b/org.argeo.security.core/src/org/argeo/security/jcr/RemoteJcrAuthenticationProvider.java index 87208b2a3..154107576 100644 --- a/org.argeo.security.core/src/org/argeo/security/jcr/RemoteJcrAuthenticationProvider.java +++ b/org.argeo.security.core/src/org/argeo/security/jcr/RemoteJcrAuthenticationProvider.java @@ -34,12 +34,12 @@ import org.argeo.jcr.ArgeoNames; import org.argeo.jcr.UserJcrUtils; import org.argeo.security.NodeAuthenticationToken; import org.osgi.framework.BundleContext; -import org.springframework.security.Authentication; -import org.springframework.security.AuthenticationException; -import org.springframework.security.BadCredentialsException; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.GrantedAuthorityImpl; -import org.springframework.security.providers.AuthenticationProvider; +import org.springframework.security.authentication.AuthenticationProvider; +import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; /** Connects to a JCR repository and delegates authentication to it. */ public class RemoteJcrAuthenticationProvider implements AuthenticationProvider, @@ -105,18 +105,18 @@ public class RemoteJcrAuthenticationProvider implements AuthenticationProvider, Value[] roles = userProfile.getProperty( ArgeoNames.ARGEO_REMOTE_ROLES).getValues(); for (int i = 0; i < roles.length; i++) - authoritiesList.add(new GrantedAuthorityImpl(roles[i] + authoritiesList.add(new SimpleGrantedAuthority(roles[i] .getString())); } - authoritiesList.add(new GrantedAuthorityImpl(ROLE_REMOTE)); + authoritiesList.add(new SimpleGrantedAuthority(ROLE_REMOTE)); // create authenticated objects - GrantedAuthority[] authorities = authoritiesList - .toArray(new GrantedAuthority[authoritiesList.size()]); + // GrantedAuthority[] authorities = authoritiesList + // .toArray(new GrantedAuthority[authoritiesList.size()]); JcrUserDetails userDetails = new JcrUserDetails(userProfile, - siteAuth.getCredentials().toString(), authorities); + siteAuth.getCredentials().toString(), authoritiesList); NodeAuthenticationToken authenticated = new NodeAuthenticationToken( - siteAuth, authorities); + siteAuth, authoritiesList); authenticated.setDetails(userDetails); return authenticated; } catch (RepositoryException e) { diff --git a/org.argeo.security.core/src/org/argeo/security/jcr/RemoteJcrRepositoryWrapper.java b/org.argeo.security.core/src/org/argeo/security/jcr/RemoteJcrRepositoryWrapper.java index f0ad3a3a9..54406c0cb 100644 --- a/org.argeo.security.core/src/org/argeo/security/jcr/RemoteJcrRepositoryWrapper.java +++ b/org.argeo.security.core/src/org/argeo/security/jcr/RemoteJcrRepositoryWrapper.java @@ -31,9 +31,9 @@ import org.argeo.jcr.ArgeoJcrUtils; import org.argeo.jcr.JcrRepositoryWrapper; import org.argeo.security.NodeAuthenticationToken; import org.argeo.security.SystemAuthentication; -import org.springframework.security.Authentication; -import org.springframework.security.context.SecurityContextHolder; -import org.springframework.security.providers.UsernamePasswordAuthenticationToken; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; /** * Wrapper around a remote Jackrabbit repository which allows to simplify diff --git a/org.argeo.security.core/src/org/argeo/security/jcr/SecureThreadBoundSession.java b/org.argeo.security.core/src/org/argeo/security/jcr/SecureThreadBoundSession.java index b39877420..7ef15947f 100644 --- a/org.argeo.security.core/src/org/argeo/security/jcr/SecureThreadBoundSession.java +++ b/org.argeo.security.core/src/org/argeo/security/jcr/SecureThreadBoundSession.java @@ -20,8 +20,8 @@ import javax.jcr.Session; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.argeo.jcr.spring.ThreadBoundSession; -import org.springframework.security.Authentication; -import org.springframework.security.context.SecurityContextHolder; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; /** * Thread bounded JCR session factory which checks authentication and is diff --git a/org.argeo.security.core/src/org/argeo/security/jcr/rememberme/JcrPersistentTokenRepository.java b/org.argeo.security.core/src/org/argeo/security/jcr/rememberme/JcrPersistentTokenRepository.java index 37dc98676..a573b6ae2 100644 --- a/org.argeo.security.core/src/org/argeo/security/jcr/rememberme/JcrPersistentTokenRepository.java +++ b/org.argeo.security.core/src/org/argeo/security/jcr/rememberme/JcrPersistentTokenRepository.java @@ -17,8 +17,8 @@ package org.argeo.security.jcr.rememberme; import java.util.Date; -import org.springframework.security.ui.rememberme.PersistentRememberMeToken; -import org.springframework.security.ui.rememberme.PersistentTokenRepository; +import org.springframework.security.web.authentication.rememberme.PersistentRememberMeToken; +import org.springframework.security.web.authentication.rememberme.PersistentTokenRepository; public class JcrPersistentTokenRepository implements PersistentTokenRepository { diff --git a/org.argeo.security.dao.cli/META-INF/spring/security-cli-osgi.xml b/org.argeo.security.dao.cli/META-INF/spring/security-cli-osgi.xml index c46f2764c..f2bcd97b7 100644 --- a/org.argeo.security.dao.cli/META-INF/spring/security-cli-osgi.xml +++ b/org.argeo.security.dao.cli/META-INF/spring/security-cli-osgi.xml @@ -15,14 +15,14 @@ + interface="org.springframework.security.authentication.AuthenticationManager" /> diff --git a/org.argeo.security.dao.cli/META-INF/spring/security-cli.xml b/org.argeo.security.dao.cli/META-INF/spring/security-cli.xml index c3f6c8122..f79cf0db1 100644 --- a/org.argeo.security.dao.cli/META-INF/spring/security-cli.xml +++ b/org.argeo.security.dao.cli/META-INF/spring/security-cli.xml @@ -23,7 +23,8 @@ - + @@ -41,8 +42,7 @@ - + @@ -51,7 +51,8 @@ himself, in order to prevent the following dependency cycle: Repository.login() <= AuthenticationManager <= osJcrAuthenticationProvider <= Repository.login() in init() --> - + diff --git a/org.argeo.security.dao.jackrabbit/META-INF/spring/remote.xml b/org.argeo.security.dao.jackrabbit/META-INF/spring/remote.xml index ff62a5c64..b44585dc0 100644 --- a/org.argeo.security.dao.jackrabbit/META-INF/spring/remote.xml +++ b/org.argeo.security.dao.jackrabbit/META-INF/spring/remote.xml @@ -9,7 +9,7 @@ - + diff --git a/org.argeo.security.dao.jackrabbit/META-INF/spring/security-jcr-osgi.xml b/org.argeo.security.dao.jackrabbit/META-INF/spring/security-jcr-osgi.xml index 3d3f4010f..7ca23acfa 100644 --- a/org.argeo.security.dao.jackrabbit/META-INF/spring/security-jcr-osgi.xml +++ b/org.argeo.security.dao.jackrabbit/META-INF/spring/security-jcr-osgi.xml @@ -15,13 +15,13 @@ + interface="org.springframework.security.authentication.AuthenticationManager" /> + interface="org.springframework.security.core.userdetails.UserDetailsService" /> + interface="org.springframework.security.provisioning.UserDetailsManager" /> \ No newline at end of file diff --git a/org.argeo.security.dao.jackrabbit/META-INF/spring/security-jcr-services.xml b/org.argeo.security.dao.jackrabbit/META-INF/spring/security-jcr-services.xml index 7f276a271..1923d1023 100644 --- a/org.argeo.security.dao.jackrabbit/META-INF/spring/security-jcr-services.xml +++ b/org.argeo.security.dao.jackrabbit/META-INF/spring/security-jcr-services.xml @@ -12,7 +12,8 @@ - + @@ -23,13 +24,12 @@ - + + class="org.springframework.security.authentication.AnonymousAuthenticationProvider"> @@ -61,7 +61,8 @@ initialization himself, in order to prevent the following dependency cycle: Repository.login() <= AuthenticationManager <= JackrabbitUserAdminService <= Repository.login() in init() --> - + diff --git a/org.argeo.security.dao.ldap/META-INF/spring/security-ldap-osgi.xml b/org.argeo.security.dao.ldap/META-INF/spring/security-ldap-osgi.xml index aa3b67ac6..9e6e3f24b 100644 --- a/org.argeo.security.dao.ldap/META-INF/spring/security-ldap-osgi.xml +++ b/org.argeo.security.dao.ldap/META-INF/spring/security-ldap-osgi.xml @@ -12,15 +12,15 @@ diff --git a/org.argeo.security.dao.ldap/META-INF/spring/security-ldap-services.xml b/org.argeo.security.dao.ldap/META-INF/spring/security-ldap-services.xml index 36dedf389..886f333f6 100644 --- a/org.argeo.security.dao.ldap/META-INF/spring/security-ldap-services.xml +++ b/org.argeo.security.dao.ldap/META-INF/spring/security-ldap-services.xml @@ -4,7 +4,8 @@ xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> - + @@ -17,8 +18,7 @@ - + @@ -35,7 +35,7 @@ + class="org.springframework.security.authentication.AnonymousAuthenticationProvider"> @@ -50,7 +50,8 @@ initialization himself, in order to prevent the following dependency cycle: Repository.login() <= AuthenticationManager <= LdapAuthenticationProvider <= Repository.login() in init() --> - + diff --git a/org.argeo.security.dao.os/.project b/org.argeo.security.dao.os/.project deleted file mode 100644 index cefcc33f3..000000000 --- a/org.argeo.security.dao.os/.project +++ /dev/null @@ -1,22 +0,0 @@ - - - org.argeo.security.dao.os - - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - - diff --git a/org.argeo.security.dao.os/META-INF/spring/security-os-osgi.xml b/org.argeo.security.dao.os/META-INF/spring/security-os-osgi.xml deleted file mode 100644 index 5d827b4a5..000000000 --- a/org.argeo.security.dao.os/META-INF/spring/security-os-osgi.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/org.argeo.security.dao.os/META-INF/spring/security-os.xml b/org.argeo.security.dao.os/META-INF/spring/security-os.xml deleted file mode 100644 index 3d94f502d..000000000 --- a/org.argeo.security.dao.os/META-INF/spring/security-os.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - osgibundle:security.properties - - - - - - - - /org/argeo/jcr/argeo.cnd - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/org.argeo.security.dao.os/bnd.bnd b/org.argeo.security.dao.os/bnd.bnd deleted file mode 100644 index 0df3b4a65..000000000 --- a/org.argeo.security.dao.os/bnd.bnd +++ /dev/null @@ -1 +0,0 @@ -Import-Package: org.argeo.jcr,* \ No newline at end of file diff --git a/org.argeo.security.dao.os/build.properties b/org.argeo.security.dao.os/build.properties deleted file mode 100644 index 5f22cdd44..000000000 --- a/org.argeo.security.dao.os/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = META-INF/ diff --git a/org.argeo.security.dao.os/pom.xml b/org.argeo.security.dao.os/pom.xml deleted file mode 100644 index 8b17c8597..000000000 --- a/org.argeo.security.dao.os/pom.xml +++ /dev/null @@ -1,11 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12 - argeo-commons - .. - - org.argeo.security.dao.os - Commons Security DAO OS - \ No newline at end of file diff --git a/org.argeo.security.dao.os/security.properties b/org.argeo.security.dao.os/security.properties deleted file mode 100644 index ae77bf04d..000000000 --- a/org.argeo.security.dao.os/security.properties +++ /dev/null @@ -1,2 +0,0 @@ -argeo.security.systemKey=argeo -argeo.node.repo.securityWorkspace=security diff --git a/org.argeo.security.equinox/META-INF/spring/osgi.xml b/org.argeo.security.equinox/META-INF/spring/osgi.xml index 8003fb277..17ece3a08 100644 --- a/org.argeo.security.equinox/META-INF/spring/osgi.xml +++ b/org.argeo.security.equinox/META-INF/spring/osgi.xml @@ -9,6 +9,6 @@ osgi:default-timeout="30000"> \ No newline at end of file diff --git a/org.argeo.security.equinox/pom.xml b/org.argeo.security.equinox/pom.xml index 8bb9b4892..98d11e54c 100644 --- a/org.argeo.security.equinox/pom.xml +++ b/org.argeo.security.equinox/pom.xml @@ -42,10 +42,10 @@ - - org.argeo.tp - org.eclipse.osgi - + + + + @@ -55,13 +55,13 @@ - + @@ -76,9 +76,9 @@ - - org.argeo.tp - org.springframework.security.core - + + + + \ No newline at end of file diff --git a/org.argeo.security.equinox/src/org/argeo/security/equinox/OsSpringLoginModule.java b/org.argeo.security.equinox/src/org/argeo/security/equinox/OsSpringLoginModule.java index 1a7ebb4d7..09f86b798 100644 --- a/org.argeo.security.equinox/src/org/argeo/security/equinox/OsSpringLoginModule.java +++ b/org.argeo.security.equinox/src/org/argeo/security/equinox/OsSpringLoginModule.java @@ -22,10 +22,10 @@ import javax.security.auth.callback.CallbackHandler; import javax.security.auth.login.LoginException; import org.argeo.security.OsAuthenticationToken; -import org.springframework.security.Authentication; -import org.springframework.security.AuthenticationManager; -import org.springframework.security.context.SecurityContextHolder; -import org.springframework.security.providers.jaas.SecurityContextLoginModule; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.authentication.jaas.SecurityContextLoginModule; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; /** Login module which caches one subject per thread. */ public class OsSpringLoginModule extends SecurityContextLoginModule { diff --git a/org.argeo.security.equinox/src/org/argeo/security/equinox/SpringLoginModule.java b/org.argeo.security.equinox/src/org/argeo/security/equinox/SpringLoginModule.java index 6fd179ead..f07a203ff 100644 --- a/org.argeo.security.equinox/src/org/argeo/security/equinox/SpringLoginModule.java +++ b/org.argeo.security.equinox/src/org/argeo/security/equinox/SpringLoginModule.java @@ -15,6 +15,8 @@ */ package org.argeo.security.equinox; +import java.util.Collections; +import java.util.List; import java.util.Locale; import java.util.Map; import java.util.UUID; @@ -31,14 +33,13 @@ import org.apache.commons.logging.LogFactory; import org.argeo.security.NodeAuthenticationToken; import org.argeo.util.LocaleCallback; import org.argeo.util.LocaleUtils; -import org.springframework.security.Authentication; -import org.springframework.security.AuthenticationManager; -import org.springframework.security.BadCredentialsException; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.GrantedAuthorityImpl; -import org.springframework.security.context.SecurityContextHolder; -import org.springframework.security.providers.anonymous.AnonymousAuthenticationToken; -import org.springframework.security.providers.jaas.SecurityContextLoginModule; +import org.springframework.security.authentication.AnonymousAuthenticationToken; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.security.authentication.jaas.SecurityContextLoginModule; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.context.SecurityContextHolder; /** Login module which caches one subject per thread. */ public class SpringLoginModule extends SecurityContextLoginModule { @@ -109,8 +110,8 @@ public class SpringLoginModule extends SecurityContextLoginModule { // TODO integrate with JCR? Object principal = UUID.randomUUID().toString(); - GrantedAuthority[] authorities = { new GrantedAuthorityImpl( - anonymousRole) }; + List authorities = Collections + .singletonList(new SimpleGrantedAuthority(anonymousRole)); AnonymousAuthenticationToken anonymousToken = new AnonymousAuthenticationToken( key, principal, authorities); Authentication auth = authenticationManager diff --git a/org.argeo.security.jackrabbit/bnd.bnd b/org.argeo.security.jackrabbit/bnd.bnd index 6cd12f83d..b8cdc7217 100644 --- a/org.argeo.security.jackrabbit/bnd.bnd +++ b/org.argeo.security.jackrabbit/bnd.bnd @@ -1,4 +1,4 @@ -Fragment-Host: org.apache.jackrabbit +Fragment-Host: org.apache.jackrabbit.core Import-Package: org.springframework.core,\ org.argeo.jcr,\ * diff --git a/org.argeo.security.jackrabbit/pom.xml b/org.argeo.security.jackrabbit/pom.xml index 4781e4f26..841845617 100644 --- a/org.argeo.security.jackrabbit/pom.xml +++ b/org.argeo.security.jackrabbit/pom.xml @@ -15,17 +15,17 @@ org.argeo.security.core 2.1.12 - - org.argeo.tp - javax.jcr - - - org.argeo.tp - org.apache.jackrabbit - - - org.argeo.tp - org.springframework.security.core - + + + + + + + + + + + + \ No newline at end of file diff --git a/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/ArgeoLoginModule.java b/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/ArgeoLoginModule.java index 43c544083..a80f26682 100644 --- a/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/ArgeoLoginModule.java +++ b/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/ArgeoLoginModule.java @@ -33,9 +33,9 @@ import org.apache.jackrabbit.core.security.authentication.AbstractLoginModule; import org.apache.jackrabbit.core.security.authentication.Authentication; import org.apache.jackrabbit.core.security.principal.AdminPrincipal; import org.argeo.security.SystemAuthentication; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.context.SecurityContextHolder; -import org.springframework.security.providers.anonymous.AnonymousAuthenticationToken; +import org.springframework.security.authentication.AnonymousAuthenticationToken; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.context.SecurityContextHolder; /** Jackrabbit login mechanism based on Spring Security */ public class ArgeoLoginModule extends AbstractLoginModule { @@ -46,7 +46,7 @@ public class ArgeoLoginModule extends AbstractLoginModule { public boolean login() throws LoginException { boolean loginOk = super.login(); if (!loginOk) { - org.springframework.security.Authentication authen = (org.springframework.security.Authentication) SecurityContextHolder + org.springframework.security.core.Authentication authen = (org.springframework.security.core.Authentication) SecurityContextHolder .getContext().getAuthentication(); } return loginOk; @@ -57,7 +57,7 @@ public class ArgeoLoginModule extends AbstractLoginModule { public boolean commit() throws LoginException { boolean commitOk = super.commit(); if (!commitOk) { - org.springframework.security.Authentication authen = (org.springframework.security.Authentication) SecurityContextHolder + org.springframework.security.core.Authentication authen = (org.springframework.security.core.Authentication) SecurityContextHolder .getContext().getAuthentication(); } return commitOk; @@ -69,7 +69,7 @@ public class ArgeoLoginModule extends AbstractLoginModule { */ @Override protected Principal getPrincipal(Credentials credentials) { - org.springframework.security.Authentication authen = SecurityContextHolder + org.springframework.security.core.Authentication authen = SecurityContextHolder .getContext().getAuthentication(); return authen; } @@ -86,7 +86,7 @@ public class ArgeoLoginModule extends AbstractLoginModule { protected Set syncPrincipals() { // use linked HashSet instead of HashSet in order to maintain the order // of principals (as in the Subject). - org.springframework.security.Authentication authen = (org.springframework.security.Authentication) principal; + org.springframework.security.core.Authentication authen = (org.springframework.security.core.Authentication) principal; Set principals = new LinkedHashSet(); principals.add(authen); @@ -164,12 +164,12 @@ public class ArgeoLoginModule extends AbstractLoginModule { } return new Authentication() { public boolean canHandle(Credentials credentials) { - return principal instanceof org.springframework.security.Authentication; + return principal instanceof org.springframework.security.core.Authentication; } public boolean authenticate(Credentials credentials) throws RepositoryException { - return ((org.springframework.security.Authentication) principal) + return ((org.springframework.security.core.Authentication) principal) .isAuthenticated(); } }; diff --git a/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/ArgeoSecurityManager.java b/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/ArgeoSecurityManager.java index 3450c75d8..e785d887e 100644 --- a/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/ArgeoSecurityManager.java +++ b/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/ArgeoSecurityManager.java @@ -17,6 +17,7 @@ package org.argeo.security.jackrabbit; import java.security.Principal; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; @@ -39,9 +40,9 @@ import org.apache.jackrabbit.core.security.AccessManager; import org.apache.jackrabbit.core.security.AnonymousPrincipal; import org.apache.jackrabbit.core.security.SecurityConstants; import org.apache.jackrabbit.core.security.authorization.WorkspaceAccessManager; -import org.springframework.security.Authentication; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.context.SecurityContextHolder; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.context.SecurityContextHolder; /** Integrates Spring Security and Jackrabbit Security users and roles. */ public class ArgeoSecurityManager extends DefaultSecurityManager { @@ -119,7 +120,8 @@ public class ArgeoSecurityManager extends DefaultSecurityManager { log.warn("User ID is '" + userId + "' but authen is " + authen.getName()); StringBuffer roles = new StringBuffer(""); - GrantedAuthority[] authorities = authen.getAuthorities(); + Collection authorities = authen + .getAuthorities(); for (GrantedAuthority ga : authorities) { roles.append(ga.toString()); } diff --git a/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/GrantedAuthorityPrincipal.java b/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/GrantedAuthorityPrincipal.java index 482214e50..1263e68d8 100644 --- a/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/GrantedAuthorityPrincipal.java +++ b/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/GrantedAuthorityPrincipal.java @@ -17,7 +17,7 @@ package org.argeo.security.jackrabbit; import java.security.Principal; -import org.springframework.security.GrantedAuthority; +import org.springframework.security.core.GrantedAuthority; /** Wraps a {@link GrantedAuthority} as a principal. */ class GrantedAuthorityPrincipal implements Principal { diff --git a/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/JackrabbitUserAdminService.java b/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/JackrabbitUserAdminService.java index 935581d7a..97cb538b4 100644 --- a/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/JackrabbitUserAdminService.java +++ b/org.argeo.security.jackrabbit/src/org/argeo/security/jackrabbit/JackrabbitUserAdminService.java @@ -25,16 +25,16 @@ import org.argeo.security.UserAdminService; import org.argeo.security.jcr.JcrSecurityModel; import org.argeo.security.jcr.JcrUserDetails; import org.springframework.dao.DataAccessException; -import org.springframework.security.Authentication; -import org.springframework.security.AuthenticationException; -import org.springframework.security.BadCredentialsException; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.GrantedAuthorityImpl; -import org.springframework.security.context.SecurityContextHolder; -import org.springframework.security.providers.AuthenticationProvider; -import org.springframework.security.providers.UsernamePasswordAuthenticationToken; -import org.springframework.security.userdetails.UserDetails; -import org.springframework.security.userdetails.UsernameNotFoundException; +import org.springframework.security.authentication.AuthenticationProvider; +import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UsernameNotFoundException; /** * An implementation of {@link UserAdminService} which closely wraps Jackrabbits @@ -279,20 +279,19 @@ public class JackrabbitUserAdminService implements UserAdminService, User user = (User) getUserManager().getAuthorizable(username); ArrayList authorities = new ArrayList(); // FIXME make it more generic - authorities.add(new GrantedAuthorityImpl("ROLE_USER")); + authorities.add(new SimpleGrantedAuthority("ROLE_USER")); Iterator groups = user.declaredMemberOf(); while (groups.hasNext()) { Group group = groups.next(); // String role = "ROLE_" // + group.getPrincipal().getName().toUpperCase(); String role = group.getPrincipal().getName(); - authorities.add(new GrantedAuthorityImpl(role)); + authorities.add(new SimpleGrantedAuthority(role)); } Node userProfile = UserJcrUtils.getUserProfile(session, username); JcrUserDetails userDetails = new JcrUserDetails(userProfile, - credentials.toString(), - authorities.toArray(new GrantedAuthority[authorities.size()])); + credentials.toString(), authorities); return userDetails; } diff --git a/org.argeo.security.ldap/pom.xml b/org.argeo.security.ldap/pom.xml index 3b42ace5f..2802317e8 100644 --- a/org.argeo.security.ldap/pom.xml +++ b/org.argeo.security.ldap/pom.xml @@ -55,22 +55,22 @@ - - org.argeo.tp - javax.jcr - + + + + - - org.argeo.tp - org.springframework.ldap - + + + + - - org.argeo.tp - slf4j.org.apache.commons.logging - + + + + \ No newline at end of file diff --git a/org.argeo.security.ldap/src/org/argeo/security/ldap/ArgeoLdapShaPasswordEncoder.java b/org.argeo.security.ldap/src/org/argeo/security/ldap/ArgeoLdapShaPasswordEncoder.java index ea22ef350..a2c43a589 100644 --- a/org.argeo.security.ldap/src/org/argeo/security/ldap/ArgeoLdapShaPasswordEncoder.java +++ b/org.argeo.security.ldap/src/org/argeo/security/ldap/ArgeoLdapShaPasswordEncoder.java @@ -15,7 +15,7 @@ */ package org.argeo.security.ldap; -import org.springframework.security.providers.ldap.authenticator.LdapShaPasswordEncoder; +import org.springframework.security.authentication.encoding.LdapShaPasswordEncoder; /** * {@link LdapShaPasswordEncoder} allowing to configure the usage of salt (APache diff --git a/org.argeo.security.ldap/src/org/argeo/security/ldap/ArgeoLdapUserDetailsManager.java b/org.argeo.security.ldap/src/org/argeo/security/ldap/ArgeoLdapUserDetailsManager.java index 0c7368f1f..89b5aa92d 100644 --- a/org.argeo.security.ldap/src/org/argeo/security/ldap/ArgeoLdapUserDetailsManager.java +++ b/org.argeo.security.ldap/src/org/argeo/security/ldap/ArgeoLdapUserDetailsManager.java @@ -28,12 +28,12 @@ import java.util.TreeSet; import org.argeo.ArgeoException; import org.argeo.security.UserAdminService; import org.springframework.ldap.core.ContextSource; -import org.springframework.security.Authentication; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.context.SecurityContextHolder; -import org.springframework.security.providers.encoding.PasswordEncoder; -import org.springframework.security.userdetails.UserDetails; -import org.springframework.security.userdetails.ldap.LdapUserDetailsManager; +import org.springframework.security.authentication.encoding.PasswordEncoder; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.ldap.userdetails.LdapUserDetailsManager; /** Extends {@link LdapUserDetailsManager} by adding password encoding support. */ public class ArgeoLdapUserDetailsManager extends LdapUserDetailsManager diff --git a/org.argeo.security.ldap/src/org/argeo/security/ldap/jcr/JcrLdapSynchronizer.java b/org.argeo.security.ldap/src/org/argeo/security/ldap/jcr/JcrLdapSynchronizer.java index 3e9e2cbfa..e0519c37c 100644 --- a/org.argeo.security.ldap/src/org/argeo/security/ldap/jcr/JcrLdapSynchronizer.java +++ b/org.argeo.security.ldap/src/org/argeo/security/ldap/jcr/JcrLdapSynchronizer.java @@ -17,13 +17,14 @@ package org.argeo.security.ldap.jcr; import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; +import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; import java.util.SortedSet; -import java.util.UUID; import javax.jcr.Node; import javax.jcr.NodeIterator; @@ -52,11 +53,11 @@ import org.springframework.ldap.core.DirContextAdapter; import org.springframework.ldap.core.DirContextOperations; import org.springframework.ldap.core.DistinguishedName; import org.springframework.ldap.core.LdapTemplate; -import org.springframework.security.GrantedAuthority; +import org.springframework.security.authentication.encoding.PasswordEncoder; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.ldap.LdapUsernameToDnMapper; -import org.springframework.security.providers.encoding.PasswordEncoder; -import org.springframework.security.userdetails.UserDetails; -import org.springframework.security.userdetails.ldap.UserDetailsContextMapper; +import org.springframework.security.ldap.userdetails.UserDetailsContextMapper; /** Makes sure that LDAP and JCR are in line. */ public class JcrLdapSynchronizer implements UserDetailsContextMapper, @@ -210,7 +211,7 @@ public class JcrLdapSynchronizer implements UserDetailsContextMapper, .getProperty(ARGEO_USER_ID).getString(); // GrantedAuthority[] authorities = {new // GrantedAuthorityImpl(defaultUserRole)}; - GrantedAuthority[] authorities = {}; + List authorities = new ArrayList(); JcrUserDetails userDetails = new JcrUserDetails( userProfile, username, authorities); String dn = createLdapUser(userDetails); @@ -260,7 +261,8 @@ public class JcrLdapSynchronizer implements UserDetailsContextMapper, /** Called during authentication in order to retrieve user details */ public UserDetails mapUserFromContext(final DirContextOperations ctx, - final String username, GrantedAuthority[] authorities) { + final String username, + Collection authorities) { if (ctx == null) throw new ArgeoException("No LDAP information for user " + username); @@ -278,7 +280,8 @@ public class JcrLdapSynchronizer implements UserDetailsContextMapper, .getAttributeSortedStringSet(passwordAttribute); String password; if (passwordAttributes == null || passwordAttributes.size() == 0) { - //throw new ArgeoException("No password found for user " + username); + // throw new ArgeoException("No password found for user " + + // username); password = "NULL"; } else { byte[] arr = (byte[]) passwordAttributes.first(); diff --git a/org.argeo.security.ldap/src/org/argeo/security/ldap/jcr/JcrUserDetailsContextMapper.java b/org.argeo.security.ldap/src/org/argeo/security/ldap/jcr/JcrUserDetailsContextMapper.java index 87973d9bd..f63250c31 100644 --- a/org.argeo.security.ldap/src/org/argeo/security/ldap/jcr/JcrUserDetailsContextMapper.java +++ b/org.argeo.security.ldap/src/org/argeo/security/ldap/jcr/JcrUserDetailsContextMapper.java @@ -15,6 +15,7 @@ */ package org.argeo.security.ldap.jcr; +import java.util.Collection; import java.util.UUID; import javax.jcr.Node; @@ -29,9 +30,9 @@ import org.argeo.jcr.UserJcrUtils; import org.argeo.security.jcr.JcrUserDetails; import org.springframework.ldap.core.DirContextAdapter; import org.springframework.ldap.core.DirContextOperations; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.userdetails.UserDetails; -import org.springframework.security.userdetails.ldap.UserDetailsContextMapper; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.ldap.userdetails.UserDetailsContextMapper; /** @deprecated Read only mapping from LDAP to user details */ @Deprecated @@ -58,7 +59,8 @@ public class JcrUserDetailsContextMapper implements UserDetailsContextMapper, /** Called during authentication in order to retrieve user details */ public UserDetails mapUserFromContext(final DirContextOperations ctx, - final String username, GrantedAuthority[] authorities) { + final String username, + Collection authorities) { if (ctx == null) throw new ArgeoException("No LDAP information for user " + username); Node userHome = UserJcrUtils.getUserHome(securitySession, username); diff --git a/org.argeo.security.mvc/.classpath b/org.argeo.security.mvc/.classpath deleted file mode 100644 index d2953a684..000000000 --- a/org.argeo.security.mvc/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/org.argeo.security.mvc/.project b/org.argeo.security.mvc/.project deleted file mode 100644 index b287d0835..000000000 --- a/org.argeo.security.mvc/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.argeo.security.mvc - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - - diff --git a/org.argeo.security.mvc/.settings/org.eclipse.jdt.core.prefs b/org.argeo.security.mvc/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index d2110d0b1..000000000 --- a/org.argeo.security.mvc/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -#Tue Sep 15 11:35:07 CEST 2009 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/org.argeo.security.mvc/.settings/org.maven.ide.eclipse.prefs b/org.argeo.security.mvc/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 2169c4308..000000000 --- a/org.argeo.security.mvc/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Tue Sep 15 11:35:01 CEST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/org.argeo.security.mvc/bnd.bnd b/org.argeo.security.mvc/bnd.bnd deleted file mode 100644 index 630bdd797..000000000 --- a/org.argeo.security.mvc/bnd.bnd +++ /dev/null @@ -1 +0,0 @@ -Import-Package: javax.servlet,* diff --git a/org.argeo.security.mvc/build.properties b/org.argeo.security.mvc/build.properties deleted file mode 100644 index 1414da572..000000000 --- a/org.argeo.security.mvc/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -additional.bundles = org.springframework.beans -source.. = src/ diff --git a/org.argeo.security.mvc/pom.xml b/org.argeo.security.mvc/pom.xml deleted file mode 100644 index 9bea5fa9d..000000000 --- a/org.argeo.security.mvc/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - 4.0.0 - - org.argeo.commons - argeo-commons - 2.1.12 - .. - - org.argeo.security.mvc - Commons Security MVC - - - - org.argeo.commons - org.argeo.server.core - 2.1.12 - - - - - org.argeo.commons - org.argeo.security.core - 2.1.12 - - - - - org.argeo.tp - org.springframework.web.servlet - - - org.argeo.tp - org.springframework.aop - - - - - org.argeo.tp - javax.servlet - - - - \ No newline at end of file diff --git a/org.argeo.security.mvc/src/org/argeo/security/mvc/ArgeoRememberMeServices.java b/org.argeo.security.mvc/src/org/argeo/security/mvc/ArgeoRememberMeServices.java deleted file mode 100644 index fde9f3034..000000000 --- a/org.argeo.security.mvc/src/org/argeo/security/mvc/ArgeoRememberMeServices.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2007-2012 Mathieu Baudier - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.mvc; - -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.security.ui.rememberme.TokenBasedRememberMeServices; - -public class ArgeoRememberMeServices extends TokenBasedRememberMeServices { - public final static String DEFAULT_COOKIE_NAME = "ARGEO_SECURITY"; - - public ArgeoRememberMeServices() { - setCookieName(DEFAULT_COOKIE_NAME); - } - - /** - * Sets a "cancel cookie" (with maxAge = 0) on the response to disable - * persistent logins. - * - * @param request - * @param response - */ - protected void cancelCookie(HttpServletRequest request, - HttpServletResponse response) { - Cookie cookie = new Cookie(getCookieName(), null); - cookie.setMaxAge(0); - cookie.setPath("/"); - - response.addCookie(cookie); - } - - /** - * Sets the cookie on the response - * - * @param tokens - * the tokens which will be encoded to make the cookie value. - * @param maxAge - * the value passed to {@link Cookie#setMaxAge(int)} - * @param request - * the request - * @param response - * the response to add the cookie to. - */ - protected void setCookie(String[] tokens, int maxAge, - HttpServletRequest request, HttpServletResponse response) { - String cookieValue = encodeCookie(tokens); - Cookie cookie = new Cookie(getCookieName(), cookieValue); - cookie.setMaxAge(maxAge); - cookie.setPath("/"); - response.addCookie(cookie); - } - -} diff --git a/org.argeo.security.mvc/src/org/argeo/security/mvc/ArgeoUserInterceptor.java b/org.argeo.security.mvc/src/org/argeo/security/mvc/ArgeoUserInterceptor.java deleted file mode 100644 index fd83e9f73..000000000 --- a/org.argeo.security.mvc/src/org/argeo/security/mvc/ArgeoUserInterceptor.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2007-2012 Mathieu Baudier - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.mvc; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.argeo.security.UserAdminService; -import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; - -/** Add the current argeo user as an attribute to the request. */ -public class ArgeoUserInterceptor extends HandlerInterceptorAdapter { - private UserAdminService securityService; - - @Override - public boolean preHandle(HttpServletRequest request, - HttpServletResponse response, Object handler) throws Exception { - //request.setAttribute("argeoUser", securityService.getCurrentUser()); - return super.preHandle(request, response, handler); - } - - public void setSecurityService(UserAdminService securityService) { - this.securityService = securityService; - } - -} diff --git a/org.argeo.security.mvc/src/org/argeo/security/mvc/UsersRolesController.java b/org.argeo.security.mvc/src/org/argeo/security/mvc/UsersRolesController.java deleted file mode 100644 index 185d376a6..000000000 --- a/org.argeo.security.mvc/src/org/argeo/security/mvc/UsersRolesController.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (C) 2007-2012 Mathieu Baudier - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.mvc; - -import org.argeo.server.mvc.MvcConstants; -import org.springframework.stereotype.Controller; - -@Controller -public class UsersRolesController implements MvcConstants { -// private ArgeoSecurityService securityService; -// private Deserializer userDeserializer = null; - - /* USER */ - -// @RequestMapping("/getCredentials.*") -// @ModelAttribute("user") -// public ArgeoUser getCredentials() { -// ArgeoUser argeoUser = securityService.getCurrentUser(); -// if (argeoUser == null) -// return new SimpleArgeoUser(); -// else -// return argeoUser; -// } -// -// @RequestMapping("/getUsersList.*") -// @ModelAttribute("users") -// public Set getUsersList() { -// return securityService.listUsers(); -// } -// -// @RequestMapping("/userExists.*") -// public BooleanAnswer userExists(@RequestParam("username") String username) { -// return new BooleanAnswer(securityService.userExists(username)); -// } -// -// @RequestMapping("/createUser.*") -// @ModelAttribute("user") -// public ArgeoUser createUser(Reader reader) { -// ArgeoUser user = userDeserializer.deserialize(reader, -// SimpleArgeoUser.class); -// securityService.newUser(user); -// return securityService.getUser(user.getUsername()); -// } -// -// @RequestMapping("/updateUser.*") -// @ModelAttribute("user") -// public ArgeoUser updateUser(Reader reader) { -// ArgeoUser user = userDeserializer.deserialize(reader, -// SimpleArgeoUser.class); -// securityService.updateUser(user); -// return securityService.getUser(user.getUsername()); -// } -// -// @RequestMapping("/updateUserSelf.*") -// @ModelAttribute("user") -// /** Will only update the user natures.*/ -// public ArgeoUser updateUserSelf(Reader reader) { -// ArgeoUser user = securityService.getCurrentUser(); -// ArgeoUser userForNatures = userDeserializer.deserialize(reader, -// SimpleArgeoUser.class); -// user.updateUserNatures(userForNatures.getUserNatures()); -// securityService.updateUser(user); -// return securityService.getUser(user.getUsername()); -// } -// -// @RequestMapping("/deleteUser.*") -// public ServerAnswer deleteUser(@RequestParam("username") String username) { -// securityService.deleteUser(username); -// return ServerAnswer.ok("User " + username + " deleted"); -// } -// -// @RequestMapping("/getUserDetails.*") -// @ModelAttribute("user") -// public ArgeoUser getUserDetails(@RequestParam("username") String username) { -// return securityService.getUser(username); -// } - - /* ROLE */ -// @RequestMapping("/getRolesList.*") -// @ModelAttribute("roles") -// public Set getEditableRolesList() { -// return securityService.listEditableRoles(); -// } -// -// @RequestMapping("/createRole.*") -// public ServerAnswer createRole(@RequestParam("role") String role) { -// securityService.newRole(role); -// return ServerAnswer.ok("Role " + role + " created"); -// } -// -// @RequestMapping("/deleteRole.*") -// public ServerAnswer deleteRole(@RequestParam("role") String role) { -// securityService.deleteRole(role); -// return ServerAnswer.ok("Role " + role + " deleted"); -// } -// -// @RequestMapping("/updateUserPassword.*") -// public ServerAnswer updateUserPassword( -// @RequestParam("username") String username, -// @RequestParam("password") String password) { -// securityService.updateUserPassword(username, password); -// return ServerAnswer.ok("Password updated for user " + username); -// } -// -// @RequestMapping("/updatePassword.*") -// public ServerAnswer updatePassword( -// @RequestParam("oldPassword") String oldPassword, -// @RequestParam("password") String password) { -// securityService.updateCurrentUserPassword(oldPassword, password); -// return ServerAnswer.ok("Password updated"); -// } -// -// public void setUserDeserializer(Deserializer userDeserializer) { -// this.userDeserializer = userDeserializer; -// } -// -// public void setSecurityService(ArgeoSecurityService securityService) { -// this.securityService = securityService; -// } - -} diff --git a/org.argeo.security.ui.admin/pom.xml b/org.argeo.security.ui.admin/pom.xml index 4612a9e44..c4eeaf35d 100644 --- a/org.argeo.security.ui.admin/pom.xml +++ b/org.argeo.security.ui.admin/pom.xml @@ -30,13 +30,13 @@ 2.1.12 provided - + org.argeo.commons org.argeo.eclipse.ui @@ -51,16 +51,16 @@ - - org.argeo.tp - org.springframework.security.core - + + + + - - org.argeo.tp - slf4j.org.apache.commons.logging - - + + + + + \ 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 990c4ac82..d82292988 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 @@ -15,6 +15,8 @@ */ package org.argeo.security.ui.admin.editors; +import java.util.ArrayList; + import javax.jcr.Node; import javax.jcr.Repository; import javax.jcr.RepositoryException; @@ -33,10 +35,12 @@ import org.eclipse.ui.IEditorSite; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.PartInitException; import org.eclipse.ui.forms.editor.FormEditor; -import org.springframework.security.GrantedAuthority; +import org.springframework.security.core.GrantedAuthority; /** Editor for an Argeo user. */ public class ArgeoUserEditor extends FormEditor { + private static final long serialVersionUID = 1933296330339252869L; + public final static String ID = SecurityAdminPlugin.PLUGIN_ID + ".adminArgeoUserEditor"; @@ -64,10 +68,9 @@ public class ArgeoUserEditor extends FormEditor { + username, e); } } else { - GrantedAuthority[] authorities = {}; try { userDetails = new JcrUserDetails(session, username, null, - authorities); + new ArrayList()); } catch (RepositoryException e) { throw new ArgeoException("Cannot retrieve disabled JCR profile"); } diff --git a/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/editors/UserRolesPage.java b/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/editors/UserRolesPage.java index 08cd457ad..ee7262a95 100644 --- a/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/editors/UserRolesPage.java +++ b/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/editors/UserRolesPage.java @@ -42,8 +42,8 @@ import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.editor.FormEditor; import org.eclipse.ui.forms.editor.FormPage; import org.eclipse.ui.forms.widgets.ScrolledForm; -import org.springframework.security.GrantedAuthority; -import org.springframework.security.userdetails.UserDetails; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; /** * Display/edit the roles of a user. diff --git a/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/wizards/MainUserInfoWizardPage.java b/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/wizards/MainUserInfoWizardPage.java index 1bd8e8f1c..af1f3d93b 100644 --- a/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/wizards/MainUserInfoWizardPage.java +++ b/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/wizards/MainUserInfoWizardPage.java @@ -30,8 +30,8 @@ import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Text; -import org.springframework.security.userdetails.UserDetails; -import org.springframework.security.userdetails.UsernameNotFoundException; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UsernameNotFoundException; public class MainUserInfoWizardPage extends WizardPage implements ModifyListener, ArgeoNames { diff --git a/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/wizards/NewUserWizard.java b/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/wizards/NewUserWizard.java index df16aeab4..83f4c4851 100644 --- a/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/wizards/NewUserWizard.java +++ b/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/wizards/NewUserWizard.java @@ -15,6 +15,8 @@ */ package org.argeo.security.ui.admin.wizards; +import java.util.ArrayList; + import javax.jcr.Node; import javax.jcr.RepositoryException; import javax.jcr.Session; @@ -28,7 +30,7 @@ import org.argeo.security.UserAdminService; import org.argeo.security.jcr.JcrSecurityModel; import org.argeo.security.jcr.JcrUserDetails; import org.eclipse.jface.wizard.Wizard; -import org.springframework.security.GrantedAuthority; +import org.springframework.security.core.GrantedAuthority; /** Wizard to create a new user */ public class NewUserWizard extends Wizard { @@ -69,7 +71,7 @@ public class NewUserWizard extends Wizard { String password = mainUserInfo.getPassword(); // TODO add roles JcrUserDetails jcrUserDetails = new JcrUserDetails(userProfile, - password, new GrantedAuthority[0]); + password, new ArrayList()); session.save(); session.getWorkspace().getVersionManager() .checkin(userProfile.getPath()); diff --git a/org.argeo.security.ui.rap/META-INF/spring/osgi.xml b/org.argeo.security.ui.rap/META-INF/spring/osgi.xml index 9e357a36d..916c2c692 100644 --- a/org.argeo.security.ui.rap/META-INF/spring/osgi.xml +++ b/org.argeo.security.ui.rap/META-INF/spring/osgi.xml @@ -9,6 +9,6 @@ osgi:default-timeout="30000"> \ No newline at end of file diff --git a/org.argeo.security.ui.rap/pom.xml b/org.argeo.security.ui.rap/pom.xml index 239193a34..b495a97ac 100644 --- a/org.argeo.security.ui.rap/pom.xml +++ b/org.argeo.security.ui.rap/pom.xml @@ -53,10 +53,10 @@ - - org.argeo.tp - slf4j.org.apache.commons.logging - + + + + @@ -71,12 +71,12 @@ - + org.argeo.commons org.argeo.eclipse.ui.rap diff --git a/org.argeo.security.ui.rap/src/org/argeo/security/ui/rap/LogoutEntryPoint.java b/org.argeo.security.ui.rap/src/org/argeo/security/ui/rap/LogoutEntryPoint.java index 733754901..7a9e6f3a5 100644 --- a/org.argeo.security.ui.rap/src/org/argeo/security/ui/rap/LogoutEntryPoint.java +++ b/org.argeo.security.ui.rap/src/org/argeo/security/ui/rap/LogoutEntryPoint.java @@ -23,7 +23,7 @@ import org.eclipse.equinox.security.auth.ILoginContext; import org.eclipse.rap.rwt.RWT; import org.eclipse.rap.rwt.application.IEntryPoint; import org.eclipse.ui.PlatformUI; -import org.springframework.security.context.SecurityContextHolder; +import org.springframework.security.core.context.SecurityContextHolder; /** * RAP entry point which logs out the currently authenticated user diff --git a/org.argeo.security.ui.rap/src/org/argeo/security/ui/rap/RapWindowAdvisor.java b/org.argeo.security.ui.rap/src/org/argeo/security/ui/rap/RapWindowAdvisor.java index 480815279..eb1dd80ee 100644 --- a/org.argeo.security.ui.rap/src/org/argeo/security/ui/rap/RapWindowAdvisor.java +++ b/org.argeo.security.ui.rap/src/org/argeo/security/ui/rap/RapWindowAdvisor.java @@ -29,7 +29,6 @@ import org.eclipse.ui.application.ActionBarAdvisor; import org.eclipse.ui.application.IActionBarConfigurer; import org.eclipse.ui.application.IWorkbenchWindowConfigurer; import org.eclipse.ui.application.WorkbenchWindowAdvisor; -import org.eclipse.ui.internal.UIPlugin; /** Eclipse RAP specific window advisor */ public class RapWindowAdvisor extends WorkbenchWindowAdvisor { @@ -60,14 +59,15 @@ public class RapWindowAdvisor extends WorkbenchWindowAdvisor { configurer.setShellStyle(SWT.NO_TRIM); Rectangle bounds = Display.getCurrent().getBounds(); configurer.setInitialSize(new Point(bounds.width, bounds.height)); - - // Handle window resize in Rap 2.1+ see https://bugs.eclipse.org/bugs/show_bug.cgi?id=417254 + + // Handle window resize in Rap 2.1+ see + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=417254 Display.getCurrent().addListener(SWT.Resize, new Listener() { @Override public void handleEvent(Event event) { Rectangle bounds = event.display.getBounds(); - IWorkbenchWindow iww = UIPlugin.getDefault().getWorkbench() - .getActiveWorkbenchWindow(); + IWorkbenchWindow iww = getWindowConfigurer().getWindow() + .getWorkbench().getActiveWorkbenchWindow(); iww.getShell().setBounds(bounds); } }); diff --git a/org.argeo.security.ui.rap/src/org/argeo/security/ui/rap/SecureEntryPoint.java b/org.argeo.security.ui.rap/src/org/argeo/security/ui/rap/SecureEntryPoint.java index a635de186..c3754ed05 100644 --- a/org.argeo.security.ui.rap/src/org/argeo/security/ui/rap/SecureEntryPoint.java +++ b/org.argeo.security.ui.rap/src/org/argeo/security/ui/rap/SecureEntryPoint.java @@ -33,9 +33,9 @@ import org.eclipse.rap.rwt.RWT; import org.eclipse.rap.rwt.application.IEntryPoint; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.PlatformUI; -import org.springframework.security.BadCredentialsException; -import org.springframework.security.context.SecurityContext; -import org.springframework.security.context.SecurityContextHolder; +import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.security.core.context.SecurityContext; +import org.springframework.security.core.context.SecurityContextHolder; /** * RAP entry point with login capabilities. Once the user has been diff --git a/org.argeo.security.ui.rcp/.classpath b/org.argeo.security.ui.rcp/.classpath deleted file mode 100644 index d2953a684..000000000 --- a/org.argeo.security.ui.rcp/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/org.argeo.security.ui.rcp/.project b/org.argeo.security.ui.rcp/.project deleted file mode 100644 index feeafcf5b..000000000 --- a/org.argeo.security.ui.rcp/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.argeo.security.ui.rcp - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.argeo.security.ui.rcp/.settings/org.eclipse.jdt.core.prefs b/org.argeo.security.ui.rcp/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 1f382cb9d..000000000 --- a/org.argeo.security.ui.rcp/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Sat Jan 15 17:51:30 CET 2011 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/org.argeo.security.ui.rcp/META-INF/jaas_default.txt b/org.argeo.security.ui.rcp/META-INF/jaas_default.txt deleted file mode 100644 index 16d476daf..000000000 --- a/org.argeo.security.ui.rcp/META-INF/jaas_default.txt +++ /dev/null @@ -1,27 +0,0 @@ -OS_SPRING { - org.eclipse.equinox.security.auth.module.ExtensionLoginModule required - extensionId="org.argeo.security.equinox.osSpringLoginModule"; -}; - -NIX { - org.eclipse.equinox.security.auth.module.ExtensionLoginModule requisite - extensionId="org.argeo.security.equinox.unixLoginModule"; - org.eclipse.equinox.security.auth.module.ExtensionLoginModule required - extensionId="org.argeo.security.equinox.osSpringLoginModule"; -}; - -WINDOWS { - org.eclipse.equinox.security.auth.module.ExtensionLoginModule requisite - extensionId="org.argeo.security.equinox.ntLoginModule"; - org.eclipse.equinox.security.auth.module.ExtensionLoginModule required - extensionId="org.argeo.security.equinox.osSpringLoginModule"; -}; - -REMOTE { - org.eclipse.equinox.security.auth.module.ExtensionLoginModule sufficient - extensionId="org.argeo.security.equinox.springLoginModuleRemote"; -}; - -KEYRING { - org.argeo.security.crypto.KeyringLoginModule required; -}; diff --git a/org.argeo.security.ui.rcp/bnd.bnd b/org.argeo.security.ui.rcp/bnd.bnd deleted file mode 100644 index 342ab79b0..000000000 --- a/org.argeo.security.ui.rcp/bnd.bnd +++ /dev/null @@ -1,6 +0,0 @@ -Bundle-Activator: org.argeo.security.ui.rcp.SecureApplicationActivator -Bundle-ActivationPolicy: lazy -Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime -Import-Package: org.argeo.eclipse.ui.specific,\ -org.argeo.eclipse.spring,\ -* diff --git a/org.argeo.security.ui.rcp/build.properties b/org.argeo.security.ui.rcp/build.properties deleted file mode 100644 index 5ac3de985..000000000 --- a/org.argeo.security.ui.rcp/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/main/java/ -output.. = target/classes/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - log4j.properties diff --git a/org.argeo.security.ui.rcp/icons/alt_about.gif b/org.argeo.security.ui.rcp/icons/alt_about.gif deleted file mode 100644 index 20d9ad2d9..000000000 Binary files a/org.argeo.security.ui.rcp/icons/alt_about.gif and /dev/null differ diff --git a/org.argeo.security.ui.rcp/icons/alt_launcher.icns b/org.argeo.security.ui.rcp/icons/alt_launcher.icns deleted file mode 100644 index b77a6a639..000000000 Binary files a/org.argeo.security.ui.rcp/icons/alt_launcher.icns and /dev/null differ diff --git a/org.argeo.security.ui.rcp/icons/alt_launcher.ico b/org.argeo.security.ui.rcp/icons/alt_launcher.ico deleted file mode 100644 index d548f7109..000000000 Binary files a/org.argeo.security.ui.rcp/icons/alt_launcher.ico and /dev/null differ diff --git a/org.argeo.security.ui.rcp/icons/alt_launcher.xpm b/org.argeo.security.ui.rcp/icons/alt_launcher.xpm deleted file mode 100644 index b0c139e06..000000000 --- a/org.argeo.security.ui.rcp/icons/alt_launcher.xpm +++ /dev/null @@ -1,307 +0,0 @@ -/* XPM */ -static char * icon48_xpm[] = { -"48 48 256 2", -" c #4B4B3B3B9090", -". c #0D0D0E0E5454", -"X c #11110E0E5B5B", -"o c #17170F0F6363", -"O c #1D1D13136969", -"+ c #212114146C6C", -"@ c #252514147171", -"# c #282811116C6C", -"$ c #26260D0D6363", -"% c #22220B0B5E5E", -"& c #1C1C0B0B5A5A", -"* c #1C1C0B0B5252", -"= c #1B1B05055353", -"- c #161606064D4D", -"; c #161605054949", -": c #111104044848", -"> c #131304044545", -", c #131305054242", -"< c #141410105E5E", -"1 c #2C2C15157373", -"2 c #2B2B1B1B7575", -"3 c #343416167272", -"4 c #313113136E6E", -"5 c #222209095757", -"6 c #1B1B06064D4D", -"7 c #15150B0B4242", -"8 c #13130C0C5555", -"9 c #2E2E1B1B7878", -"0 c #33331F1F7C7C", -"q c #343418187878", -"w c #3B3B1C1C7575", -"e c #2E2E10106767", -"r c #1B1B07074747", -"t c #18180B0B4646", -"y c #151513136262", -"u c #1A1A15156464", -"i c #34341F1F7777", -"p c #40401E1E8080", -"a c #42421B1B7A7A", -"s c #3B3B15157474", -"d c #2B2B0B0B5B5B", -"f c #222207075252", -"g c #373727277A7A", -"h c #474724248484", -"j c #393915156E6E", -"k c #373711116A6A", -"l c #343413136363", -"z c #232319196E6E", -"x c #292919197070", -"c c #3C3C2C2C8282", -"v c #444431318585", -"b c #494934348A8A", -"n c #505026268A8A", -"m c #3D3D1B1B6E6E", -"M c #31310E0E5C5C", -"N c #2B2B0D0D5353", -"B c #222207074A4A", -"V c #52523C3C9292", -"C c #58583C3C9494", -"Z c #5D5D44449797", -"A c #5C5C2E2E9292", -"S c #676733339595", -"D c #424228287575", -"F c #29290A0A4F4F", -"G c #6C6C4A4A9E9E", -"H c #72725454A7A7", -"J c #8C8C6D6DB2B2", -"K c #343424246E6E", -"L c #3A3A23236A6A", -"P c #3A3A1C1C6767", -"I c #24240A0A4B4B", -"U c #151518186161", -"Y c #76766F6FA5A5", -"T c #ADAD9191CCCC", -"R c #98988989D3D3", -"E c #45453B3B8686", -"W c #3C3C35357979", -"Q c #363631317575", -"! c #32322D2D6B6B", -"~ c #323229296363", -"^ c #30301F1F6262", -"/ c #323218185E5E", -"( c #272707074B4B", -") c #202028286C6C", -"_ c #1E1E1D1D6868", -"` c #9A9A8282BBBB", -"' c #C8C8B3B3D3D3", -"] c #B3B3AFAFE7E7", -"[ c #84847272C6C6", -"{ c #58585757A3A3", -"} c #3F3F3C3C8A8A", -"| c #3B3B3A3A8484", -" . c #414139397D7D", -".. c #3D3D39397A7A", -"X. c #37372E2E6E6E", -"o. c #2C2C21215A5A", -"O. c #2E2E1B1B5B5B", -"+. c #F5F5EFEFF5F5", -"@. c #656566669A9A", -"#. c #47474B4B8E8E", -"$. c #3C3C44447B7B", -"%. c #444442428080", -"&. c #45453E3E8181", -"*. c #40403C3C8181", -"=. c #3D3D33337474", -"-. c #3B3B30306E6E", -";. c #38382D2D6969", -":. c #303026265D5D", -">. c #2C2C15155A5A", -",. c #1F1F1C1C7070", -"<. c #25251E1E7171", -"1. c #59595C5C9191", -"2. c #4D4D53538989", -"3. c #4C4C49498484", -"4. c #484845458585", -"5. c #494941418585", -"6. c #494940408181", -"7. c #2F2F1C1C5353", -"8. c #2B2B28287676", -"9. c #323231317F7F", -"0. c #545452528B8B", -"q. c #51514E4E8989", -"w. c #4E4E4B4B8C8C", -"e. c #4C4C47478686", -"r. c #46463D3D7E7E", -"t. c #434336367A7A", -"y. c #2B2B13135555", -"u. c #47473D3D8D8D", -"i. c #575757578E8E", -"p. c #48483E3E7F7F", -"a. c #46463A3A7D7D", -"s. c #424235357575", -"d. c #404034347171", -"f. c #BFBFCBCBFAFA", -"g. c #B8B8A8A8DDDD", -"h. c #5E5E60609292", -"j. c #565655558C8C", -"k. c #4B4B44448282", -"l. c #454539397B7B", -"z. c #434338387878", -"x. c #3F3F32326D6D", -"c. c #3D3D30306969", -"v. c #3A3A2E2E6363", -"b. c #36362A2A5C5C", -"n. c #343424245555", -"m. c #30301E1E4D4D", -"M. c #49493C3C8282", -"N. c #5E5E4F4F8C8C", -"B. c #56563B3B8B8B", -"V. c #545407078585", -"C. c #424234347272", -"Z. c #9797A4A4F7F7", -"A. c #444436367676", -"S. c #7D7D7979D5D5", -"D. c #464640408A8A", -"F. c #44444B4B8282", -"G. c #414107077777", -"H. c #71716161C1C1", -"J. c #303039397979", -"K. c #8E8E8E8EE6E6", -"L. c #404033338B8B", -"P. c #4A4A45458C8C", -"I. c #46463A3A8080", -"U. c #363629295454", -"Y. c #303022224848", -"T. c #424237377575", -"R. c #2E2E1D1D6363", -"E. c #79798383EAEA", -"W. c #74747B7BE4E4", -"Q. c #6D6D7676D6D6", -"!. c #6A6A7171CECE", -"~. c #66666969C6C6", -"^. c #62626565BCBC", -"/. c #5F5F6060B5B5", -"(. c #5B5B5B5BACAC", -"). c #535353539898", -"_. c #4F4F4F4FA4A4", -"`. c #54544D4DA4A4", -"'. c #323204046B6B", -"]. c #303035357979", -"[. c #313122224343", -"{. c #5A5A5B5BB7B7", -"}. c #484846468080", -"|. c #454541417575", -" X c #4B4B31318282", -".X c #47473C3C8484", -"XX c #3E3E35356E6E", -"oX c #2F2F26264040", -"OX c #2B2B23233A3A", -"+X c #262619195C5C", -"@X c #252515155A5A", -"#X c #55555151B3B3", -"$X c #3C3C2D2D5D5D", -"%X c #39392F2F5656", -"&X c #37372D2D5050", -"*X c #25251F1F3030", -"=X c #24241D1D4343", -"-X c #202013135656", -";X c #41413B3B6C6C", -":X c #444442429696", -">X c #212100005E5E", -",X c #444436367272", -" > , , , ", -" . . X X < < o o O O + @ 1 2 2 1 1 1 1 1 1 1 1 3 4 # # $ $ $ % % % 5 = = 6 6 - ; ; > > , , 7 ", -" . 8 < < < o O O + @ @ 2 9 9 0 0 q q q q q q q w 3 4 4 e e $ $ $ $ % 5 = = 6 6 6 ; ; > > r t ", -" . X < y u O O + @ 1 2 i 0 0 p p p p p p p a a p a s 3 4 4 e e e e d 5 5 f f 6 6 6 ; ; r r t ", -" X < y u O + + @ 2 9 0 g p p h h h h h h h p h h a a s s j k k j l d d 5 5 f f 6 6 r r r r r ", -" X < y O z x x 9 0 g c v b n n n n n n n n n n n h a a s s j j m l M d d N f f B B B B r r r ", -" < y u + z 2 0 c c b V C Z C C A A A A A S S S n h D w w m m m m k l M d d N f F F F B r r r ", -" < y O z z 9 c b V Z G H H H G S G G J J H V v c g g K K K K L P l l l M M N N N N I B B r r ", -" U u + z x i v C H Y J J J J H J T R H V E W W Q Q Q Q ! ! ! ~ ^ ^ / / M M M M M N ( B B r r ", -" ) _ z x 9 g b Z Y ` ' ' ' T T ] [ { } | .........W W Q Q X.! ~ ~ o.O./ / / / N F ( B B B r ", -" ) ) z x i c V G J ' +.+.+.+.] [ @.#.$.%.%.%.&.*. . .....W =.-.X.;.~ :.o.O.^ >.N F ( B B B B ", -" ) ,.<.2 g v C H J ' +.+.+.+.T Y 1.2.3.4.4.4.5.6.&.&. . ...W =.=.-.;.~ :.o.7.>.N F F ( B I I ", -" ) ,.<.8.9.b C H J T +.+.+.' J @.1.0.q.q.w.e.4.5.6.&.r. . .t.W =.=.-.;.~ :.o.7.y.N F ( ( I I ", -" 8.8.8.9.| u.C G J T +.+.' ` Y @.1.i.0.q.q.e.e.5.6.p.r.a. .t.t.s.d.d.-.;.~ :.7.7.y.F F ( I I ", -" 9.c c c v b A S H ' f.g.` Y @.h.1.i.j.0.q.q.e.k.6.p.r.a.l.t.z.s.s.d.x.c.v.b.n.m.7.N F F F I ", -" <.g M.N.B.B.n V.J f.R J @.h.h.1.i.i.j.j.0.q.3.k.6.p.r.a.l.l.z.s.C.d.x.x.c.v.b.n.m.y.N F F F ", -" + x i v B.Z Z G g.Z.[ @.2.i.i.j.j.j.j.j.0.q.3.k.6.p.p.a.l.l.A.s.C.C.d.x.c.v.b.n.m.7.y.N N y. ", -" O # 3 w p n Z ` f.S.H D.F.q.0.0.0.0.j.0.q.q.3.k.6.p.r.a.a.l.A.s.s.C.d.x.x.c.v.b.n.m.y.y.y.y. ", -" O # 4 s a G.V.T Z.H.V J.%.e.w.q.0.0.0.0.q.q.e.k.6.p.r.a.a.l.z.A.s.C.d.d.x.c.v.b.n.m.7.>.y.y. ", -" O # 4 s w G.A f.K.H L...4.P.w.w.w.q.q.q.q.e.e.5.6.M.I.I.a.a.l.z.A.s.d.d.x.c.v.v.U.Y.7.O.>.y. ", -" $ # 4 3 s G.G f.S.Z 9.*.D.P.P.w.w.w.w.w.e.e.5.5.M.M.I.I.a.a.l.z.T.s.d.d.x.x.c.v.U.Y.m.R.>.>. ", -" E.E.W.W.W.W.E.Z.E.W.Q.Q.Q.Q.Q.Q.Q.Q.Q.Q.!.!.!.!.!.~.~.~.~.~.~.^.^.^.^.^./././.(.{ { )._.`._. ", -" + # 3 w s '.` f.H.V ].*.D.P.P.P.P.P.P.P.5.5.5.M.M.M.I.I.a.l.z.z.T.T.s.d.d.x.c.v.U.Y.[.^ O.>. ", -" ~.~.~.~.~.~.K.Z.S.~.{.^.^.^.^.^.^.^.^././././././.(.(.(.(.(.(.{ { { { { ).).).w.w.}.|.P.u.} ", -" .I.6. X X XT f.H.b ].*.E D.D.D.D.5.5..X.XM.M.I.I.a.a.l.l.z.z.T.T.T.d.XXx.c.v.b.U.oXOXR.+X@X ", -" E.E.E.W.W.W.K.Z.E.W.Q.Q.Q.Q.Q.Q.Q.Q.!.!.!.!.!.!.~.~.~.~.~.~.^.^.^.^.^./././.(.{ { ).).#X_._. ", -" & % $ e '.= H f.H.b 8.W *.E E E .X.X.XI.I.I.I.a.a.l.l.z.z.T.T.T.C.XXXXc.v.$X%X&XY.*X=X2 @X-X ", -" {.{.{.{.{.#X~.Z.W.~.{.{./././././././././.(.(.(.(.(.(.(.{ { { { { { ).).).w.w.3.}.;X%.:X} } ", -" & & % $ e >XV.f.S.C K X.W t. . .l.l.t.t.t.t.A.A.A.,X,X,X,X,XX7X` Z.Z D ! =.=.s.t.t.t.A.A.s.A.,X,X,X,X > > t t t cX ", -" nXbXbXzXzXlXaXXXY +Xf = f = 7XtXR R mXn.Y.[.[.[.[.OX*X*X8X5X*X=X,.u vXvX; > > MXMX, 7 t t ", -" nXnXnXbXzXvX-.Y +XcX6 6 = = = d L B.G H `.X.:.7.m.=X=X=X=X=X6X,.u cXvXNX: BX> MXVXCXVX7 7 7 ", -" ZXZXnXbXAXgX@.+XvX; - - - - * @XR.>.sX>.R.i 0 x eXeXeXeXO hXaXcXvXNX: BXMXMXMXVXCXCXCXVX7 7 ", -" SXZXZXAXgXN.aXNX: : NXNXNX- * +X+X* 6 6 6 * * * * * * * vXvX- NX: DXBXMXMXFXCXCXCXCXGXVXVX7 ", -" SXSXHXgX0.JXKXLXKXKXDX: : NX* @X-X- - - - - - - - - - - NX: DXDXDXMXMXFXFXCXCXCXCXGXGXGXVXVX ", -" SXHXPX3.JXnXnXnXnXbXLXKXKXNXaX-XvX: : NX: : : : : : : BXDXDXLXMXMXFXFXCXCXCXCXGXGXGXGXGXGXGX ", -" IXUX$.AXZXZXZXZXnXnXnXLXLXNXJXvXBXDXBXBXBXBXDXDXDXDXLXDXLXLXFXFXFXFXCXCXCXCXGXGXGXGXGXGXGXGX ", -" "}; diff --git a/org.argeo.security.ui.rcp/icons/alt_window_16.gif b/org.argeo.security.ui.rcp/icons/alt_window_16.gif deleted file mode 100644 index 05626b17d..000000000 Binary files a/org.argeo.security.ui.rcp/icons/alt_window_16.gif and /dev/null differ diff --git a/org.argeo.security.ui.rcp/icons/alt_window_32.gif b/org.argeo.security.ui.rcp/icons/alt_window_32.gif deleted file mode 100644 index b432f8833..000000000 Binary files a/org.argeo.security.ui.rcp/icons/alt_window_32.gif and /dev/null differ diff --git a/org.argeo.security.ui.rcp/plugin.xml b/org.argeo.security.ui.rcp/plugin.xml deleted file mode 100644 index 4ddf700d5..000000000 --- a/org.argeo.security.ui.rcp/plugin.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.argeo.security.ui.rcp/plugin_customization.ini b/org.argeo.security.ui.rcp/plugin_customization.ini deleted file mode 100644 index baf9cefe7..000000000 --- a/org.argeo.security.ui.rcp/plugin_customization.ini +++ /dev/null @@ -1,5 +0,0 @@ -org.eclipse.ui/DOCK_PERSPECTIVE_BAR=topRight -org.eclipse.ui/SHOW_TEXT_ON_PERSPECTIVE_BAR=true -org.eclipse.ui/PERSPECTIVE_BAR_SIZE=100 -org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=true -org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = false diff --git a/org.argeo.security.ui.rcp/pom.xml b/org.argeo.security.ui.rcp/pom.xml deleted file mode 100644 index 08c421508..000000000 --- a/org.argeo.security.ui.rcp/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - 4.0.0 - - org.argeo.commons - 2.1.12 - argeo-commons - .. - - org.argeo.security.ui.rcp - Commons Security UI RCP - jar - - - - org.apache.felix - maven-bundle-plugin - - - ${project.artifactId};singleton:=true - - - - - - - - - org.argeo.commons - org.argeo.util - 2.1.12 - - - - - org.argeo.tp - slf4j.org.apache.commons.logging - - - - - org.argeo.commons - org.argeo.security.ui - 2.1.12 - - - org.argeo.commons - org.argeo.security.equinox - 2.1.12 - - - - - org.argeo.commons - org.argeo.eclipse.ui.rcp - 2.1.12 - - - org.argeo.commons - org.argeo.eclipse.dep.rcp - pom - 2.1.12 - - - \ No newline at end of file diff --git a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/AbstractSecureApplication.java b/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/AbstractSecureApplication.java deleted file mode 100644 index 75184cbab..000000000 --- a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/AbstractSecureApplication.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.ui.rcp; - -import java.security.PrivilegedAction; - -import javax.security.auth.Subject; -import javax.security.auth.login.LoginException; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.argeo.OperatingSystem; -import org.eclipse.equinox.app.IApplication; -import org.eclipse.equinox.app.IApplicationContext; -import org.eclipse.equinox.security.auth.ILoginContext; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.application.WorkbenchAdvisor; - -/** - * RCP workbench initialization - */ -public abstract class AbstractSecureApplication implements IApplication { - final static String NODE_REPO_URI = "argeo.node.repo.uri"; - - private static final Log log = LogFactory - .getLog(AbstractSecureApplication.class); - - protected WorkbenchAdvisor createWorkbenchAdvisor(String username) { - return new SecureWorkbenchAdvisor(username); - } - - public Object start(IApplicationContext context) throws Exception { - // wait for the system to be initialized - // try { - // Thread.sleep(3000); - // } catch (Exception e2) { - // // silent - // } - - boolean remote = System.getProperty(NODE_REPO_URI) != null; - - // choose login context - final ILoginContext loginContext; - if (remote) { - loginContext = SecureApplicationActivator - .createLoginContext(SecureApplicationActivator.CONTEXT_REMOTE); - } else { - if (OperatingSystem.os == OperatingSystem.WINDOWS) - loginContext = SecureApplicationActivator - .createLoginContext(SecureApplicationActivator.CONTEXT_WINDOWS); - else - loginContext = SecureApplicationActivator - .createLoginContext(SecureApplicationActivator.CONTEXT_NIX); - } - - final Display display = PlatformUI.createDisplay(); - - // login - Subject subject = null; - try { - loginContext.login(); - subject = loginContext.getSubject(); - } catch (LoginException e) { - log.error("Error when logging in.", e); - display.dispose(); - try { - Thread.sleep(2000); - } catch (InterruptedException e1) { - // silent - } - return null; - } - - // identify after successful login - if (log.isDebugEnabled()) - log.debug("subject=" + subject); - final String username = subject.getPrincipals().iterator().next() - .getName(); - if (log.isDebugEnabled()) - log.debug(username + " logged in"); -// display.disposeExec(new Runnable() { -// public void run() { -// log.debug("Display disposed"); -// logout(loginContext, username); -// } -// }); - - try { - PrivilegedAction privilegedAction = new PrivilegedAction() { - public Object run() { - int result = PlatformUI.createAndRunWorkbench(display, - createWorkbenchAdvisor(username)); - return new Integer(result); - } - }; - - Integer returnCode = (Integer) Subject.doAs(subject, - privilegedAction); - logout(loginContext, username); - return processReturnCode(returnCode); - } catch (Exception e) { - if (subject != null) - logout(loginContext, username); - log.error("Unexpected error", e); - } finally { - display.dispose(); - } - return null; - } - - protected Integer processReturnCode(Integer returnCode) { - if (returnCode == PlatformUI.RETURN_RESTART) - return IApplication.EXIT_RESTART; - else - return IApplication.EXIT_OK; - } - - static void logout(ILoginContext secureContext, String username) { - try { - secureContext.logout(); - log.info("Logged out " + (username != null ? username : "") - + " (THREAD=" + Thread.currentThread().getId() + ")"); - } catch (LoginException e) { - log.error("Erorr when logging out", e); - } - } - - public void stop() { - final IWorkbench workbench; - try { - workbench = PlatformUI.getWorkbench(); - } catch (Exception e) { - return; - } - if (workbench == null) - return; - final Display display = workbench.getDisplay(); - if (display != null && !display.isDisposed()) - display.syncExec(new Runnable() { - - public void run() { - if (!display.isDisposed()) - workbench.close(); - } - }); - - if (log.isDebugEnabled()) - log.debug("workbench stopped"); - } - -} diff --git a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureActionBarAdvisor.java b/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureActionBarAdvisor.java deleted file mode 100644 index 481865bfa..000000000 --- a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureActionBarAdvisor.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.ui.rcp; - -import org.eclipse.jface.action.GroupMarker; -import org.eclipse.jface.action.ICoolBarManager; -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.action.IToolBarManager; -import org.eclipse.jface.action.MenuManager; -import org.eclipse.jface.action.Separator; -import org.eclipse.jface.action.ToolBarManager; -import org.eclipse.swt.SWT; -import org.eclipse.ui.IWorkbenchActionConstants; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.actions.ActionFactory; -import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction; -import org.eclipse.ui.application.ActionBarAdvisor; -import org.eclipse.ui.application.IActionBarConfigurer; - -public class SecureActionBarAdvisor extends ActionBarAdvisor { - private IWorkbenchAction exitAction; - private IWorkbenchAction openPerspectiveDialogAction; - private IWorkbenchAction showViewMenuAction; - private IWorkbenchAction preferences; - private IWorkbenchAction saveAction; - private IWorkbenchAction saveAsAction; - private IWorkbenchAction saveAllAction; - private IWorkbenchAction closeAllAction; - - // private final Boolean isRcp; - - public SecureActionBarAdvisor(IActionBarConfigurer configurer, Boolean isRcp) { - super(configurer); - // this.isRcp = isRcp; - } - - protected void makeActions(IWorkbenchWindow window) { - preferences = ActionFactory.PREFERENCES.create(window); - register(preferences); - openPerspectiveDialogAction = ActionFactory.OPEN_PERSPECTIVE_DIALOG - .create(window); - register(openPerspectiveDialogAction); - showViewMenuAction = ActionFactory.SHOW_VIEW_MENU.create(window); - register(showViewMenuAction); - - exitAction = ActionFactory.QUIT.create(window); - register(exitAction); - - // Save semantiocs - saveAction = ActionFactory.SAVE.create(window); - register(saveAction); - saveAsAction = ActionFactory.SAVE_AS.create(window); - register(saveAsAction); - saveAllAction = ActionFactory.SAVE_ALL.create(window); - register(saveAllAction); - closeAllAction = ActionFactory.CLOSE_ALL.create(window); - register(closeAllAction); - - } - - protected void fillMenuBar(IMenuManager menuBar) { - MenuManager fileMenu = new MenuManager("&File", - IWorkbenchActionConstants.M_FILE); - MenuManager editMenu = new MenuManager("&Edit", - IWorkbenchActionConstants.M_EDIT); - MenuManager windowMenu = new MenuManager("&Window", - IWorkbenchActionConstants.M_WINDOW); - - menuBar.add(fileMenu); - menuBar.add(editMenu); - menuBar.add(windowMenu); - // Add a group marker indicating where action set menus will appear. - menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); - - // File - fileMenu.add(saveAction); - fileMenu.add(saveAsAction); - fileMenu.add(saveAllAction); - fileMenu.add(closeAllAction); - fileMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); - fileMenu.add(new Separator()); - fileMenu.add(exitAction); - - // Edit - editMenu.add(preferences); - - // Window - windowMenu.add(openPerspectiveDialogAction); - windowMenu.add(showViewMenuAction); - } - - @Override - protected void fillCoolBar(ICoolBarManager coolBar) { - IToolBarManager saveToolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT); - saveToolbar.add(saveAction); - saveToolbar.add(saveAllAction); - coolBar.add(saveToolbar); - } - -} diff --git a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureApplicationActivator.java b/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureApplicationActivator.java deleted file mode 100644 index 9c0425c5b..000000000 --- a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureApplicationActivator.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.ui.rcp; - -import java.net.URL; - -import org.eclipse.equinox.security.auth.ILoginContext; -import org.eclipse.equinox.security.auth.LoginContextFactory; -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -/** Activator able to create {@link ILoginContext} */ -public class SecureApplicationActivator implements BundleActivator { - - public final static String CONTEXT_REMOTE = "REMOTE"; - public final static String CONTEXT_NIX = "NIX"; - public final static String CONTEXT_WINDOWS = "WINDOWS"; - private static final String JAAS_CONFIG_FILE = "/META-INF/jaas_default.txt"; - - private static BundleContext bundleContext; - - public void start(BundleContext bundleContext) throws Exception { - SecureApplicationActivator.bundleContext = bundleContext; - } - - public void stop(BundleContext context) throws Exception { - } - - static ILoginContext createLoginContext(String context) { - URL configUrl = bundleContext.getBundle().getEntry(JAAS_CONFIG_FILE); - return LoginContextFactory.createContext(context, configUrl); - } -} diff --git a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureRcp.java b/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureRcp.java deleted file mode 100644 index d8125cf6f..000000000 --- a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureRcp.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.ui.rcp; - - -public class SecureRcp extends AbstractSecureApplication { -} diff --git a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureWorkbenchAdvisor.java b/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureWorkbenchAdvisor.java deleted file mode 100644 index 33b781ee5..000000000 --- a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureWorkbenchAdvisor.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.ui.rcp; - -import org.eclipse.ui.IPerspectiveDescriptor; -import org.eclipse.ui.application.IWorkbenchConfigurer; -import org.eclipse.ui.application.IWorkbenchWindowConfigurer; -import org.eclipse.ui.application.WorkbenchAdvisor; -import org.eclipse.ui.application.WorkbenchWindowAdvisor; - -/** - * Workbench configuration which is aware of the logged in user and can remember - * workbench state. - */ -public class SecureWorkbenchAdvisor extends WorkbenchAdvisor { - public final static String INITIAL_PERSPECTIVE_PROPERTY = "org.argeo.security.ui.initialPerspective"; - public final static String SAVE_AND_RESTORE_PROPERTY = "org.argeo.security.ui.saveAndRestore"; - - private String initialPerspective = System.getProperty( - INITIAL_PERSPECTIVE_PROPERTY, null); - - private final String username; - - public SecureWorkbenchAdvisor(String username) { - this.username = username; - } - - @Override - public void initialize(final IWorkbenchConfigurer configurer) { - super.initialize(configurer); - Boolean saveAndRestore = Boolean.parseBoolean(System.getProperty( - SAVE_AND_RESTORE_PROPERTY, "true")); - configurer.setSaveAndRestore(saveAndRestore); - } - - public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor( - IWorkbenchWindowConfigurer configurer) { - return new SecureWorkbenchWindowAdvisor(configurer, username); - } - - public String getInitialWindowPerspectiveId() { - if (initialPerspective != null) { - // check whether this user can see the declared perspective - // (typically the perspective won't be listed if this user doesn't - // have the right to see it) - IPerspectiveDescriptor pd = getWorkbenchConfigurer().getWorkbench() - .getPerspectiveRegistry() - .findPerspectiveWithId(initialPerspective); - if (pd == null) - return null; - } - return initialPerspective; - } - - protected String getUsername() { - return username; - } -} diff --git a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureWorkbenchWindowAdvisor.java b/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureWorkbenchWindowAdvisor.java deleted file mode 100644 index d8aaec443..000000000 --- a/org.argeo.security.ui.rcp/src/org/argeo/security/ui/rcp/SecureWorkbenchWindowAdvisor.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.security.ui.rcp; - -import org.eclipse.swt.graphics.Point; -import org.eclipse.ui.application.ActionBarAdvisor; -import org.eclipse.ui.application.IActionBarConfigurer; -import org.eclipse.ui.application.IWorkbenchWindowConfigurer; -import org.eclipse.ui.application.WorkbenchWindowAdvisor; - -public class SecureWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor { - private final String username; - - public SecureWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer, - String username) { - super(configurer); - this.username = username; - } - - public ActionBarAdvisor createActionBarAdvisor( - IActionBarConfigurer configurer) { - return new SecureActionBarAdvisor(configurer, true); - } - - public void preWindowOpen() { - IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); - configurer.setInitialSize(new Point(1200, 900)); - configurer.setShowCoolBar(true); - configurer.setShowMenuBar(true); - configurer.setShowStatusLine(true); - configurer.setShowProgressIndicator(true); - - configurer.setShowPerspectiveBar(true); - String remoteUri = System - .getProperty(AbstractSecureApplication.NODE_REPO_URI); - if (remoteUri != null) - configurer - .setTitle("Argeo UI - " + username + " (" + remoteUri + ")"); //$NON-NLS-1$ - else - configurer.setTitle("Argeo UI - " + username); //$NON-NLS-1$ - - } -} diff --git a/org.argeo.security.ui/pom.xml b/org.argeo.security.ui/pom.xml index 37e98b450..cd1c4b3f9 100644 --- a/org.argeo.security.ui/pom.xml +++ b/org.argeo.security.ui/pom.xml @@ -26,13 +26,13 @@ - + @@ -40,13 +40,13 @@ org.argeo.util 2.1.12 - - org.argeo.tp - org.springframework.security.core - - - org.argeo.tp - slf4j.org.apache.commons.logging - + + + + + + + + \ No newline at end of file diff --git a/org.argeo.security.ui/src/org/argeo/security/ui/PrivilegedJob.java b/org.argeo.security.ui/src/org/argeo/security/ui/PrivilegedJob.java index 1ded50fdb..f66ef2b60 100644 --- a/org.argeo.security.ui/src/org/argeo/security/ui/PrivilegedJob.java +++ b/org.argeo.security.ui/src/org/argeo/security/ui/PrivilegedJob.java @@ -8,8 +8,8 @@ import javax.security.auth.Subject; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.jobs.Job; -import org.springframework.security.Authentication; -import org.springframework.security.context.SecurityContextHolder; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; /** * Propagate authentication to an eclipse job. Typically to execute a privileged diff --git a/org.argeo.security.ui/src/org/argeo/security/ui/commands/OpenChangePasswordDialog.java b/org.argeo.security.ui/src/org/argeo/security/ui/commands/OpenChangePasswordDialog.java index f1bb093ec..f652ccde4 100644 --- a/org.argeo.security.ui/src/org/argeo/security/ui/commands/OpenChangePasswordDialog.java +++ b/org.argeo.security.ui/src/org/argeo/security/ui/commands/OpenChangePasswordDialog.java @@ -22,7 +22,7 @@ import org.eclipse.core.commands.ExecutionException; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.ui.handlers.HandlerUtil; -import org.springframework.security.userdetails.UserDetailsManager; +import org.springframework.security.provisioning.UserDetailsManager; /** Opens the change password dialog. */ public class OpenChangePasswordDialog extends AbstractHandler { diff --git a/org.argeo.security.ui/src/org/argeo/security/ui/internal/CurrentUser.java b/org.argeo.security.ui/src/org/argeo/security/ui/internal/CurrentUser.java index 43ca5884e..944bc2321 100644 --- a/org.argeo.security.ui/src/org/argeo/security/ui/internal/CurrentUser.java +++ b/org.argeo.security.ui/src/org/argeo/security/ui/internal/CurrentUser.java @@ -24,8 +24,8 @@ import java.util.Set; import javax.security.auth.Subject; import org.argeo.ArgeoException; -import org.springframework.security.Authentication; -import org.springframework.security.GrantedAuthority; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.GrantedAuthority; /** * Retrieves information about the current user. Not an API, can change without diff --git a/org.argeo.security.ui/src/org/argeo/security/ui/views/UserProfile.java b/org.argeo.security.ui/src/org/argeo/security/ui/views/UserProfile.java index 3f1f000bf..e18deb40b 100644 --- a/org.argeo.security.ui/src/org/argeo/security/ui/views/UserProfile.java +++ b/org.argeo.security.ui/src/org/argeo/security/ui/views/UserProfile.java @@ -30,7 +30,7 @@ import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Table; import org.eclipse.ui.part.ViewPart; -import org.springframework.security.Authentication; +import org.springframework.security.core.Authentication; /** Information about the currently logged in user */ public class UserProfile extends ViewPart { diff --git a/org.argeo.server.ads.server/.project b/org.argeo.server.ads.server/.project deleted file mode 100644 index a191480d8..000000000 --- a/org.argeo.server.ads.server/.project +++ /dev/null @@ -1,22 +0,0 @@ - - - org.argeo.server.ads.server - - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - - diff --git a/org.argeo.server.ads.server/.settings/org.eclipse.pde.core.prefs b/org.argeo.server.ads.server/.settings/org.eclipse.pde.core.prefs deleted file mode 100644 index 5733b3123..000000000 --- a/org.argeo.server.ads.server/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Sun Jan 16 09:58:38 CET 2011 -eclipse.preferences.version=1 -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/org.argeo.server.ads.server/META-INF/spring/ads.xml b/org.argeo.server.ads.server/META-INF/spring/ads.xml deleted file mode 100644 index 6fdf476cc..000000000 --- a/org.argeo.server.ads.server/META-INF/spring/ads.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - osgibundle:ads.properties - - - - - - - - - - - ${argeo.ads.init.ldif} - - - - - - - - simple - ${argeo.ldap.manager.userdn} - ${argeo.ldap.manager.password} - - - - - - - - - - - - diff --git a/org.argeo.server.ads.server/META-INF/spring/server.xml b/org.argeo.server.ads.server/META-INF/spring/server.xml deleted file mode 100644 index 84407be13..000000000 --- a/org.argeo.server.ads.server/META-INF/spring/server.xml +++ /dev/null @@ -1,363 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/org.argeo.server.ads.server/ads.properties b/org.argeo.server.ads.server/ads.properties deleted file mode 100644 index 4aa138d97..000000000 --- a/org.argeo.server.ads.server/ads.properties +++ /dev/null @@ -1,5 +0,0 @@ -argeo.ldap.rootdn=dc=demo,dc=example,dc=org -argeo.ldap.port=10389 -argeo.ldap.manager.userdn=uid=admin,ou=system -argeo.ldap.manager.password=secret -argeo.ads.init.ldif=osgibundle:init.ldif \ No newline at end of file diff --git a/org.argeo.server.ads.server/bnd.bnd b/org.argeo.server.ads.server/bnd.bnd deleted file mode 100644 index 71b51a334..000000000 --- a/org.argeo.server.ads.server/bnd.bnd +++ /dev/null @@ -1,23 +0,0 @@ -Spring-Context: META-INF/spring/*.xml;create-asynchronously:=false -Import-Package: javax.naming.directory,\ -jdbm,\ -org.apache.directory.server.configuration,\ -org.apache.directory.server.core.authn,\ -org.apache.directory.server.core.authz,\ -org.apache.directory.server.core.collective,\ -org.apache.directory.server.core.configuration,\ -org.apache.directory.server.core.event,\ -org.apache.directory.server.core.exception,\ -org.apache.directory.server.core.normalization,\ -org.apache.directory.server.core.operational,\ -org.apache.directory.server.core.partition.impl.btree,\ -org.apache.directory.server.core.referral,\ -org.apache.directory.server.core.schema,\ -org.apache.directory.server.core.schema.bootstrap,\ -org.apache.directory.server.core.subtree,\ -org.apache.directory.server.jndi,\ -org.apache.directory.server.ldap.support.extended,\ -org.apache.directory.shared.asn1.codec,\ -org.argeo.server.ads,\ -org.springframework.beans.factory.config,\ -* \ No newline at end of file diff --git a/org.argeo.server.ads.server/build.properties b/org.argeo.server.ads.server/build.properties deleted file mode 100644 index 5f22cdd44..000000000 --- a/org.argeo.server.ads.server/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = META-INF/ diff --git a/org.argeo.server.ads.server/init.ldif b/org.argeo.server.ads.server/init.ldif deleted file mode 100644 index 0d2e8ba8f..000000000 --- a/org.argeo.server.ads.server/init.ldif +++ /dev/null @@ -1,47 +0,0 @@ -dn: dc=demo,dc=example,dc=org -objectClass: domain -objectClass: extensibleObject -objectClass: top -dc: demo - -dn: ou=Roles,dc=demo,dc=example,dc=org -objectClass: organizationalUnit -objectClass: top -ou: Roles - -dn: ou=People,dc=demo,dc=example,dc=org -objectClass: organizationalUnit -objectClass: top -ou: People - -dn: uid=demo,ou=People,dc=demo,dc=example,dc=org -objectClass: organizationalPerson -objectClass: person -objectClass: inetOrgPerson -objectClass: top -cn: demo User -description: Demo user -givenname: Demo -mail: demo@localhost -sn: User -uid: demo -userpassword:: e1NIQX1pZVNWNTVRYytlUU9hWURSU2hhL0Fqek5USkU9 - -dn: uid=root,ou=People,dc=demo,dc=example,dc=org -objectClass: person -objectClass: inetOrgPerson -objectClass: organizationalPerson -objectClass: top -cn: demo User -description: Superuser -givenname: Root -mail: root@localhost -sn: Root -uid: root -userpassword:: e1NIQX1pZVNWNTVRYytlUU9hWURSU2hhL0Fqek5USkU9 - -dn: cn=admin,ou=Roles,dc=demo,dc=example,dc=org -objectClass: groupOfNames -objectClass: top -cn: admin -member: uid=root,ou=People,dc=demo,dc=example,dc=org diff --git a/org.argeo.server.ads.server/pom.xml b/org.argeo.server.ads.server/pom.xml deleted file mode 100644 index 0356592d4..000000000 --- a/org.argeo.server.ads.server/pom.xml +++ /dev/null @@ -1,11 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12 - argeo-commons - .. - - org.argeo.server.ads.server - Commons Server Default ADS LDAP Server - \ No newline at end of file diff --git a/org.argeo.server.ads/.classpath b/org.argeo.server.ads/.classpath deleted file mode 100644 index d2953a684..000000000 --- a/org.argeo.server.ads/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/org.argeo.server.ads/.project b/org.argeo.server.ads/.project deleted file mode 100644 index 448ef0483..000000000 --- a/org.argeo.server.ads/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.argeo.server.ads - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - - diff --git a/org.argeo.server.ads/bnd.bnd b/org.argeo.server.ads/bnd.bnd deleted file mode 100644 index e69de29bb..000000000 diff --git a/org.argeo.server.ads/build.properties b/org.argeo.server.ads/build.properties deleted file mode 100644 index 6e3ef5450..000000000 --- a/org.argeo.server.ads/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -additional.bundles = org.apache.directory.server.core -source.. = src/ diff --git a/org.argeo.server.ads/pom.xml b/org.argeo.server.ads/pom.xml deleted file mode 100644 index b7e5b497b..000000000 --- a/org.argeo.server.ads/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - 4.0.0 - - org.argeo.commons - argeo-commons - 2.1.12 - .. - - org.argeo.server.ads - Commons Server Apache Directory Server - - - org.argeo.commons - org.argeo.util - 2.1.12 - - - - - org.argeo.tp - org.apache.directory.server.jndi - - - - org.slf4j - com.springsource.slf4j.api - - - - - - - org.argeo.tp - org.apache.commons.io - - - - - org.argeo.tp - org.springframework.core - - - org.argeo.tp - org.springframework.beans - - - - - org.argeo.tp - slf4j.org.apache.commons.logging - - - org.argeo.tp - slf4j.api - - - \ No newline at end of file diff --git a/org.argeo.server.ads/src/org/argeo/server/ads/AdsContainer.java b/org.argeo.server.ads/src/org/argeo/server/ads/AdsContainer.java deleted file mode 100644 index e95cd8f5a..000000000 --- a/org.argeo.server.ads/src/org/argeo/server/ads/AdsContainer.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.argeo.server.ads; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.Writer; -import java.util.ArrayList; -import java.util.List; -import java.util.Properties; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.naming.directory.InitialDirContext; - -import org.apache.commons.io.FileUtils; -import org.apache.commons.io.IOUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.directory.server.configuration.MutableServerStartupConfiguration; -import org.apache.directory.server.core.configuration.ShutdownConfiguration; -import org.apache.directory.server.jndi.ServerContextFactory; -import org.argeo.ArgeoException; -import org.springframework.beans.factory.DisposableBean; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.core.io.Resource; -import org.springframework.util.Assert; - -/** Wraps an Apache Directory Server instance. */ -@SuppressWarnings("restriction") -public class AdsContainer implements InitializingBean, DisposableBean { - private final static Log log = LogFactory.getLog(AdsContainer.class); - - private MutableServerStartupConfiguration configuration; - private Properties environment = null; - private File workingDirectory = new File( - System.getProperty("java.io.tmpdir") + File.separator - + "argeo-apacheDirectoryServer"); - private Boolean deleteWorkingDirOnExit = false; - - // LDIF - private List ldifs = new ArrayList(); - private List ignoredLdifAttributes = new ArrayList(); - /** default is 'demo' */ - private String ldifPassword = "e1NIQX1pZVNWNTVRYytlUU9hWURSU2hhL0Fqek5USkU9"; - private String ldifPasswordAttribute = "userPassword"; - private File ldifDirectory; - - @SuppressWarnings("unchecked") - public void afterPropertiesSet() throws Exception { - - log.info("Starting directory server with id '" - + configuration.getInstanceId() + "' in directory " - + workingDirectory.getAbsolutePath()); - - if (deleteWorkingDirOnExit && workingDirectory.exists()) { - log.warn("Found existing directory " + workingDirectory - + " deleting it..."); - FileUtils.deleteDirectory(workingDirectory); - } - configuration.setWorkingDirectory(workingDirectory); - workingDirectory.mkdirs(); - - if (ldifDirectory != null) - configuration.setLdifDirectory(ldifDirectory); - else - configuration.setLdifDirectory(new File(workingDirectory - .getAbsolutePath() + File.separator + "ldif")); - - if (ignoredLdifAttributes.size() == 0) { - ignoredLdifAttributes.add("entryUUID"); - ignoredLdifAttributes.add("structuralObjectClass"); - ignoredLdifAttributes.add("creatorsName"); - ignoredLdifAttributes.add("createTimestamp"); - ignoredLdifAttributes.add("entryCSN"); - ignoredLdifAttributes.add("modifiersName"); - ignoredLdifAttributes.add("modifyTimestamp"); - } - - // Process provided LDIF files - if (ldifs.size() > 0) - configuration.getLdifDirectory().mkdirs(); - for (Resource ldif : ldifs) { - File targetFile = new File(configuration.getLdifDirectory() - .getAbsolutePath() - + File.separator - + ldif.getFilename().replace(':', '_')); - processLdif(ldif, targetFile); - } - - Properties env = new Properties(); - env.setProperty(Context.INITIAL_CONTEXT_FACTORY, - ServerContextFactory.class.getName()); - Assert.notNull(environment); - env.putAll(environment); - env.putAll(configuration.toJndiEnvironment()); - - try { - new InitialDirContext(env); - } catch (NamingException e) { - throw new ArgeoException("Failed to start Apache Directory server", - e); - } - } - - /** - * Processes an LDIF resource, filtering out attributes that cannot be - * imported in ADS and forcing a password. - */ - protected void processLdif(Resource ldif, File targetFile) { - BufferedReader reader = null; - Writer writer = null; - try { - reader = new BufferedReader(new InputStreamReader( - ldif.getInputStream())); - writer = new FileWriter(targetFile); - String line = null; - lines: while ((line = reader.readLine()) != null) { - // comment and empty lines - if (line.trim().equals("") || line.startsWith("#")) { - writer.write(line); - writer.write('\n'); - continue lines; - } - - String[] tokens = line.split(":"); - String attribute = null; - if (tokens != null && tokens.length > 1) { - attribute = tokens[0].trim(); - if (ignoredLdifAttributes.contains(attribute)) - continue lines;// ignore - - if (attribute.equals("bdb_db_open")) { - log.warn("Ignored OpenLDAP output\n" + line); - continue lines; - } - - if (ldifPassword != null - && attribute.equals(ldifPasswordAttribute)) { - line = ldifPasswordAttribute + ":: " + ldifPassword; - } - - writer.write(line); - writer.write('\n'); - } else { - log.warn("Ignored LDIF line\n" + line); - } - } - if (log.isDebugEnabled()) - log.debug("Processed " + ldif + " to LDIF directory " - + configuration.getLdifDirectory()); - } catch (IOException e) { - throw new ArgeoException("Cannot process LDIF " + ldif, e); - } finally { - IOUtils.closeQuietly(reader); - IOUtils.closeQuietly(writer); - } - } - - @SuppressWarnings("unchecked") - public void destroy() throws Exception { - ShutdownConfiguration shutdown = new ShutdownConfiguration( - configuration.getInstanceId()); - - Properties env = new Properties(); - env.setProperty(Context.INITIAL_CONTEXT_FACTORY, - ServerContextFactory.class.getName()); - Assert.notNull(environment); - env.putAll(environment); - env.putAll(shutdown.toJndiEnvironment()); - - log.info("Shutting down directory server with id '" - + configuration.getInstanceId() + "'"); - - try { - new InitialContext(env); - } catch (NamingException e) { - throw new ArgeoException("Failed to stop Apache Directory server", - e); - } - - if (workingDirectory.exists() && deleteWorkingDirOnExit) { - if (log.isDebugEnabled()) - log.debug("Delete Apache DS working dir " + workingDirectory); - FileUtils.deleteDirectory(workingDirectory); - } - - } - - public void setConfiguration(MutableServerStartupConfiguration configuration) { - this.configuration = configuration; - } - - public void setWorkingDirectory(File workingDirectory) { - this.workingDirectory = workingDirectory; - } - - public void setEnvironment(Properties environment) { - this.environment = environment; - } - - public void setLdifs(List ldifs) { - this.ldifs = ldifs; - } - - public void setLdifDirectory(File ldifDirectory) { - this.ldifDirectory = ldifDirectory; - } - - public void setDeleteWorkingDirOnExit(Boolean deleteWorkingDirOnExit) { - this.deleteWorkingDirOnExit = deleteWorkingDirOnExit; - } - - public void setIgnoredLdifAttributes(List ignoredLdifAttributes) { - this.ignoredLdifAttributes = ignoredLdifAttributes; - } - - public void setLdifPassword(String ldifPassword) { - this.ldifPassword = ldifPassword; - } - - public void setLdifPasswordAttribute(String ldifPasswordAttribute) { - this.ldifPasswordAttribute = ldifPasswordAttribute; - } - -} diff --git a/org.argeo.server.core/build.properties b/org.argeo.server.core/build.properties index da395131a..63f6b336e 100644 --- a/org.argeo.server.core/build.properties +++ b/org.argeo.server.core/build.properties @@ -1,7 +1,4 @@ source.. = src/ -additional.bundles = slf4j.api,\ - slf4j.org.apache.commons.logging,\ - slf4j.log4j,\ - org.apache.log4j,\ +additional.bundles = org.apache.log4j,\ com.jcraft.jsch \ No newline at end of file diff --git a/org.argeo.server.core/pom.xml b/org.argeo.server.core/pom.xml index a14fa21ae..60c1a31c8 100644 --- a/org.argeo.server.core/pom.xml +++ b/org.argeo.server.core/pom.xml @@ -17,13 +17,13 @@ - + - + - - org.argeo.tp - javax.servlet - + + + + - - - org.argeo.tp - slf4j.org.apache.commons.logging - + + + + + - - org.argeo.tp - org.apache.commons.fileupload - + + + + \ No newline at end of file diff --git a/org.argeo.server.core/src/org/argeo/server/backup/AbstractAtomicBackup.java b/org.argeo.server.core/src/org/argeo/server/backup/AbstractAtomicBackup.java index 53972e503..89c53e680 100644 --- a/org.argeo.server.core/src/org/argeo/server/backup/AbstractAtomicBackup.java +++ b/org.argeo.server.core/src/org/argeo/server/backup/AbstractAtomicBackup.java @@ -15,10 +15,10 @@ */ package org.argeo.server.backup; -import org.apache.commons.vfs.FileObject; -import org.apache.commons.vfs.FileSystemManager; -import org.apache.commons.vfs.FileSystemOptions; -import org.apache.commons.vfs.provider.sftp.SftpFileSystemConfigBuilder; +import org.apache.commons.vfs2.FileObject; +import org.apache.commons.vfs2.FileSystemManager; +import org.apache.commons.vfs2.FileSystemOptions; +import org.apache.commons.vfs2.provider.sftp.SftpFileSystemConfigBuilder; import org.argeo.ArgeoException; /** diff --git a/org.argeo.server.core/src/org/argeo/server/backup/AtomicBackup.java b/org.argeo.server.core/src/org/argeo/server/backup/AtomicBackup.java index 3ebe4b5d2..1f3eb942d 100644 --- a/org.argeo.server.core/src/org/argeo/server/backup/AtomicBackup.java +++ b/org.argeo.server.core/src/org/argeo/server/backup/AtomicBackup.java @@ -15,8 +15,8 @@ */ package org.argeo.server.backup; -import org.apache.commons.vfs.FileSystemManager; -import org.apache.commons.vfs.FileSystemOptions; +import org.apache.commons.vfs2.FileSystemManager; +import org.apache.commons.vfs2.FileSystemOptions; /** Performs the backup of a single component, typically a database dump */ public interface AtomicBackup { diff --git a/org.argeo.server.core/src/org/argeo/server/backup/BackupFileSystemManager.java b/org.argeo.server.core/src/org/argeo/server/backup/BackupFileSystemManager.java index 9a0549c5a..c963c303d 100644 --- a/org.argeo.server.core/src/org/argeo/server/backup/BackupFileSystemManager.java +++ b/org.argeo.server.core/src/org/argeo/server/backup/BackupFileSystemManager.java @@ -15,15 +15,15 @@ */ package org.argeo.server.backup; -import org.apache.commons.vfs.FileSystemException; -import org.apache.commons.vfs.impl.DefaultFileSystemManager; -import org.apache.commons.vfs.provider.bzip2.Bzip2FileProvider; -import org.apache.commons.vfs.provider.ftp.FtpFileProvider; -import org.apache.commons.vfs.provider.gzip.GzipFileProvider; -import org.apache.commons.vfs.provider.local.DefaultLocalFileProvider; -import org.apache.commons.vfs.provider.ram.RamFileProvider; -import org.apache.commons.vfs.provider.sftp.SftpFileProvider; -import org.apache.commons.vfs.provider.url.UrlFileProvider; +import org.apache.commons.vfs2.FileSystemException; +import org.apache.commons.vfs2.impl.DefaultFileSystemManager; +import org.apache.commons.vfs2.provider.bzip2.Bzip2FileProvider; +import org.apache.commons.vfs2.provider.ftp.FtpFileProvider; +import org.apache.commons.vfs2.provider.gzip.GzipFileProvider; +import org.apache.commons.vfs2.provider.local.DefaultLocalFileProvider; +import org.apache.commons.vfs2.provider.ram.RamFileProvider; +import org.apache.commons.vfs2.provider.sftp.SftpFileProvider; +import org.apache.commons.vfs2.provider.url.UrlFileProvider; import org.argeo.ArgeoException; /** diff --git a/org.argeo.server.core/src/org/argeo/server/backup/BackupPurge.java b/org.argeo.server.core/src/org/argeo/server/backup/BackupPurge.java index 37eecd674..4937b8eb9 100644 --- a/org.argeo.server.core/src/org/argeo/server/backup/BackupPurge.java +++ b/org.argeo.server.core/src/org/argeo/server/backup/BackupPurge.java @@ -17,8 +17,8 @@ package org.argeo.server.backup; import java.text.DateFormat; -import org.apache.commons.vfs.FileSystemManager; -import org.apache.commons.vfs.FileSystemOptions; +import org.apache.commons.vfs2.FileSystemManager; +import org.apache.commons.vfs2.FileSystemOptions; /** Purges previous backups */ public interface BackupPurge { diff --git a/org.argeo.server.core/src/org/argeo/server/backup/BackupUtils.java b/org.argeo.server.core/src/org/argeo/server/backup/BackupUtils.java index e949b0ccf..4eb3830d8 100644 --- a/org.argeo.server.core/src/org/argeo/server/backup/BackupUtils.java +++ b/org.argeo.server.core/src/org/argeo/server/backup/BackupUtils.java @@ -15,7 +15,7 @@ */ package org.argeo.server.backup; -import org.apache.commons.vfs.FileObject; +import org.apache.commons.vfs2.FileObject; /** Backup utilities */ public class BackupUtils { diff --git a/org.argeo.server.core/src/org/argeo/server/backup/MySqlBackup.java b/org.argeo.server.core/src/org/argeo/server/backup/MySqlBackup.java index 8d3377143..4eb662cbc 100644 --- a/org.argeo.server.core/src/org/argeo/server/backup/MySqlBackup.java +++ b/org.argeo.server.core/src/org/argeo/server/backup/MySqlBackup.java @@ -15,7 +15,7 @@ */ package org.argeo.server.backup; -import org.apache.commons.vfs.FileObject; +import org.apache.commons.vfs2.FileObject; /** Backups a MySQL database using mysqldump. */ public class MySqlBackup extends OsCallBackup { diff --git a/org.argeo.server.core/src/org/argeo/server/backup/OpenLdapBackup.java b/org.argeo.server.core/src/org/argeo/server/backup/OpenLdapBackup.java index eb5ce2d96..bfebe263e 100644 --- a/org.argeo.server.core/src/org/argeo/server/backup/OpenLdapBackup.java +++ b/org.argeo.server.core/src/org/argeo/server/backup/OpenLdapBackup.java @@ -15,7 +15,7 @@ */ package org.argeo.server.backup; -import org.apache.commons.vfs.FileObject; +import org.apache.commons.vfs2.FileObject; import org.argeo.ArgeoException; /** Backups an OpenLDAP server using slapcat */ diff --git a/org.argeo.server.core/src/org/argeo/server/backup/OsCallBackup.java b/org.argeo.server.core/src/org/argeo/server/backup/OsCallBackup.java index 816157cfd..788ba52db 100644 --- a/org.argeo.server.core/src/org/argeo/server/backup/OsCallBackup.java +++ b/org.argeo.server.core/src/org/argeo/server/backup/OsCallBackup.java @@ -28,8 +28,8 @@ import org.apache.commons.exec.PumpStreamHandler; import org.apache.commons.io.IOUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.commons.vfs.FileContent; -import org.apache.commons.vfs.FileObject; +import org.apache.commons.vfs2.FileContent; +import org.apache.commons.vfs2.FileObject; import org.argeo.ArgeoException; /** diff --git a/org.argeo.server.core/src/org/argeo/server/backup/PostgreSqlBackup.java b/org.argeo.server.core/src/org/argeo/server/backup/PostgreSqlBackup.java index 37716bb79..805954b09 100644 --- a/org.argeo.server.core/src/org/argeo/server/backup/PostgreSqlBackup.java +++ b/org.argeo.server.core/src/org/argeo/server/backup/PostgreSqlBackup.java @@ -15,7 +15,7 @@ */ package org.argeo.server.backup; -import org.apache.commons.vfs.FileObject; +import org.apache.commons.vfs2.FileObject; /** Backups a PostgreSQL database using pg_dump. */ public class PostgreSqlBackup extends OsCallBackup { diff --git a/org.argeo.server.core/src/org/argeo/server/backup/SimpleBackupContext.java b/org.argeo.server.core/src/org/argeo/server/backup/SimpleBackupContext.java index 872f31cf3..33e45e654 100644 --- a/org.argeo.server.core/src/org/argeo/server/backup/SimpleBackupContext.java +++ b/org.argeo.server.core/src/org/argeo/server/backup/SimpleBackupContext.java @@ -19,7 +19,7 @@ import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; -import org.apache.commons.vfs.FileSystemManager; +import org.apache.commons.vfs2.FileSystemManager; /** Simple implementation of a backup context */ public class SimpleBackupContext implements BackupContext { diff --git a/org.argeo.server.core/src/org/argeo/server/backup/SimpleBackupPurge.java b/org.argeo.server.core/src/org/argeo/server/backup/SimpleBackupPurge.java index 035c49c75..ad269f77b 100644 --- a/org.argeo.server.core/src/org/argeo/server/backup/SimpleBackupPurge.java +++ b/org.argeo.server.core/src/org/argeo/server/backup/SimpleBackupPurge.java @@ -22,10 +22,10 @@ import java.util.TreeMap; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.commons.vfs.FileObject; -import org.apache.commons.vfs.FileSystemManager; -import org.apache.commons.vfs.FileSystemOptions; -import org.apache.commons.vfs.Selectors; +import org.apache.commons.vfs2.FileObject; +import org.apache.commons.vfs2.FileSystemManager; +import org.apache.commons.vfs2.FileSystemOptions; +import org.apache.commons.vfs2.Selectors; import org.argeo.ArgeoException; import org.joda.time.DateTime; import org.joda.time.Period; diff --git a/org.argeo.server.core/src/org/argeo/server/backup/SvnBackup.java b/org.argeo.server.core/src/org/argeo/server/backup/SvnBackup.java index 636bbcaaa..d157ecf45 100644 --- a/org.argeo.server.core/src/org/argeo/server/backup/SvnBackup.java +++ b/org.argeo.server.core/src/org/argeo/server/backup/SvnBackup.java @@ -17,7 +17,7 @@ package org.argeo.server.backup; import java.io.File; -import org.apache.commons.vfs.FileObject; +import org.apache.commons.vfs2.FileObject; /** Backups a Subversion repository using svnadmin. */ public class SvnBackup extends OsCallBackup { diff --git a/org.argeo.server.core/src/org/argeo/server/backup/SystemBackup.java b/org.argeo.server.core/src/org/argeo/server/backup/SystemBackup.java index 92f73c7a6..b7ce02996 100644 --- a/org.argeo.server.core/src/org/argeo/server/backup/SystemBackup.java +++ b/org.argeo.server.core/src/org/argeo/server/backup/SystemBackup.java @@ -22,15 +22,15 @@ import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.commons.vfs.FileObject; -import org.apache.commons.vfs.FileSystemException; -import org.apache.commons.vfs.FileSystemManager; -import org.apache.commons.vfs.FileSystemOptions; -import org.apache.commons.vfs.Selectors; -import org.apache.commons.vfs.UserAuthenticator; -import org.apache.commons.vfs.auth.StaticUserAuthenticator; -import org.apache.commons.vfs.impl.DefaultFileSystemConfigBuilder; -import org.apache.commons.vfs.impl.StandardFileSystemManager; +import org.apache.commons.vfs2.FileObject; +import org.apache.commons.vfs2.FileSystemException; +import org.apache.commons.vfs2.FileSystemManager; +import org.apache.commons.vfs2.FileSystemOptions; +import org.apache.commons.vfs2.Selectors; +import org.apache.commons.vfs2.UserAuthenticator; +import org.apache.commons.vfs2.auth.StaticUserAuthenticator; +import org.apache.commons.vfs2.impl.DefaultFileSystemConfigBuilder; +import org.apache.commons.vfs2.impl.StandardFileSystemManager; import org.argeo.ArgeoException; /** diff --git a/org.argeo.server.jackrabbit/.settings/org.eclipse.jdt.core.prefs b/org.argeo.server.jackrabbit/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..51880a3eb --- /dev/null +++ b/org.argeo.server.jackrabbit/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,89 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning diff --git a/org.argeo.server.jackrabbit/build.properties b/org.argeo.server.jackrabbit/build.properties index d32561da6..93e080c53 100644 --- a/org.argeo.server.jackrabbit/build.properties +++ b/org.argeo.server.jackrabbit/build.properties @@ -1,9 +1,2 @@ -additional.bundles = slf4j.api,\ - slf4j.log4j,\ - org.apache.log4j,\ - org.apache.commons.collections,\ - edu.oswego.cs.dl.util.concurrent,\ - org.h2,\ - org.apache.lucene,\ - org.springframework.context source.. = src/ +additional.bundles = org.apache.jackrabbit.data diff --git a/org.argeo.server.jackrabbit/pom.xml b/org.argeo.server.jackrabbit/pom.xml index 41db1c968..a04440ab8 100644 --- a/org.argeo.server.jackrabbit/pom.xml +++ b/org.argeo.server.jackrabbit/pom.xml @@ -22,41 +22,41 @@ - - org.argeo.commons - org.argeo.dep.jackrabbit - pom - 2.1.12 - + + + + + + - - org.argeo.tp.rap.platform - org.eclipse.osgi - provided - + + + + + - - org.argeo.tp - org.springframework.beans - - - org.argeo.tp - org.springframework.web.servlet - - - org.argeo.tp - org.springframework.security.core - + + + + + + + + + + + + - - org.argeo.commons - org.argeo.dep.log4j - 2.1.12 - pom - test - + + + + + + + \ No newline at end of file diff --git a/org.argeo.server.jackrabbit/src/org/argeo/jackrabbit/remote/ScopedSessionProvider.java b/org.argeo.server.jackrabbit/src/org/argeo/jackrabbit/remote/ScopedSessionProvider.java index ffe6df9b1..931f69786 100644 --- a/org.argeo.server.jackrabbit/src/org/argeo/jackrabbit/remote/ScopedSessionProvider.java +++ b/org.argeo.server.jackrabbit/src/org/argeo/jackrabbit/remote/ScopedSessionProvider.java @@ -31,8 +31,8 @@ import org.apache.jackrabbit.server.SessionProvider; import org.argeo.ArgeoException; import org.argeo.jcr.ArgeoJcrConstants; import org.argeo.jcr.JcrUtils; -import org.springframework.security.Authentication; -import org.springframework.security.context.SecurityContextHolder; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; /** * Session provider assuming a single workspace and a short life cycle, diff --git a/org.argeo.server.jcr.mvc/pom.xml b/org.argeo.server.jcr.mvc/pom.xml index 485c0f610..d0edf318e 100644 --- a/org.argeo.server.jcr.mvc/pom.xml +++ b/org.argeo.server.jcr.mvc/pom.xml @@ -54,31 +54,31 @@ - - org.argeo.tp - org.springframework.context - - - org.argeo.tp - org.springframework.core - - - org.argeo.tp - org.springframework.beans - - - org.argeo.tp - org.springframework.web - - - org.argeo.tp - org.springframework.web.servlet - + + + + + + + + + + + + + + + + + + + + - - org.argeo.tp - slf4j.org.apache.commons.logging - + + + + \ No newline at end of file diff --git a/org.argeo.server.jcr/bnd.bnd b/org.argeo.server.jcr/bnd.bnd index 59070705d..2b0bd1b2c 100644 --- a/org.argeo.server.jcr/bnd.bnd +++ b/org.argeo.server.jcr/bnd.bnd @@ -1,197 +1,6 @@ -# BND instructions -#----------------------------------------------------------------------- -#Tue Nov 25 13:14:59 CET 2014 -pom.id=org.argeo.commons\:org.argeo.server.jcr\:jar\:2.1.12-SNAPSHOT -env.DESKTOP_SESSION=gnome -env.OLDPWD=/home/mbaudier/dev/src/commons -file.encoding.pkg=sun.io -java.home=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71.x86_64/jre -env.GDM_LANG=en_GB.utf8 -env.DISPLAY=\:0.0 -env.LS_COLORS=rs\=0\:di\=01;34\:ln\=01;36\:mh\=00\:pi\=40;33\:so\=01;35\:do\=01;35\:bd\=40;33;01\:cd\=40;33;01\:or\=40;31;01\:mi\=01;05;37;41\:su\=37;41\:sg\=30;43\:ca\=30;41\:tw\=30;42\:ow\=34;42\:st\=37;44\:ex\=01;32\:*.tar\=01;31\:*.tgz\=01;31\:*.arj\=01;31\:*.taz\=01;31\:*.lzh\=01;31\:*.lzma\=01;31\:*.tlz\=01;31\:*.txz\=01;31\:*.zip\=01;31\:*.z\=01;31\:*.Z\=01;31\:*.dz\=01;31\:*.gz\=01;31\:*.lz\=01;31\:*.xz\=01;31\:*.bz2\=01;31\:*.tbz\=01;31\:*.tbz2\=01;31\:*.bz\=01;31\:*.tz\=01;31\:*.deb\=01;31\:*.rpm\=01;31\:*.jar\=01;31\:*.rar\=01;31\:*.ace\=01;31\:*.zoo\=01;31\:*.cpio\=01;31\:*.7z\=01;31\:*.rz\=01;31\:*.jpg\=01;35\:*.jpeg\=01;35\:*.gif\=01;35\:*.bmp\=01;35\:*.pbm\=01;35\:*.pgm\=01;35\:*.ppm\=01;35\:*.tga\=01;35\:*.xbm\=01;35\:*.xpm\=01;35\:*.tif\=01;35\:*.tiff\=01;35\:*.png\=01;35\:*.svg\=01;35\:*.svgz\=01;35\:*.mng\=01;35\:*.pcx\=01;35\:*.mov\=01;35\:*.mpg\=01;35\:*.mpeg\=01;35\:*.m2v\=01;35\:*.mkv\=01;35\:*.ogm\=01;35\:*.mp4\=01;35\:*.m4v\=01;35\:*.mp4v\=01;35\:*.vob\=01;35\:*.qt\=01;35\:*.nuv\=01;35\:*.wmv\=01;35\:*.asf\=01;35\:*.rm\=01;35\:*.rmvb\=01;35\:*.flc\=01;35\:*.avi\=01;35\:*.fli\=01;35\:*.flv\=01;35\:*.gl\=01;35\:*.dl\=01;35\:*.xcf\=01;35\:*.xwd\=01;35\:*.yuv\=01;35\:*.cgm\=01;35\:*.emf\=01;35\:*.axv\=01;35\:*.anx\=01;35\:*.ogv\=01;35\:*.ogx\=01;35\:*.aac\=01;36\:*.au\=01;36\:*.flac\=01;36\:*.mid\=01;36\:*.midi\=01;36\:*.mka\=01;36\:*.mp3\=01;36\:*.mpc\=01;36\:*.ogg\=01;36\:*.ra\=01;36\:*.wav\=01;36\:*.axa\=01;36\:*.oga\=01;36\:*.spx\=01;36\:*.xspf\=01;36\: -pom.contributors= -project.build.developers= -classworlds.conf=/opt/apache-maven/bin/m2.conf -env.XDG_SESSION_COOKIE=9bf883dac7be1df0f982e1dd0000003a-1416578122.683229-877522490 -pom.pomFile=/home/mbaudier/dev/src/commons/org.argeo.server.jcr/pom.xml -java.endorsed.dirs=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71.x86_64/jre/lib/endorsed -project.build.groupId=org.argeo.commons -env.LOGNAME=mbaudier -env.USERNAME=mbaudier -project.build.scm=org.apache.maven.model.Scm@14f65802 -env.SESSION_MANAGER=local/unix\:@/tmp/.ICE-unix/17546,unix/unix\:/tmp/.ICE-unix/17546 -env.KDEDIRS=/usr -sun.os.patch.level=unknown -java.vendor.url=http\://java.oracle.com/ -pom.profiles= -env.G_BROKEN_FILENAMES=1 -maven-symbolicname=org.argeo.commons.org.argeo.server.jcr -java.version=1.7.0_71 -env.ORBIT_SOCKETDIR=/tmp/orbit-mbaudier -project.build.contributors= -version.argeo-commons=2.1.12-SNAPSHOT -java.vendor.url.bug=http\://bugreport.sun.com/bugreport/ -user.name=mbaudier -env.LANG=en_GB.utf8 -env.CVS_RSH=ssh -project.build.pomFile=/home/mbaudier/dev/src/commons/org.argeo.server.jcr/pom.xml -sun.io.unicode.encoding=UnicodeLittle -sun.jnu.encoding=UTF-8 -env.DBUS_SESSION_BUS_ADDRESS=unix\:abstract\=/tmp/dbus-OazDk3vN1t,guid\=230af52c9acfa834ca05b3b0000059f6 -java.runtime.name=OpenJDK Runtime Environment -project.build.outputdirectory=/home/mbaudier/dev/src/commons/org.argeo.server.jcr/target/classes -env.SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass -rpm.release=6 -project.version=2.1.12-SNAPSHOT -java.specification.name=Java Platform API Specification -user.timezone= -env.LESSOPEN=||/usr/bin/lesspipe.sh %s -pom.mailingLists= -path.separator=\: -project.contributors= -project.inceptionYear=2007 -pom.artifactId=org.argeo.server.jcr -env.MAVEN_CMD_LINE_ARGS=-o clean install -project.name=Commons Server JCR -env.XMODIFIERS=@im\=none -file.encoding=UTF-8 -env.HOME=/home/mbaudier -sun.java.command=org.codehaus.plexus.classworlds.launcher.Launcher -o clean install -env.GTK_RC_FILES=/etc/gtk/gtkrc\:/home/mbaudier/.gtkrc-1.2-gnome2 -project.id=org.argeo.commons\:org.argeo.server.jcr\:jar\:2.1.12-SNAPSHOT -env.HOSTNAME=mostar -Export-Package=org.argeo.jcr.* -Bundle-License=http\://www.apache.org/licenses/LICENSE-2.0.txt -java.io.tmpdir=/tmp -project.build.mailingLists= -env.GNOME_KEYRING_PID=17536 -user.language=en -Include-Resource=org/argeo/jcr/argeo.cnd\=src/main/resources/org/argeo/jcr/argeo.cnd -env.HISTCONTROL=ignoredups -line.separator=\n -project.build.directory=/home/mbaudier/dev/src/commons/org.argeo.server.jcr/target -env.HISTSIZE=1000 -java.vm.info=mixed mode -developmentCycle.argeo-commons.startDate=2012-12-19 -sun.desktop=gnome -java.vm.specification.name=Java Virtual Machine Specification -project.modelEncoding=UTF-8 -env.COLORTERM=gnome-terminal -project.build.id=org.argeo.commons\:org.argeo.server.jcr\:jar\:2.1.12-SNAPSHOT -project.build.licenses=org.apache.maven.model.License@390bf60e -version.rap.addons=0.5.0.argeo.20141029 -pom.modelVersion=4.0.0 -project.licenses=org.apache.maven.model.License@390bf60e -env.GDMSESSION=gnome -project.developers= -java.awt.printerjob=sun.print.PSPrinterJob --removeheaders=Bnd-LastModified,Build-Jdk,Built-By,Tool,Created-By -pom.version=2.1.12-SNAPSHOT -env.WINDOWID=73400323 -pom.scm=org.apache.maven.model.Scm@14f65802 --plugin=org.apache.felix.bundleplugin.BlueprintPlugin,aQute.lib.spring.SpringXMLType -project.mailingLists= -pom.packaging=jar -project.build.parent=org.argeo.commons\:argeo-commons\:pom\:2.1.12-SNAPSHOT -project.projectDirectory=/home/mbaudier/dev/src/commons/org.argeo.server.jcr -os.name=Linux -project.build.modelVersion=4.0.0 -java.specification.vendor=Oracle Corporation -env.TERM=xterm -java.vm.name=OpenJDK 64-Bit Server VM -env.QT_IM_MODULE=xim -java.library.path=/usr/java/packages/lib/amd64\:/usr/lib64\:/lib64\:/lib\:/usr/lib -project.build.build=org.apache.maven.model.Build@40472e64 -env.PATH=/usr/lib64/qt-3.3/bin\:/usr/local/bin\:/usr/bin\:/bin\:/usr/local/sbin\:/usr/sbin\:/sbin\:/home/mbaudier/bin -pom.build=org.apache.maven.model.Build@40472e64 -java.class.version=51.0 -env.SHLVL=2 -project.build.version=2.1.12-SNAPSHOT -env.GNOME_KEYRING_SOCKET=/tmp/keyring-YLbPHE/socket -pom.parent=org.argeo.commons\:argeo-commons\:pom\:2.1.12-SNAPSHOT -pom.projectDirectory=/home/mbaudier/dev/src/commons/org.argeo.server.jcr -project.modelVersion=4.0.0 -rpm.stagingRepository=/srv/rpmfactory/argeo-osgi-2-staging/6/x86_64 -Bundle-SymbolicName=org.argeo.server.jcr -sun.boot.library.path=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71.x86_64/jre/lib/amd64 -project.build.sourceEncoding=UTF-8 -Private-Package=org.argeo.jcr;org.argeo.jcr.proxy;org.argeo.jcr.security;org.argeo.jcr.spring;org.argeo.jcr.tabular;org.argeo.jcr.unit;-split-package\:\=merge-first -project.build.artifactId=org.argeo.server.jcr -sun.management.compiler=HotSpot 64-Bit Tiered Compilers -java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment -pom.name=Commons Server JCR -env.USER=mbaudier -pom.developers= -project.build=org.apache.maven.model.Build@40472e64 -project.scm=org.apache.maven.model.Scm@14f65802 -project.baseDir=/home/mbaudier/dev/src/commons/org.argeo.server.jcr -project.build.name=Commons Server JCR -java.vm.specification.version=1.7 -env.KDE_IS_PRELINKED=1 -project.build.inceptionYear=2007 -env.GDM_KEYBOARD_LAYOUT=de -project.groupId=org.argeo.commons -Bundle-Version=2.1.12-SNAPSHOT-r${tstamp} -env.NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat -awt.toolkit=sun.awt.X11.XToolkit -project.build.profiles= -sun.cpu.isalist= -developmentCycle.argeo-commons=2.1 -project.profiles= -java.ext.dirs=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71.x86_64/jre/lib/ext\:/usr/java/packages/lib/ext -Import-Package=junit.framework;resolution\:\=optional,org.xml.sax;version\="0.0.0",org.springframework.core;resolution\:\=optional,org.springframework.core.io;resolution\:\=optional,org.springframework.*;resolution\:\=optional,* -os.version=2.6.32-504.1.3.el6.x86_64 -user.home=/home/mbaudier -java.vm.vendor=Oracle Corporation -env.JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71.x86_64 -SLC-Category=org.argeo.commons -env.XAUTHORITY=/var/run/gdm/auth-for-mbaudier-7t5RHJ/database -user.dir=/home/mbaudier/dev/src/commons -env.XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt -env.WINDOWPATH=1 -env.MAIL=/var/spool/mail/mbaudier -project.build.modelEncoding=UTF-8 -env.PWD=/home/mbaudier/dev/src/commons -project.parent=org.argeo.commons\:argeo-commons\:pom\:2.1.12-SNAPSHOT -sun.cpu.endian=little -env.QTLIB=/usr/lib64/qt-3.3/lib -pom.licenses=org.apache.maven.model.License@390bf60e -project.dir=/home/mbaudier/dev/src/commons/org.argeo.server.jcr -classifier= -version.argeo-distribution=1.4.0 -java.vm.version=24.65-b04 -java.class.path=/opt/apache-maven/boot/plexus-classworlds-2.5.1.jar -env.QTDIR=/usr/lib64/qt-3.3 -os.arch=amd64 -maven.build.version=Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-11T22\:58\:10+02\:00) -project.build.projectDirectory=/home/mbaudier/dev/src/commons/org.argeo.server.jcr -version.rap=2.2.0-R-20131204-0942 -sun.java.launcher=SUN_STANDARD -pom.inceptionYear=2007 -env.IMSETTINGS_INTEGRATE_DESKTOP=yes -project.packaging=jar -java.vm.specification.vendor=Oracle Corporation -file.separator=/ -java.runtime.version=1.7.0_71-mockbuild_2014_10_17_22_23-b00 -project.pomFile=/home/mbaudier/dev/src/commons/org.argeo.server.jcr/pom.xml -env.SSH_AUTH_SOCK=/tmp/keyring-YLbPHE/socket.ssh -sun.boot.class.path=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71.x86_64/jre/lib/resources.jar\:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71.x86_64/jre/lib/rt.jar\:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71.x86_64/jre/lib/sunrsasign.jar\:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71.x86_64/jre/lib/jsse.jar\:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71.x86_64/jre/lib/jce.jar\:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71.x86_64/jre/lib/charsets.jar\:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71.x86_64/jre/lib/rhino.jar\:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71.x86_64/jre/lib/jfr.jar\:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71.x86_64/jre/classes -project.build.packaging=jar -maven.version=3.2.3 -project.artifactId=org.argeo.server.jcr -env.QTINC=/usr/lib64/qt-3.3/include -user.country=GB -pom.modelEncoding=UTF-8 -maven.home=/opt/apache-maven -env.SHELL=/bin/bash -Bundle-RequiredExecutionEnvironment=JavaSE-1.6 --sourcepath=/home/mbaudier/dev/src/commons/org.argeo.server.jcr/src/main/java,/home/mbaudier/dev/src/commons/org.argeo.server.jcr/target/classes -pom.groupId=org.argeo.commons -java.vendor=Oracle Corporation -env.GPG_AGENT_INFO=/tmp/seahorse-CQZHIM/S.gpg-agent\:17621\:1; -env.IMSETTINGS_MODULE=none -Bundle-Name=Commons Server JCR -java.specification.version=1.7 -env.GNOME_DESKTOP_SESSION_ID=this-is-deprecated -sun.arch.data.model=64 -#----------------------------------------------------------------------- +Import-Package: junit.framework;resolution:=optional,\ +org.xml.sax;version="0.0.0",\ +org.springframework.core;resolution:=optional,\ +org.springframework.core.io;resolution:=optional,\ +org.springframework.*;resolution:=optional,\ +* diff --git a/org.argeo.server.jcr/build.properties b/org.argeo.server.jcr/build.properties index d564e5792..bea936651 100644 --- a/org.argeo.server.jcr/build.properties +++ b/org.argeo.server.jcr/build.properties @@ -1,22 +1,15 @@ -source.. = src/main/java/,\ - src/test/java/,\ - src/test/resources/,\ - src/main/resources/ -output.. = target/classes/,\ - target/test-classes/ +source.. = src/,\ + ext/test/ +output.. = bin/,\ + bin/test-classes/ bin.includes = META-INF/,\ . -additional.bundles = slf4j.api,\ - slf4j.log4j,\ - org.apache.log4j,\ - org.apache.commons.collections,\ - edu.oswego.cs.dl.util.concurrent,\ - org.apache.lucene,\ - junit,\ - org.apache.xml.serializer,\ - org.apache.commons.dbcp,\ - org.apache.commons.pool,\ - org.apache.jackrabbit,\ - org.h2,\ - org.apache.tika +additional.bundles = org.junit,\ + org.apache.jackrabbit.core,\ + javax.jcr,\ + org.apache.jackrabbit.api,\ + org.apache.jackrabbit.data,\ + org.apache.jackrabbit.jcr.commons,\ + org.apache.jackrabbit.spi,\ + org.apache.jackrabbit.spi.commons diff --git a/org.argeo.server.jcr/pom.xml b/org.argeo.server.jcr/pom.xml index 69f45a70c..0f1a2f08a 100644 --- a/org.argeo.server.jcr/pom.xml +++ b/org.argeo.server.jcr/pom.xml @@ -10,35 +10,6 @@ Commons Server JCR - - 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 - - - - org.argeo.jcr.* - - junit.framework;resolution:=optional, - org.xml.sax;version="0.0.0", - org.springframework.core;resolution:=optional, - org.springframework.core.io;resolution:=optional, - org.springframework.*;resolution:=optional, - * - - - org.argeo.maven.plugins maven-argeo-osgi-plugin @@ -63,68 +34,76 @@ 2.1.12 + + + + + + + + - - org.argeo.tp - javax.jcr - + + + + - - org.argeo.tp - org.apache.commons.io - + + + + - - org.argeo.tp - org.springframework.core - provided - - - org.argeo.tp - org.springframework.beans - provided - + + + + + + + + + + - - org.argeo.tp - org.eclipse.osgi - provided - + + + + + - - org.argeo.tp - slf4j.org.apache.commons.logging - + + + + - - org.argeo.tp - junit - true - - - org.argeo.commons - org.argeo.dep.jackrabbit - 2.1.12 - pom - test - - - org.argeo.commons - org.argeo.dep.log4j - 2.1.12 - pom - test - - - org.argeo.commons - org.argeo.osgi.boot - 2.1.12 - test - + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/org.argeo.server.rap.webapp/.project b/org.argeo.server.rap.webapp/.project deleted file mode 100644 index 3ffaae189..000000000 --- a/org.argeo.server.rap.webapp/.project +++ /dev/null @@ -1,22 +0,0 @@ - - - org.argeo.server.rap.webapp - - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - - diff --git a/org.argeo.server.rap.webapp/.settings/org.eclipse.pde.core.prefs b/org.argeo.server.rap.webapp/.settings/org.eclipse.pde.core.prefs deleted file mode 100644 index fd884c249..000000000 --- a/org.argeo.server.rap.webapp/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Tue Mar 01 15:09:47 CET 2011 -eclipse.preferences.version=1 -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/org.argeo.server.rap.webapp/META-INF/context-template.xml b/org.argeo.server.rap.webapp/META-INF/context-template.xml deleted file mode 100644 index eaf6e86cc..000000000 --- a/org.argeo.server.rap.webapp/META-INF/context-template.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - \ No newline at end of file diff --git a/org.argeo.server.rap.webapp/WEB-INF/applicationContext.xml b/org.argeo.server.rap.webapp/WEB-INF/applicationContext.xml deleted file mode 100644 index 336862453..000000000 --- a/org.argeo.server.rap.webapp/WEB-INF/applicationContext.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - osgibundle:rap-webapp.properties - - - - \ No newline at end of file diff --git a/org.argeo.server.rap.webapp/WEB-INF/osgi.xml b/org.argeo.server.rap.webapp/WEB-INF/osgi.xml deleted file mode 100644 index fec44339b..000000000 --- a/org.argeo.server.rap.webapp/WEB-INF/osgi.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/org.argeo.server.rap.webapp/WEB-INF/security-filters.xml b/org.argeo.server.rap.webapp/WEB-INF/security-filters.xml deleted file mode 100644 index 4c7df6b06..000000000 --- a/org.argeo.server.rap.webapp/WEB-INF/security-filters.xml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - PATTERN_TYPE_APACHE_ANT - /**=ROLE_USER,ROLE_ADMIN - - - - - - - PATTERN_TYPE_APACHE_ANT - /**=IS_AUTHENTICATED_ANONYMOUSLY - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${argeo.server.realmName} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/org.argeo.server.rap.webapp/WEB-INF/service-servlet.xml b/org.argeo.server.rap.webapp/WEB-INF/service-servlet.xml deleted file mode 100644 index 7a052199e..000000000 --- a/org.argeo.server.rap.webapp/WEB-INF/service-servlet.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - osgiServiceController - - - - - - - org.eclipse.equinox.http.servlet.HttpServiceServlet - - - osgiService - - - \ No newline at end of file diff --git a/org.argeo.server.rap.webapp/WEB-INF/web.xml b/org.argeo.server.rap.webapp/WEB-INF/web.xml deleted file mode 100644 index 1b6e766e5..000000000 --- a/org.argeo.server.rap.webapp/WEB-INF/web.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - Argeo OSGi Webapp - - - - contextConfigLocation - /WEB-INF/applicationContext.xml - - - - Spring Context - org.springframework.web.context.ContextLoaderListener - - - contextClass - org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext - - - - - service - org.springframework.web.servlet.DispatcherServlet - - contextClass - org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext - - 1 - - - - service - /* - - - - - springSecurityFilterChain - org.springframework.web.filter.DelegatingFilterProxy - - - - springSecurityFilterChain - /private - - - springSecurityFilterChain - /basicauth - - - springSecurityFilterChain - /clientauth - - - springSecurityFilterChain - /none - - - springSecurityFilterChain - /public - - - diff --git a/org.argeo.server.rap.webapp/bnd.bnd b/org.argeo.server.rap.webapp/bnd.bnd deleted file mode 100644 index 954f2d349..000000000 --- a/org.argeo.server.rap.webapp/bnd.bnd +++ /dev/null @@ -1,24 +0,0 @@ -Web-ContextPath: ui -Import-Package: org.springframework.beans.factory.config,\ -org.eclipse.equinox.http.servlet,\ -org.springframework.osgi.web.context.support,\ -org.springframework.security,\ -org.springframework.security.context,\ -org.springframework.security.intercept.web,\ -org.springframework.security.providers.anonymous,\ -org.springframework.security.ui,\ -org.springframework.security.ui.basicauth,\ -org.springframework.security.ui.logout,\ -org.springframework.security.ui.rememberme,\ -org.springframework.security.ui.webapp,\ -org.springframework.security.ui.preauth.x509,\ -org.springframework.security.userdetails,\ -org.springframework.security.util,\ -org.springframework.security.vote,\ -org.springframework.security.wrapper,\ -org.springframework.web.context,\ -org.springframework.web.filter,\ -org.springframework.web.servlet,\ -org.springframework.web.servlet.handler,\ -org.springframework.web.servlet.mvc,\ -* \ No newline at end of file diff --git a/org.argeo.server.rap.webapp/build.properties b/org.argeo.server.rap.webapp/build.properties deleted file mode 100644 index 29dea25a4..000000000 --- a/org.argeo.server.rap.webapp/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -bin.includes = META-INF/,\ - WEB-INF/ diff --git a/org.argeo.server.rap.webapp/pom.xml b/org.argeo.server.rap.webapp/pom.xml deleted file mode 100644 index ace62117b..000000000 --- a/org.argeo.server.rap.webapp/pom.xml +++ /dev/null @@ -1,12 +0,0 @@ - - 4.0.0 - - org.argeo.commons - 2.1.12 - argeo-commons - .. - - org.argeo.server.rap.webapp - Commons Server RAP Webapp - Integrates into OSGi HTTP registry - \ No newline at end of file diff --git a/org.argeo.server.rap.webapp/rap-webapp.properties b/org.argeo.server.rap.webapp/rap-webapp.properties deleted file mode 100644 index 012255a15..000000000 --- a/org.argeo.server.rap.webapp/rap-webapp.properties +++ /dev/null @@ -1,2 +0,0 @@ -argeo.security.systemKey=argeo -argeo.server.realmName=Argeo \ No newline at end of file diff --git a/org.argeo.util/build.properties b/org.argeo.util/build.properties index e03532561..52f323cda 100644 --- a/org.argeo.util/build.properties +++ b/org.argeo.util/build.properties @@ -1,4 +1,4 @@ -additional.bundles = junit source.. = src/,\ ext/test/ output.. = bin/ +additional.bundles = org.junit diff --git a/org.argeo.util/pom.xml b/org.argeo.util/pom.xml index 549c31a0f..e417a3d9c 100644 --- a/org.argeo.util/pom.xml +++ b/org.argeo.util/pom.xml @@ -1,4 +1,5 @@ - + + 4.0.0 org.argeo.commons @@ -8,11 +9,20 @@ org.argeo.util Commons Util (no third party dependencies) - - - org.argeo.tp - junit - test - - + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 776a9e555..401bd1544 100644 --- a/pom.xml +++ b/pom.xml @@ -10,9 +10,7 @@ 2.1.12 2.1 2012-12-19 - 1.4.0 - 2.2.0-R-20131204-0942 - 0.5.0.argeo.20141029 + 2.1.5 6 /srv/rpmfactory/argeo-osgi-2-staging/6/x86_64 @@ -24,42 +22,31 @@ org.argeo.util org.argeo.osgi.boot org.argeo.server.jcr - - org.argeo.eclipse.ui - org.argeo.eclipse.ui.rap - org.argeo.eclipse.ui.rcp org.argeo.security.core org.argeo.security.jackrabbit org.argeo.security.ldap - org.argeo.security.mvc org.argeo.security.auth.ldap org.argeo.security.dao.ldap org.argeo.security.dao.cli - org.argeo.security.dao.os org.argeo.security.dao.jackrabbit - + + org.argeo.server.core org.argeo.server.jcr.mvc org.argeo.server.jackrabbit - org.argeo.jackrabbit.webapp - org.argeo.server.ads - org.argeo.server.ads.server - org.argeo.server.rap.webapp - + + org.argeo.eclipse.ui + org.argeo.eclipse.ui.rap + org.argeo.node.repo.jackrabbit org.argeo.cms - + org.argeo.eclipse.ui.workbench org.argeo.security.equinox org.argeo.security.ui org.argeo.security.ui.admin - org.argeo.security.ui.rap - org.argeo.security.ui.rcp - - org.argeo.server.core - org.argeo.ext.jdbm dep dist @@ -152,8 +139,8 @@ limitations under the License. maven-compiler-plugin 3.2 - 1.6 - 1.6 + 1.7 + 1.7 eclipse target/classes @@ -249,7 +236,7 @@ limitations under the License. <_include>bnd.bnd ${project.version}-r${tstamp} ${project.artifactId} - JavaSE-1.6 + JavaSE-1.7 <_removeheaders>Bnd-LastModified,Build-Jdk,Built-By,Tool,Created-By ${project.groupId} @@ -269,10 +256,12 @@ limitations under the License. org.codehaus.mojo rpm-maven-plugin - 2.1 + 2.1-alpha-1 true ${project.version} + 1.el${rpm.release} + argeo${rpm.release} Applications/System /usr @@ -412,61 +401,18 @@ limitations under the License. - - - - - - - - - - - - - org.argeo.tp - binaries - ${version.argeo-distribution} - pom - import - - - - org.argeo.tp.rap - binaries - ${version.argeo-distribution} - pom - import - - - org.argeo.tp.rap.addons - binaries - ${version.rap.addons} - pom - import - - - org.argeo.tp.rap.platform - binaries - ${version.rap} - pom - import - - - + + + org.argeo.tp + argeo-tp + ${version.argeo-distribution} + provided + + argeo-tp - http://repo.argeo.org/data/public/java/argeo-tp-1.4 - - true - daily - warn - - - - argeo-tp-rap - http://repo.argeo.org/data/public/java/eclipse-rap-2.2 + https://forge.argeo.org/data/public/java/argeo-tp-2.1/ true daily @@ -500,9 +446,17 @@ limitations under the License. dav:https://repo.argeo.org/data/files/java/argeo-commons-${developmentCycle.argeo-commons} false - - site - dav:https://repo.argeo.org/data/files/docs/argeo-commons-${developmentCycle.argeo-commons} - + + + localrepo + + + localrepo + Internal Release Repository + dav:http://localhost:7080/data/files/java/argeo-commons-${developmentCycle.argeo-commons} + + + +