Improve build and maven structure
authorMathieu Baudier <mbaudier@argeo.org>
Fri, 25 Feb 2011 09:47:54 +0000 (09:47 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Fri, 25 Feb 2011 09:47:54 +0000 (09:47 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@4192 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

22 files changed:
eclipse/plugins/org.argeo.jcr.ui.explorer/log4j.properties [new file with mode: 0644]
eclipse/plugins/org.argeo.jcr.ui.explorer/org.argeo.jcr.ui.explorer.product [new file with mode: 0644]
eclipse/plugins/org.argeo.jcr.ui.explorer/pom.xml
eclipse/runtime/org.argeo.eclipse.ui.jcr/pom.xml
security/dep/org.argeo.security.dep.ads/pom.xml
security/eclipse/plugins/org.argeo.security.ui.application/SecureRCP.product [deleted file]
security/eclipse/plugins/org.argeo.security.ui.application/org.argeo.security.ui.application.product [new file with mode: 0644]
security/eclipse/plugins/org.argeo.security.ui.application/pom.xml
security/runtime/org.argeo.security.core/build.properties
security/runtime/org.argeo.security.core/src/test/java/org/argeo/security/json/ArgeoUserJsonTest.java [deleted file]
security/runtime/org.argeo.security.core/src/test/java/org/argeo/security/json/JsonServerMapperTest.java [deleted file]
server/dep/.project [deleted file]
server/dep/org.argeo.server.dep.activemq/pom.xml
server/dep/org.argeo.server.dep.jackrabbit.server/pom.xml
server/dep/org.argeo.server.dep.javax/pom.xml [new file with mode: 0644]
server/dep/org.argeo.server.dep.tomcat/pom.xml
server/dep/pom.xml
server/modules/org.argeo.jackrabbit.webapp/WEB-INF/web.xml
server/runtime/org.argeo.server.jackrabbit/pom.xml
server/runtime/org.argeo.server.jackrabbit/src/main/java/org/argeo/jackrabbit/remote/JcrRemotingHandlerMapping.java [new file with mode: 0644]
server/runtime/org.argeo.server.jackrabbit/src/main/java/org/argeo/jackrabbit/remote/MultipleRepositoryHandlerMapping.java
server/runtime/org.argeo.server.modeshape/pom.xml

diff --git a/eclipse/plugins/org.argeo.jcr.ui.explorer/log4j.properties b/eclipse/plugins/org.argeo.jcr.ui.explorer/log4j.properties
new file mode 100644 (file)
index 0000000..8a89a4a
--- /dev/null
@@ -0,0 +1,24 @@
+log4j.rootLogger=WARN, console
+
+## Levels
+log4j.logger.org.argeo=DEBUG
+log4j.logger.org.springframework.security=DEBUG
+
+log4j.logger.org.apache.catalina=INFO
+log4j.logger.org.apache.coyote=INFO
+log4j.logger.org.apache.tomcat=INFO
+
+log4j.logger.org.apache.directory.server=INFO
+log4j.logger.org.apache.directory.server.core.partition=ERROR
+log4j.logger.org.apache.directory.server.core.schema.bootstrap.BootstrapAttributeTypeRegistry=ERROR
+
+log4j.logger.org.apache.jackrabbit=WARN
+log4j.logger.org.apache.jackrabbit.core.query.lucene=ERROR
+
+## Appenders
+# console is set to be a ConsoleAppender.
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+
+# console uses PatternLayout.
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern= %-5p %d{ISO8601} %m - %c - [%t]%n
diff --git a/eclipse/plugins/org.argeo.jcr.ui.explorer/org.argeo.jcr.ui.explorer.product b/eclipse/plugins/org.argeo.jcr.ui.explorer/org.argeo.jcr.ui.explorer.product
new file mode 100644 (file)
index 0000000..35b11a8
--- /dev/null
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product application="org.argeo.security.ui.application.secureUi" useFeatures="false" includeLaunchers="true">
+
+   <configIni use="default">
+   </configIni>
+
+   <launcherArgs>
+      <vmArgs>-Dlog4j.configuration=file:${system_property:user.home}/dev/src/commons/eclipse/plugins/org.argeo.jcr.ui.explorer/log4j.properties</vmArgs>
+      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
+   </launcherArgs>
+
+   <launcher>
+      <solaris/>
+      <win useIco="false">
+         <bmp/>
+      </win>
+   </launcher>
+
+   <vm>
+   </vm>
+
+   <plugins>
+      <plugin id="com.ibm.icu"/>
+      <plugin id="com.springsource.antlr"/>
+      <plugin id="com.springsource.com.mysql.jdbc"/>
+      <plugin id="com.springsource.com.sun.syndication"/>
+      <plugin id="com.springsource.edu.emory.mathcs.backport"/>
+      <plugin id="com.springsource.edu.oswego.cs.dl.util.concurrent"/>
+      <plugin id="com.springsource.javax.activation"/>
+      <plugin id="com.springsource.javax.annotation"/>
+      <plugin id="com.springsource.javax.ejb"/>
+      <plugin id="com.springsource.javax.el"/>
+      <plugin id="com.springsource.javax.mail"/>
+      <plugin id="com.springsource.javax.management.j2ee"/>
+      <plugin id="com.springsource.javax.persistence"/>
+      <plugin id="com.springsource.javax.servlet"/>
+      <plugin id="com.springsource.javax.servlet.jsp"/>
+      <plugin id="com.springsource.javax.servlet.jsp.jstl"/>
+      <plugin id="com.springsource.javax.transaction"/>
+      <plugin id="com.springsource.javax.xml.bind"/>
+      <plugin id="com.springsource.javax.xml.rpc"/>
+      <plugin id="com.springsource.javax.xml.soap"/>
+      <plugin id="com.springsource.javax.xml.stream"/>
+      <plugin id="com.springsource.javax.xml.ws"/>
+      <plugin id="com.springsource.jdbm"/>
+      <plugin id="com.springsource.junit"/>
+      <plugin id="com.springsource.org.aopalliance"/>
+      <plugin id="com.springsource.org.apache.catalina"/>
+      <plugin id="com.springsource.org.apache.commons.codec"/>
+      <plugin id="com.springsource.org.apache.commons.collections"/>
+      <plugin id="com.springsource.org.apache.commons.compress"/>
+      <plugin id="com.springsource.org.apache.commons.dbcp"/>
+      <plugin id="com.springsource.org.apache.commons.fileupload"/>
+      <plugin id="com.springsource.org.apache.commons.httpclient"/>
+      <plugin id="com.springsource.org.apache.commons.io"/>
+      <plugin id="com.springsource.org.apache.commons.lang"/>
+      <plugin id="com.springsource.org.apache.commons.pool"/>
+      <plugin id="com.springsource.org.apache.coyote" fragment="true"/>
+      <plugin id="com.springsource.org.apache.directory.server.changepw"/>
+      <plugin id="com.springsource.org.apache.directory.server.core" fragment="true"/>
+      <plugin id="com.springsource.org.apache.directory.server.core.shared"/>
+      <plugin id="com.springsource.org.apache.directory.server.jndi"/>
+      <plugin id="com.springsource.org.apache.directory.server.kerberos"/>
+      <plugin id="com.springsource.org.apache.directory.server.kerberos.shared"/>
+      <plugin id="com.springsource.org.apache.directory.server.ldap"/>
+      <plugin id="com.springsource.org.apache.directory.server.ntp"/>
+      <plugin id="com.springsource.org.apache.directory.server.protocol.shared"/>
+      <plugin id="com.springsource.org.apache.directory.shared.asn1"/>
+      <plugin id="com.springsource.org.apache.directory.shared.ldap"/>
+      <plugin id="com.springsource.org.apache.el"/>
+      <plugin id="com.springsource.org.apache.jasper" fragment="true"/>
+      <plugin id="com.springsource.org.apache.jasper.org.eclipse.jdt"/>
+      <plugin id="com.springsource.org.apache.juli.extras"/>
+      <plugin id="com.springsource.org.apache.log4j"/>
+      <plugin id="com.springsource.org.apache.lucene"/>
+      <plugin id="com.springsource.org.apache.mina"/>
+      <plugin id="com.springsource.org.apache.regexp"/>
+      <plugin id="com.springsource.org.apache.taglibs.standard"/>
+      <plugin id="com.springsource.org.apache.ws.commons.schema"/>
+      <plugin id="com.springsource.org.apache.xalan"/>
+      <plugin id="com.springsource.org.apache.xerces" fragment="true"/>
+      <plugin id="com.springsource.org.apache.xml.resolver"/>
+      <plugin id="com.springsource.org.apache.xml.serializer"/>
+      <plugin id="com.springsource.org.apache.xmlbeans"/>
+      <plugin id="com.springsource.org.apache.xmlcommons"/>
+      <plugin id="com.springsource.org.codehaus.jackson"/>
+      <plugin id="com.springsource.org.codehaus.jackson.mapper"/>
+      <plugin id="com.springsource.org.cyberneko.html"/>
+      <plugin id="com.springsource.org.dom4j"/>
+      <plugin id="com.springsource.org.h2"/>
+      <plugin id="com.springsource.org.jaxen"/>
+      <plugin id="com.springsource.org.jdom"/>
+      <plugin id="com.springsource.org.objectweb.asm"/>
+      <plugin id="com.springsource.org.postgresql.jdbc3"/>
+      <plugin id="com.springsource.org.xmlpull"/>
+      <plugin id="com.springsource.slf4j.api"/>
+      <plugin id="com.springsource.slf4j.log4j" fragment="true"/>
+      <plugin id="com.springsource.slf4j.org.apache.commons.logging"/>
+      <plugin id="org.argeo.basic.nodeps"/>
+      <plugin id="org.argeo.dep.osgi.boilerpipe"/>
+      <plugin id="org.argeo.dep.osgi.bouncycastle.jdk15"/>
+      <plugin id="org.argeo.dep.osgi.catalina.start"/>
+      <plugin id="org.argeo.dep.osgi.directory.shared.asn.codec" fragment="true"/>
+      <plugin id="org.argeo.dep.osgi.drewnoakes.metadata_extractor"/>
+      <plugin id="org.argeo.dep.osgi.jackrabbit"/>
+      <plugin id="org.argeo.dep.osgi.jcr"/>
+      <plugin id="org.argeo.dep.osgi.mina.filter.ssl" fragment="true"/>
+      <plugin id="org.argeo.dep.osgi.netcdf"/>
+      <plugin id="org.argeo.dep.osgi.pdfbox"/>
+      <plugin id="org.argeo.dep.osgi.poi"/>
+      <plugin id="org.argeo.dep.osgi.springframework.ldap"/>
+      <plugin id="org.argeo.dep.osgi.tagsoup"/>
+      <plugin id="org.argeo.dep.osgi.tika"/>
+      <plugin id="org.argeo.eclipse.ui"/>
+      <plugin id="org.argeo.eclipse.ui.jcr"/>
+      <plugin id="org.argeo.jackrabbit.webapp"/>
+      <plugin id="org.argeo.jcr.ui.explorer"/>
+      <plugin id="org.argeo.node.repo.jackrabbit"/>
+      <plugin id="org.argeo.security.core"/>
+      <plugin id="org.argeo.security.equinox"/>
+      <plugin id="org.argeo.security.ldap"/>
+      <plugin id="org.argeo.security.manager.ldap"/>
+      <plugin id="org.argeo.security.mvc"/>
+      <plugin id="org.argeo.security.services"/>
+      <plugin id="org.argeo.security.ui"/>
+      <plugin id="org.argeo.security.ui.application"/>
+      <plugin id="org.argeo.server.ads"/>
+      <plugin id="org.argeo.server.ads.server"/>
+      <plugin id="org.argeo.server.catalina" fragment="true"/>
+      <plugin id="org.argeo.server.core"/>
+      <plugin id="org.argeo.server.jackrabbit"/>
+      <plugin id="org.argeo.server.jcr"/>
+      <plugin id="org.argeo.server.json"/>
+      <plugin id="org.argeo.server.tika.jackrabbit" fragment="true"/>
+      <plugin id="org.argeo.server.tomcat" fragment="true"/>
+      <plugin id="org.eclipse.core.commands"/>
+      <plugin id="org.eclipse.core.contenttype"/>
+      <plugin id="org.eclipse.core.databinding"/>
+      <plugin id="org.eclipse.core.databinding.observable"/>
+      <plugin id="org.eclipse.core.databinding.property"/>
+      <plugin id="org.eclipse.core.expressions"/>
+      <plugin id="org.eclipse.core.jobs"/>
+      <plugin id="org.eclipse.core.runtime"/>
+      <plugin id="org.eclipse.equinox.app"/>
+      <plugin id="org.eclipse.equinox.common"/>
+      <plugin id="org.eclipse.equinox.preferences"/>
+      <plugin id="org.eclipse.equinox.registry"/>
+      <plugin id="org.eclipse.equinox.security"/>
+      <plugin id="org.eclipse.help"/>
+      <plugin id="org.eclipse.jface"/>
+      <plugin id="org.eclipse.jface.databinding"/>
+      <plugin id="org.eclipse.osgi"/>
+      <plugin id="org.eclipse.swt"/>
+      <plugin id="org.eclipse.swt.gtk.linux.x86_64" fragment="true"/>
+      <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.ui"/>
+      <plugin id="org.eclipse.ui.forms"/>
+      <plugin id="org.eclipse.ui.workbench"/>
+      <plugin id="org.springframework.aop"/>
+      <plugin id="org.springframework.beans"/>
+      <plugin id="org.springframework.context"/>
+      <plugin id="org.springframework.core"/>
+      <plugin id="org.springframework.osgi.core"/>
+      <plugin id="org.springframework.osgi.extender"/>
+      <plugin id="org.springframework.osgi.io"/>
+      <plugin id="org.springframework.osgi.web"/>
+      <plugin id="org.springframework.osgi.web.extender"/>
+      <plugin id="org.springframework.oxm"/>
+      <plugin id="org.springframework.security.core"/>
+      <plugin id="org.springframework.transaction"/>
+      <plugin id="org.springframework.web"/>
+      <plugin id="org.springframework.web.servlet"/>
+      <plugin id="org.springframework.xml"/>
+   </plugins>
+
+   <configurations>
+      <plugin id="org.argeo.dep.osgi.catalina.start" autoStart="true" startLevel="0" />
+      <plugin id="org.argeo.jackrabbit.webapp" autoStart="true" startLevel="0" />
+      <plugin id="org.argeo.node.repo.jackrabbit" autoStart="true" startLevel="0" />
+      <plugin id="org.argeo.security.equinox" autoStart="true" startLevel="0" />
+      <plugin id="org.argeo.security.manager.ldap" autoStart="true" startLevel="0" />
+      <plugin id="org.argeo.security.services" autoStart="true" startLevel="0" />
+      <plugin id="org.argeo.server.ads.server" autoStart="true" startLevel="0" />
+      <plugin id="org.springframework.osgi.extender" autoStart="true" startLevel="0" />
+      <plugin id="org.springframework.osgi.web.extender" autoStart="true" startLevel="0" />
+   </configurations>
+
+</product>
index 277e44a9a9d36217df458617b22e618e0d3deb03..5f08cd51133f6a8b16c1ffa804245d8f0fc47215 100644 (file)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <parent>
                <groupId>org.argeo.commons.eclipse</groupId>
@@ -8,11 +9,47 @@
        </parent>
        <artifactId>org.argeo.jcr.ui.explorer</artifactId>
        <name>Commons JCR Explorer</name>
-       <packaging>jar</packaging>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.argeo.maven.plugins</groupId>
+                               <artifactId>maven-argeo-osgi-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <id>resolve-pde-sources</id>
+                                               <goals>
+                                                       <goal>pde-sources</goal>
+                                               </goals>
+                                               <phase>generate-resources</phase>
+                                       </execution>
+                                       <execution>
+                                               <id>generate-descriptors</id>
+                                               <goals>
+                                                       <goal>descriptors</goal>
+                                               </goals>
+                                               <phase>generate-resources</phase>
+                                       </execution>
+                                       <execution>
+                                               <id>check-osgi</id>
+                                               <phase>test</phase>
+                                               <goals>
+                                                       <goal>equinox</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <onlyCheck>true</onlyCheck>
+                                                       <argsToAppend>
+                                                               <arg>-clean</arg>
+                                                       </argsToAppend>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+               </plugins>
+       </build>
        <dependencies>
                <dependency>
                        <groupId>org.argeo.commons.eclipse</groupId>
-                       <artifactId>org.argeo.eclipse.ui.jucr</artifactId>
+                       <artifactId>org.argeo.eclipse.ui.jcr</artifactId>
                        <version>0.2.3-SNAPSHOT</version>
                </dependency>
 
                        <version>0.2.3-SNAPSHOT</version>
                        <scope>provided</scope>
                </dependency>
+
+
+               <!-- Testing and target platform -->
+               <dependency>
+                       <groupId>org.argeo.commons.osgi</groupId>
+                       <artifactId>org.argeo.osgi.boot</artifactId>
+                       <version>0.2.3-SNAPSHOT</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.server</groupId>
+                       <artifactId>org.argeo.server.dep.javax</artifactId>
+                       <version>${version.argeo-commons}</version>
+                       <type>pom</type>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.xmlcommons</groupId>
+                       <artifactId>com.springsource.org.apache.xmlcommons</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <!-- LDAP server and security services -->
+               <dependency>
+                       <groupId>org.argeo.commons.security</groupId>
+                       <artifactId>org.argeo.security.dep.ads</artifactId>
+                       <version>${version.argeo-commons}</version>
+                       <type>pom</type>
+                       <scope>test</scope>
+               </dependency>
+               <!-- Tomcat -->
+               <dependency>
+                       <groupId>org.argeo.commons.server</groupId>
+                       <artifactId>org.argeo.server.dep.tomcat</artifactId>
+                       <version>${version.argeo-commons}</version>
+                       <type>pom</type>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework.osgi</groupId>
+                       <artifactId>org.springframework.osgi.web.extender</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework.osgi</groupId>
+                       <artifactId>org.springframework.osgi.web</artifactId>
+               </dependency>
+               <!-- Jackrabbit -->
+               <dependency>
+                       <groupId>org.argeo.commons.server</groupId>
+                       <artifactId>org.argeo.server.jackrabbit</artifactId>
+                       <version>${version.argeo-commons}</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.server</groupId>
+                       <artifactId>org.argeo.server.dep.jackrabbit.server</artifactId>
+                       <version>${version.argeo-commons}</version>
+                       <type>pom</type>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.server</groupId>
+                       <artifactId>org.argeo.jackrabbit.webapp</artifactId>
+                       <version>${version.argeo-commons}</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.server</groupId>
+                       <artifactId>org.argeo.node.repo.jackrabbit</artifactId>
+                       <version>${version.argeo-commons}</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>com.h2database</groupId>
+                       <artifactId>com.springsource.org.h2</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>com.mysql.jdbc</groupId>
+                       <artifactId>com.springsource.com.mysql.jdbc</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.postgresql</groupId>
+                       <artifactId>com.springsource.org.postgresql.jdbc3</artifactId>
+                       <scope>test</scope>
+               </dependency>
        </dependencies>
 </project>
index 6fe7b680e80490182e9186dd1a0a22425d55da5c..3508f175742438110d507273dd111cebd433522f 100644 (file)
@@ -86,5 +86,6 @@
                        <groupId>org.slf4j</groupId>
                        <artifactId>com.springsource.slf4j.org.apache.commons.logging</artifactId>
                </dependency>
+               
        </dependencies>
 </project>
index 5406680e182e189b339d246d1017210375955aab..7d21ecaaa148877cb1ae502017ae14d60fb475f8 100644 (file)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <parent>
                <groupId>org.argeo.commons.security</groupId>
                <dependency>
                        <groupId>org.argeo.commons.security</groupId>
                        <artifactId>org.argeo.security.dep.ldap</artifactId>
-                       <version>0.2.3-SNAPSHOT</version>
+                       <version>${version.argeo-commons}</version>
                        <type>pom</type>
                </dependency>
                <dependency>
                        <groupId>org.argeo.commons.server</groupId>
                        <artifactId>org.argeo.server.dep.ads</artifactId>
-                       <version>0.2.3-SNAPSHOT</version>
+                       <version>${version.argeo-commons}</version>
                        <type>pom</type>
                </dependency>
+
+
+               <dependency>
+                       <groupId>org.argeo.commons.server</groupId>
+                       <artifactId>org.argeo.server.ads.server</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.security</groupId>
+                       <artifactId>org.argeo.security.services</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.security</groupId>
+                       <artifactId>org.argeo.security.ldap</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.security</groupId>
+                       <artifactId>org.argeo.security.manager.ldap</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.server</groupId>
+                       <artifactId>org.argeo.server.ads</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.dep.osgi</groupId>
+                       <artifactId>org.argeo.dep.osgi.springframework.ldap</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.basic</groupId>
+                       <artifactId>org.argeo.basic.dep.log4j</artifactId>
+                       <version>${version.argeo-commons}</version>
+                       <type>pom</type>
+               </dependency>
+               <dependency>
+                       <groupId>net.sourceforge.jdbm</groupId>
+                       <artifactId>com.springsource.jdbm</artifactId>
+               </dependency>
+
+               <!-- TODO remove it? -->
+               <dependency>
+                       <groupId>org.argeo.commons.server</groupId>
+                       <artifactId>org.argeo.server.json</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+
        </dependencies>
 </project>
\ No newline at end of file
diff --git a/security/eclipse/plugins/org.argeo.security.ui.application/SecureRCP.product b/security/eclipse/plugins/org.argeo.security.ui.application/SecureRCP.product
deleted file mode 100644 (file)
index 574dcc7..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="SecureRCP" application="org.argeo.security.ui.application.secureUi" useFeatures="false" includeLaunchers="true">
-
-   <configIni use="default">
-   </configIni>
-
-   <launcherArgs>
-      <programArgs>-console -clean</programArgs>
-      <vmArgs>-Dlog4j.configuration=file:${system_property:user.home}/dev/src/commons/security/eclipse/plugins/org.argeo.security.ui.application/log4j.properties</vmArgs>
-      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
-   </launcherArgs>
-
-   <launcher>
-      <solaris/>
-      <win useIco="false">
-         <bmp/>
-      </win>
-   </launcher>
-
-   <vm>
-   </vm>
-
-   <plugins>
-      <plugin id="com.ibm.icu"/>
-      <plugin id="com.springsource.antlr"/>
-      <plugin id="com.springsource.edu.emory.mathcs.backport"/>
-      <plugin id="com.springsource.javax.servlet"/>
-      <plugin id="com.springsource.javax.xml.stream"/>
-      <plugin id="com.springsource.jdbm"/>
-      <plugin id="com.springsource.junit"/>
-      <plugin id="com.springsource.org.aopalliance"/>
-      <plugin id="com.springsource.org.apache.commons.codec"/>
-      <plugin id="com.springsource.org.apache.commons.collections"/>
-      <plugin id="com.springsource.org.apache.commons.io"/>
-      <plugin id="com.springsource.org.apache.commons.lang"/>
-      <plugin id="com.springsource.org.apache.commons.pool"/>
-      <plugin id="com.springsource.org.apache.directory.server.changepw"/>
-      <plugin id="com.springsource.org.apache.directory.server.core" fragment="true"/>
-      <plugin id="com.springsource.org.apache.directory.server.core.shared"/>
-      <plugin id="com.springsource.org.apache.directory.server.jndi"/>
-      <plugin id="com.springsource.org.apache.directory.server.kerberos"/>
-      <plugin id="com.springsource.org.apache.directory.server.kerberos.shared"/>
-      <plugin id="com.springsource.org.apache.directory.server.ldap"/>
-      <plugin id="com.springsource.org.apache.directory.server.ntp"/>
-      <plugin id="com.springsource.org.apache.directory.server.protocol.shared"/>
-      <plugin id="com.springsource.org.apache.directory.shared.asn1"/>
-      <plugin id="com.springsource.org.apache.directory.shared.ldap"/>
-      <plugin id="com.springsource.org.apache.log4j"/>
-      <plugin id="com.springsource.org.apache.mina"/>
-      <plugin id="com.springsource.org.apache.ws.commons.schema"/>
-      <plugin id="com.springsource.org.codehaus.jackson"/>
-      <plugin id="com.springsource.org.codehaus.jackson.mapper"/>
-      <plugin id="com.springsource.slf4j.api"/>
-      <plugin id="com.springsource.slf4j.log4j" fragment="true"/>
-      <plugin id="com.springsource.slf4j.org.apache.commons.logging"/>
-      <plugin id="org.argeo.basic.nodeps"/>
-      <plugin id="org.argeo.dep.osgi.directory.shared.asn.codec" fragment="true"/>
-      <plugin id="org.argeo.dep.osgi.mina.filter.ssl" fragment="true"/>
-      <plugin id="org.argeo.dep.osgi.springframework.ldap"/>
-      <plugin id="org.argeo.eclipse.ui"/>
-      <plugin id="org.argeo.security.core"/>
-      <plugin id="org.argeo.security.equinox"/>
-      <plugin id="org.argeo.security.ldap"/>
-      <plugin id="org.argeo.security.manager.ldap"/>
-      <plugin id="org.argeo.security.services"/>
-      <plugin id="org.argeo.security.ui"/>
-      <plugin id="org.argeo.security.ui.application"/>
-      <plugin id="org.argeo.server.ads"/>
-      <plugin id="org.argeo.server.ads.server"/>
-      <plugin id="org.argeo.server.core"/>
-      <plugin id="org.argeo.server.json"/>
-      <plugin id="org.argeo.slc.demo.log4j" fragment="true"/>
-      <plugin id="org.eclipse.core.commands"/>
-      <plugin id="org.eclipse.core.contenttype"/>
-      <plugin id="org.eclipse.core.databinding"/>
-      <plugin id="org.eclipse.core.databinding.observable"/>
-      <plugin id="org.eclipse.core.databinding.property"/>
-      <plugin id="org.eclipse.core.expressions"/>
-      <plugin id="org.eclipse.core.jobs"/>
-      <plugin id="org.eclipse.core.runtime"/>
-      <plugin id="org.eclipse.equinox.app"/>
-      <plugin id="org.eclipse.equinox.common"/>
-      <plugin id="org.eclipse.equinox.preferences"/>
-      <plugin id="org.eclipse.equinox.registry"/>
-      <plugin id="org.eclipse.equinox.security"/>
-      <plugin id="org.eclipse.help"/>
-      <plugin id="org.eclipse.jface"/>
-      <plugin id="org.eclipse.jface.databinding"/>
-      <plugin id="org.eclipse.osgi"/>
-      <plugin id="org.eclipse.swt"/>
-      <plugin id="org.eclipse.swt.gtk.linux.x86_64" fragment="true"/>
-      <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
-      <plugin id="org.eclipse.ui"/>
-      <plugin id="org.eclipse.ui.forms"/>
-      <plugin id="org.eclipse.ui.workbench"/>
-      <plugin id="org.springframework.aop"/>
-      <plugin id="org.springframework.beans"/>
-      <plugin id="org.springframework.context"/>
-      <plugin id="org.springframework.core"/>
-      <plugin id="org.springframework.osgi.core"/>
-      <plugin id="org.springframework.osgi.extender"/>
-      <plugin id="org.springframework.osgi.io"/>
-      <plugin id="org.springframework.oxm"/>
-      <plugin id="org.springframework.security.core"/>
-      <plugin id="org.springframework.transaction"/>
-      <plugin id="org.springframework.web.servlet"/>
-      <plugin id="org.springframework.xml"/>
-   </plugins>
-
-   <configurations>
-      <plugin id="org.argeo.security.manager.ldap" autoStart="true" startLevel="0" />
-      <plugin id="org.argeo.security.services" autoStart="true" startLevel="0" />
-      <plugin id="org.argeo.security.ui" autoStart="true" startLevel="0" />
-      <plugin id="org.argeo.server.ads.server" autoStart="true" startLevel="0" />
-      <plugin id="org.eclipse.equinox.preferences" autoStart="true" startLevel="0" />
-      <plugin id="org.springframework.osgi.extender" autoStart="true" startLevel="0" />
-   </configurations>
-
-</product>
diff --git a/security/eclipse/plugins/org.argeo.security.ui.application/org.argeo.security.ui.application.product b/security/eclipse/plugins/org.argeo.security.ui.application/org.argeo.security.ui.application.product
new file mode 100644 (file)
index 0000000..be468c8
--- /dev/null
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product name="SecureRCP" application="org.argeo.security.ui.application.secureUi" useFeatures="false" includeLaunchers="true">
+
+   <configIni use="default">
+   </configIni>
+
+   <launcherArgs>
+      <programArgs>-console -clean</programArgs>
+      <vmArgs>-Dlog4j.configuration=file:${system_property:user.home}/dev/src/commons/security/eclipse/plugins/org.argeo.security.ui.application/log4j.properties</vmArgs>
+      <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
+   </launcherArgs>
+
+   <launcher>
+      <solaris/>
+      <win useIco="false">
+         <bmp/>
+      </win>
+   </launcher>
+
+   <vm>
+   </vm>
+
+   <plugins>
+      <plugin id="com.ibm.icu"/>
+      <plugin id="com.springsource.antlr"/>
+      <plugin id="com.springsource.edu.emory.mathcs.backport"/>
+      <plugin id="com.springsource.javax.servlet"/>
+      <plugin id="com.springsource.javax.xml.stream"/>
+      <plugin id="com.springsource.jdbm"/>
+      <plugin id="com.springsource.junit"/>
+      <plugin id="com.springsource.org.aopalliance"/>
+      <plugin id="com.springsource.org.apache.commons.codec"/>
+      <plugin id="com.springsource.org.apache.commons.collections"/>
+      <plugin id="com.springsource.org.apache.commons.io"/>
+      <plugin id="com.springsource.org.apache.commons.lang"/>
+      <plugin id="com.springsource.org.apache.commons.pool"/>
+      <plugin id="com.springsource.org.apache.directory.server.changepw"/>
+      <plugin id="com.springsource.org.apache.directory.server.core" fragment="true"/>
+      <plugin id="com.springsource.org.apache.directory.server.core.shared"/>
+      <plugin id="com.springsource.org.apache.directory.server.jndi"/>
+      <plugin id="com.springsource.org.apache.directory.server.kerberos"/>
+      <plugin id="com.springsource.org.apache.directory.server.kerberos.shared"/>
+      <plugin id="com.springsource.org.apache.directory.server.ldap"/>
+      <plugin id="com.springsource.org.apache.directory.server.ntp"/>
+      <plugin id="com.springsource.org.apache.directory.server.protocol.shared"/>
+      <plugin id="com.springsource.org.apache.directory.shared.asn1"/>
+      <plugin id="com.springsource.org.apache.directory.shared.ldap"/>
+      <plugin id="com.springsource.org.apache.log4j"/>
+      <plugin id="com.springsource.org.apache.mina"/>
+      <plugin id="com.springsource.org.apache.ws.commons.schema"/>
+      <plugin id="com.springsource.org.codehaus.jackson"/>
+      <plugin id="com.springsource.org.codehaus.jackson.mapper"/>
+      <plugin id="com.springsource.slf4j.api"/>
+      <plugin id="com.springsource.slf4j.log4j" fragment="true"/>
+      <plugin id="com.springsource.slf4j.org.apache.commons.logging"/>
+      <plugin id="org.argeo.basic.nodeps"/>
+      <plugin id="org.argeo.dep.osgi.directory.shared.asn.codec" fragment="true"/>
+      <plugin id="org.argeo.dep.osgi.mina.filter.ssl" fragment="true"/>
+      <plugin id="org.argeo.dep.osgi.springframework.ldap"/>
+      <plugin id="org.argeo.eclipse.ui"/>
+      <plugin id="org.argeo.security.core"/>
+      <plugin id="org.argeo.security.equinox"/>
+      <plugin id="org.argeo.security.ldap"/>
+      <plugin id="org.argeo.security.manager.ldap"/>
+      <plugin id="org.argeo.security.services"/>
+      <plugin id="org.argeo.security.ui"/>
+      <plugin id="org.argeo.security.ui.application"/>
+      <plugin id="org.argeo.server.ads"/>
+      <plugin id="org.argeo.server.ads.server"/>
+      <plugin id="org.argeo.server.core"/>
+      <plugin id="org.argeo.server.json"/>
+      <plugin id="org.argeo.slc.demo.log4j" fragment="true"/>
+      <plugin id="org.eclipse.core.commands"/>
+      <plugin id="org.eclipse.core.contenttype"/>
+      <plugin id="org.eclipse.core.databinding"/>
+      <plugin id="org.eclipse.core.databinding.observable"/>
+      <plugin id="org.eclipse.core.databinding.property"/>
+      <plugin id="org.eclipse.core.expressions"/>
+      <plugin id="org.eclipse.core.jobs"/>
+      <plugin id="org.eclipse.core.runtime"/>
+      <plugin id="org.eclipse.equinox.app"/>
+      <plugin id="org.eclipse.equinox.common"/>
+      <plugin id="org.eclipse.equinox.preferences"/>
+      <plugin id="org.eclipse.equinox.registry"/>
+      <plugin id="org.eclipse.equinox.security"/>
+      <plugin id="org.eclipse.help"/>
+      <plugin id="org.eclipse.jface"/>
+      <plugin id="org.eclipse.jface.databinding"/>
+      <plugin id="org.eclipse.osgi"/>
+      <plugin id="org.eclipse.swt"/>
+      <plugin id="org.eclipse.swt.gtk.linux.x86_64" fragment="true"/>
+      <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.ui"/>
+      <plugin id="org.eclipse.ui.forms"/>
+      <plugin id="org.eclipse.ui.workbench"/>
+      <plugin id="org.springframework.aop"/>
+      <plugin id="org.springframework.beans"/>
+      <plugin id="org.springframework.context"/>
+      <plugin id="org.springframework.core"/>
+      <plugin id="org.springframework.osgi.core"/>
+      <plugin id="org.springframework.osgi.extender"/>
+      <plugin id="org.springframework.osgi.io"/>
+      <plugin id="org.springframework.oxm"/>
+      <plugin id="org.springframework.security.core"/>
+      <plugin id="org.springframework.transaction"/>
+      <plugin id="org.springframework.web.servlet"/>
+      <plugin id="org.springframework.xml"/>
+   </plugins>
+
+   <configurations>
+      <plugin id="org.argeo.security.manager.ldap" autoStart="true" startLevel="0" />
+      <plugin id="org.argeo.security.services" autoStart="true" startLevel="0" />
+      <plugin id="org.argeo.server.ads.server" autoStart="true" startLevel="0" />
+      <plugin id="org.springframework.osgi.extender" autoStart="true" startLevel="0" />
+   </configurations>
+
+</product>
index e86c48750275bf998694c4a4b0328a188b134544..e66484841dc736e1eb4bf45ef7ea310807d86a32 100644 (file)
                </dependency>
 
                <!-- For testing and target platform generation -->
-               <dependency>
-                       <groupId>org.argeo.commons.server</groupId>
-                       <artifactId>org.argeo.server.ads.server</artifactId>
-                       <version>${version.argeo-commons}</version>
-                       <scope>test</scope>
-               </dependency>
+               <!--  LDAP server and security services -->
                <dependency>
                        <groupId>org.argeo.commons.security</groupId>
-                       <artifactId>org.argeo.security.services</artifactId>
+                       <artifactId>org.argeo.security.dep.ads</artifactId>
                        <version>${version.argeo-commons}</version>
-                       <scope>test</scope>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.commons.security</groupId>
-                       <artifactId>org.argeo.security.ldap</artifactId>
-                       <version>${version.argeo-commons}</version>
-                       <scope>test</scope>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.commons.security</groupId>
-                       <artifactId>org.argeo.security.manager.ldap</artifactId>
-                       <version>${version.argeo-commons}</version>
-                       <scope>test</scope>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.commons.server</groupId>
-                       <artifactId>org.argeo.server.ads</artifactId>
-                       <version>0.2.3-SNAPSHOT</version>
-                       <scope>test</scope>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.dep.osgi</groupId>
-                       <artifactId>org.argeo.dep.osgi.springframework.ldap</artifactId>
-                       <scope>test</scope>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.commons.basic</groupId>
-                       <artifactId>org.argeo.basic.dep.log4j</artifactId>
-                       <version>0.2.3-SNAPSHOT</version>
                        <type>pom</type>
                        <scope>test</scope>
                </dependency>
-               <dependency>
-                       <groupId>net.sourceforge.jdbm</groupId>
-                       <artifactId>com.springsource.jdbm</artifactId>
-                       <scope>test</scope>
-               </dependency>
        </dependencies>
 </project>
index 6ebf8f32f540d0bc1fe0ff5318557e659286f2c3..c2c33828083374433d17fb68dba0b1199f55f341 100644 (file)
@@ -3,7 +3,6 @@ additional.bundles = org.springframework.transaction,\
                      com.springsource.junit,\
                      com.springsource.org.apache.commons.io,\
                      com.springsource.org.codehaus.jackson,\
-                     com.springsource.json,\
                      com.springsource.org.apache.commons.codec,\
                      org.springframework.security.core,\
                      com.springsource.org.codehaus.jackson.mapper,\
diff --git a/security/runtime/org.argeo.security.core/src/test/java/org/argeo/security/json/ArgeoUserJsonTest.java b/security/runtime/org.argeo.security.core/src/test/java/org/argeo/security/json/ArgeoUserJsonTest.java
deleted file mode 100644 (file)
index 13db4c5..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
- *
- * 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.json;
-
-import java.io.StringWriter;
-import java.util.HashMap;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.security.ArgeoUser;
-import org.argeo.security.SimpleArgeoUser;
-import org.argeo.security.UserNature;
-import org.argeo.security.core.ArgeoUserDetails;
-import org.argeo.security.nature.CoworkerNature;
-import org.argeo.security.nature.SimpleUserNature;
-import org.argeo.server.json.JsonServerMapper;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.springframework.security.GrantedAuthority;
-import org.springframework.security.GrantedAuthorityImpl;
-
-import com.springsource.json.writer.JSONArray;
-import com.springsource.json.writer.JSONObject;
-
-public class ArgeoUserJsonTest extends TestCase {
-       private static Log log = LogFactory.getLog(ArgeoUserJsonTest.class);
-
-       public void testMapper() throws Exception {
-//             Map<String, UserNature> natures = new HashMap<String, UserNature>();
-//             SimpleUserNature sun = new SimpleUserNature();
-//             sun.setFirstName("Mickey");
-//             sun.setEmail("username@domain.com");
-//             natures.put("simple",sun);
-//             CoworkerNature cwn = new CoworkerNature();
-//             cwn.setMobile("+123456789");
-//             natures.put("coworker",cwn);
-//
-//             GrantedAuthority[] roles = { new GrantedAuthorityImpl("ROLE1"),
-//                             new GrantedAuthorityImpl("ROLE2") };
-//             ArgeoUserDetails argeoUserDetails = new ArgeoUserDetails("USER",
-//                             natures, "PASSWORD", roles);
-//
-//             SimpleArgeoUser argeoUser = new SimpleArgeoUser(argeoUserDetails);
-//
-//             StringWriter writer = new StringWriter();
-//
-//             JsonFactory jsonFactory = new JsonFactory();
-//             JsonGenerator jsonGenerator = jsonFactory.createJsonGenerator(writer);
-//             jsonGenerator.useDefaultPrettyPrinter();
-//
-//             ObjectMapper objectMapper = new ObjectMapper();
-//
-//             objectMapper.writeValue(jsonGenerator, argeoUser);
-//             String audJo = writer.toString();
-//
-//             log.info("audJo:\n" + audJo);
-//
-//             // BasicArgeoUser aud = objectMapper.readValue(audJo,
-//             // BasicArgeoUser.class);
-//
-//             JsonServerMapper mapper = JsonServerMapperTest.createJsonServerMapper();
-//             ArgeoUser aud = (ArgeoUser) mapper.deserialize(audJo);
-//
-//             assertEquals(argeoUser.getUsername(), aud.getUsername());
-//             assertEquals(argeoUser.getRoles().size(), aud.getRoles().size());
-//             assertEquals(argeoUser.getUserNatures().size(), aud.getUserNatures()
-//                             .size());
-//
-//             assertSimpleUserNature((SimpleUserNature) argeoUser.getUserNatures()
-//                             .get(0), (SimpleUserNature) aud.getUserNatures().get(0));
-//             assertCoworkerNature(
-//                             (CoworkerNature) argeoUser.getUserNatures().get(1),
-//                             (CoworkerNature) aud.getUserNatures().get(1));
-
-       }
-
-       public static void assertSimpleUserNature(SimpleUserNature expected,
-                       SimpleUserNature reached) {
-               assertEquals(expected.getEmail(), reached.getEmail());
-       }
-
-       public static void assertCoworkerNature(CoworkerNature expected,
-                       CoworkerNature reached) {
-               assertEquals(expected.getMobile(), reached.getMobile());
-       }
-
-       public void testSeriDeserialize() {
-//             Map<String, UserNature> natures = new HashMap<String, UserNature>();
-//             JSONArray naturesJo = new JSONArray();
-//
-//             SimpleUserNature sun = new SimpleUserNature();
-//             sun.setEmail("username@domain.com");
-//             natures.put("simple",sun);
-//             naturesJo.put(new JSONObject(sun));
-//
-//             CoworkerNature cwn = new CoworkerNature();
-//             cwn.setMobile("+123456789");
-//             natures.put("coworker",cwn);
-//             naturesJo.put(new JSONObject(cwn));
-//
-//             GrantedAuthority[] roles = { new GrantedAuthorityImpl("ROLE1"),
-//                             new GrantedAuthorityImpl("ROLE1") };
-//             ArgeoUserDetails argeoUserDetails = new ArgeoUserDetails("USER",
-//                             natures, "PASSWORD", roles);
-//
-//             JSONObject argeoUserDetailsJo = new JSONObject(argeoUserDetails);
-//             argeoUserDetailsJo.put("userNatures", naturesJo);
-//
-//             log.info("argeoUserDetailsJo=" + argeoUserDetailsJo.toString(2));
-
-               // JSONParser jsonParser = new JSONParser();
-               // ArgeoUserDetails argeoUserDetails = JSONParser
-       }
-}
diff --git a/security/runtime/org.argeo.security.core/src/test/java/org/argeo/security/json/JsonServerMapperTest.java b/security/runtime/org.argeo.security.core/src/test/java/org/argeo/security/json/JsonServerMapperTest.java
deleted file mode 100644 (file)
index d0e5533..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
- *
- * 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.json;
-
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.io.IOUtils;
-import org.argeo.security.ArgeoUser;
-import org.argeo.security.SimpleArgeoUser;
-import org.argeo.security.UserNature;
-import org.argeo.server.json.GenericJsonDeserializer;
-import org.argeo.server.json.JsonObjectFactoryImpl;
-import org.argeo.server.json.JsonServerMapper;
-
-public class JsonServerMapperTest extends TestCase {
-       public void testDeserialize() throws Exception {
-//             JsonServerMapper mapper = createJsonServerMapper();
-//
-//             Reader reader = null;
-//             try {
-//                     InputStream in = getClass().getResource(
-//                                     "/org/argeo/security/json/gandalf2.json").openStream();
-//                     reader = new InputStreamReader(in);
-//
-//                     ArgeoUser user = (ArgeoUser) mapper.deserialize(reader);
-//                     assertEquals("gandalf2", user.getUsername());
-//                     assertEquals(2, user.getRoles().size());
-//                     assertEquals(2, user.getUserNatures().size());
-//             } finally {
-//                     IOUtils.closeQuietly(reader);
-//             }
-       }
-
-       @SuppressWarnings("unchecked")
-       public static JsonServerMapper createJsonServerMapper() throws Exception {
-               JsonServerMapper mapper = new JsonServerMapper();
-               mapper.setTargetClass(SimpleArgeoUser.class);
-               GenericJsonDeserializer jsonDeserializer = new GenericJsonDeserializer();
-               jsonDeserializer.getObjectFactories().add(new JsonObjectFactoryImpl());
-               mapper.getDeserializers().put(UserNature.class, jsonDeserializer);
-               mapper.afterPropertiesSet();
-               return mapper;
-       }
-}
diff --git a/server/dep/.project b/server/dep/.project
deleted file mode 100644 (file)
index 6550fea..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.server.dep</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-       </buildSpec>
-       <natures>
-       </natures>
-</projectDescription>
index a7da2fd3697d5d02a0d817a9f14a0fe2676f271c..078400bcb8337d9d28697d8c9fba1be1c1c32ca4 100644 (file)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <parent>
                <groupId>org.argeo.commons.server</groupId>
                        <groupId>org.argeo.dep.osgi</groupId>
                        <artifactId>org.argeo.dep.osgi.activemq</artifactId>
                </dependency>
-               <dependency>
-                       <groupId>org.argeo.dep.osgi</groupId>
-                       <artifactId>org.argeo.dep.osgi.activemq.optional</artifactId>
-               </dependency>
                <dependency>
                        <groupId>org.apache.activemq</groupId>
                        <artifactId>com.springsource.org.apache.activemq.pool</artifactId>
                        <groupId>javax.xml.rpc</groupId>
                        <artifactId>com.springsource.javax.xml.rpc</artifactId>
                </dependency>
+
+               <!-- Test OSGi -->
+               <dependency>
+                       <groupId>org.argeo.commons.server</groupId>
+                       <artifactId>org.argeo.server.dep.javax</artifactId>
+                       <version>${version.argeo-commons}</version>
+                       <type>pom</type>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>javax.servlet</groupId>
+                       <artifactId>com.springsource.javax.servlet</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.xmlcommons</groupId>
+                       <artifactId>com.springsource.org.apache.xmlcommons</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.xalan</groupId>
+                       <artifactId>com.springsource.org.apache.xalan</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework</groupId>
+                       <artifactId>org.springframework.beans</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework</groupId>
+                       <artifactId>org.springframework.context</artifactId>
+                       <scope>test</scope>
+               </dependency>
+
+               <!-- For Active MQ optional -->
+               <dependency>
+                       <groupId>org.argeo.dep.osgi</groupId>
+                       <artifactId>org.argeo.dep.osgi.activemq.optional</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.commons</groupId>
+                       <artifactId>com.springsource.org.apache.commons.collections</artifactId>
+                       <scope>test</scope>
+               </dependency>
                <dependency>
-                       <groupId>javax.xml.soap</groupId>
-                       <artifactId>com.springsource.javax.xml.soap</artifactId>
+                       <groupId>org.springframework.ws</groupId>
+                       <artifactId>org.springframework.oxm</artifactId>
+                       <scope>test</scope>
                </dependency>
                <dependency>
-                       <groupId>javax.activation</groupId>
-                       <artifactId>com.springsource.javax.activation</artifactId>
+                       <groupId>org.springframework.ws</groupId>
+                       <artifactId>org.springframework.xml</artifactId>
+                       <scope>test</scope>
                </dependency>
        </dependencies>
 </project>
\ No newline at end of file
index 84338825a0667f6ca7119980e8873803b2fa876b..9ee053ea7d8e897ce318013242e4d19a1b1a11bb 100644 (file)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <parent>
                <groupId>org.argeo.commons.server</groupId>
@@ -9,35 +10,6 @@
        <artifactId>org.argeo.server.dep.jackrabbit.server</artifactId>
        <packaging>pom</packaging>
        <name>Dep Jack Rabbit Server</name>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.argeo.maven.plugins</groupId>
-                               <artifactId>maven-argeo-osgi-plugin</artifactId>
-                               <version>${version.maven-argeo-osgi}</version>
-                               <executions>
-                                       <execution>
-                                               <id>check-osgi</id>
-                                               <phase>test</phase>
-                                               <goals>
-                                                       <goal>equinox</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <useDependencies>true</useDependencies>
-                                                       <onlyCheck>true</onlyCheck>
-                                                       <argsToAppend>
-                                                               <arg>-clean</arg>
-                                                       </argsToAppend>
-                                                       <systemProperties>
-                                                               <!-- Make sure that no bundle will be started -->
-                                                               <argeo.osgi.start>XXX</argeo.osgi.start>
-                                                       </systemProperties>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
-               </plugins>
-       </build>
        <dependencies>
                <dependency>
                        <groupId>org.argeo.dep.osgi</groupId>
                        <artifactId>com.springsource.org.xmlpull</artifactId>
                </dependency>
 
-               <!-- OSGi test -->
+               <!-- Test with Javax -->
                <dependency>
-                       <groupId>org.argeo.commons.osgi</groupId>
-                       <artifactId>org.argeo.osgi.boot</artifactId>
-                       <version>0.2.3-SNAPSHOT</version>
-                       <scope>test</scope>
-               </dependency>
-               <dependency>
-                       <groupId>javax.xml.stream</groupId>
-                       <artifactId>com.springsource.javax.xml.stream</artifactId>
+                       <groupId>org.argeo.commons.server</groupId>
+                       <artifactId>org.argeo.server.dep.javax</artifactId>
+                       <version>${version.argeo-commons}</version>
+                       <type>pom</type>
                        <scope>test</scope>
                </dependency>
                <dependency>
diff --git a/server/dep/org.argeo.server.dep.javax/pom.xml b/server/dep/org.argeo.server.dep.javax/pom.xml
new file mode 100644 (file)
index 0000000..ce32cdb
--- /dev/null
@@ -0,0 +1,44 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <parent>
+               <groupId>org.argeo.commons.server</groupId>
+               <version>0.2.3-SNAPSHOT</version>
+               <artifactId>dep</artifactId>
+               <relativePath>..</relativePath>
+       </parent>
+       <artifactId>org.argeo.server.dep.javax</artifactId>
+       <packaging>pom</packaging>
+       <name>Dep Javax</name>
+       <description>Component provided by Java 6</description>
+       <dependencies>
+               <dependency>
+                       <groupId>javax.activation</groupId>
+                       <artifactId>com.springsource.javax.activation</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>javax.annotation</groupId>
+                       <artifactId>com.springsource.javax.annotation</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>javax.transaction</groupId>
+                       <artifactId>com.springsource.javax.transaction</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>javax.xml.stream</groupId>
+                       <artifactId>com.springsource.javax.xml.stream</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>javax.xml.bind</groupId>
+                       <artifactId>com.springsource.javax.xml.bind</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>javax.xml.soap</groupId>
+                       <artifactId>com.springsource.javax.xml.soap</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>javax.xml.ws</groupId>
+                       <artifactId>com.springsource.javax.xml.ws</artifactId>
+               </dependency>
+       </dependencies>
+</project>
\ No newline at end of file
index 535ef108b743af43bdc8aabc9a2bdc8ded37668e..8aab7db73a945dcd84ddfd79e89f8f1549f0a750 100644 (file)
                        <type>pom</type>
                </dependency>
 
+               <!-- Modules -->
+               <dependency>
+                       <groupId>org.argeo.commons.server</groupId>
+                       <artifactId>org.argeo.server.catalina</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.commons.server</groupId>
+                       <artifactId>org.argeo.server.tomcat</artifactId>
+                       <version>${version.argeo-commons}</version>
+               </dependency>
+
                <!-- JEE -->
                <dependency>
                        <groupId>javax.servlet</groupId>
                        <artifactId>com.springsource.org.apache.el</artifactId>
                </dependency>
 
+               <!-- Test with Javax -->
+               <dependency>
+                       <groupId>org.argeo.commons.server</groupId>
+                       <artifactId>org.argeo.server.dep.javax</artifactId>
+                       <version>${version.argeo-commons}</version>
+                       <type>pom</type>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.xmlcommons</groupId>
+                       <artifactId>com.springsource.org.apache.xmlcommons</artifactId>
+                       <scope>test</scope>
+               </dependency>
        </dependencies>
 </project>
\ No newline at end of file
index f8b39a33a1d5abf78899da0e599e343ab1bc6393..ada33bfa37f05e04e7a1dcaa221658382c16bdba 100644 (file)
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <parent>
                <groupId>org.argeo.commons</groupId>
        <name>Commons Server Dependencies</name>
        <packaging>pom</packaging>
        <modules>
+               <module>org.argeo.server.dep.javax</module>
                <module>org.argeo.server.dep.tomcat</module>
                <module>org.argeo.server.dep.ads</module>
                <module>org.argeo.server.dep.hibernate</module>
                <module>org.argeo.server.dep.jackrabbit.server</module>
                <module>org.argeo.server.dep.activemq</module>
        </modules>
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.argeo.maven.plugins</groupId>
+                               <artifactId>maven-argeo-osgi-plugin</artifactId>
+                               <version>${version.maven-argeo-osgi}</version>
+                               <executions>
+                                       <execution>
+                                               <id>check-osgi</id>
+                                               <phase>test</phase>
+                                               <goals>
+                                                       <goal>equinox</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <onlyCheck>true</onlyCheck>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+               </plugins>
+       </build>
+       <dependencies>
+               <!-- OSGi test -->
+               <dependency>
+                       <groupId>org.argeo.commons.osgi</groupId>
+                       <artifactId>org.argeo.osgi.boot</artifactId>
+                       <version>0.2.3-SNAPSHOT</version>
+                       <scope>test</scope>
+               </dependency>
+       </dependencies>
 </project>
\ No newline at end of file
index a2822ad477264aac5036398640a540deda4c4337..68ba7592b58a00de9bf9b88a7a37dc33fd01c946 100644 (file)
@@ -23,7 +23,7 @@
        <!-- Remoting -->
        <servlet>
                <servlet-name>remoting</servlet-name>
-               <servlet-class>org.argeo.server.jackrabbit.webdav.ExtendedDispatcherServlet</servlet-class>
+               <servlet-class>org.argeo.jackrabbit.remote.ExtendedDispatcherServlet</servlet-class>
                <init-param>
                        <param-name>contextClass</param-name>
                        <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
index 4eeae22b9d0a25e8d89b5f518ff06c70d6415985..346da2e086b9fe06b73142ac57f9ba7d86d02177 100644 (file)
                                <configuration>
                                        <instructions>
                                                <Export-Package>
-                                                       org.argeo.jcr.*,
-                                                       org.argeo.server.jackrabbit.*,
-                                                       org.argeo.server.jcr.*
+                                                       org.argeo.jackrabbit.*,
                                                </Export-Package>
                                                <Import-Package>
                                                        org.xml.sax;version="0.0.0",
+                                                       org.apache.jackrabbit.webdav.jcr,
                                                        org.springframework.security.providers.jaas;resolution:="optional",
                                                        junit.framework;resolution:="optional",
                                                        *
diff --git a/server/runtime/org.argeo.server.jackrabbit/src/main/java/org/argeo/jackrabbit/remote/JcrRemotingHandlerMapping.java b/server/runtime/org.argeo.server.jackrabbit/src/main/java/org/argeo/jackrabbit/remote/JcrRemotingHandlerMapping.java
new file mode 100644 (file)
index 0000000..195a41d
--- /dev/null
@@ -0,0 +1,24 @@
+package org.argeo.jackrabbit.remote;
+
+import java.util.Properties;
+
+import javax.jcr.Repository;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+
+import org.apache.jackrabbit.webdav.jcr.JCRWebdavServerServlet;
+
+public class JcrRemotingHandlerMapping extends MultipleRepositoryHandlerMapping {
+       protected HttpServlet createServlet(Repository repository, String pathPrefix)
+                       throws ServletException {
+               JcrRemotingServlet jcrRemotingServlet = new JcrRemotingServlet(
+                               repository);
+               Properties initParameters = new Properties();
+               initParameters.setProperty(
+                               JCRWebdavServerServlet.INIT_PARAM_RESOURCE_PATH_PREFIX,
+                               pathPrefix);
+               jcrRemotingServlet.init(new DelegatingServletConfig(pathPrefix.replace(
+                               '/', '_'), initParameters));
+               return jcrRemotingServlet;
+       }
+}
index ae3ede74243d786916651f7b05e0a7c38e341c19..12cff99e282c96311e2ca43a94d41e3a694ad0a0 100644 (file)
@@ -12,7 +12,6 @@ import javax.servlet.http.HttpServletRequest;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.jackrabbit.webdav.jcr.JCRWebdavServerServlet;
 import org.argeo.ArgeoException;
 import org.argeo.jcr.RepositoryRegister;
 import org.springframework.beans.BeansException;
@@ -23,8 +22,8 @@ import org.springframework.web.context.ServletContextAware;
 import org.springframework.web.servlet.HandlerExecutionChain;
 import org.springframework.web.servlet.HandlerMapping;
 
-public class MultipleRepositoryHandlerMapping implements HandlerMapping,
-               ApplicationContextAware, ServletContextAware {
+public abstract class MultipleRepositoryHandlerMapping implements
+               HandlerMapping, ApplicationContextAware, ServletContextAware {
        private final static Log log = LogFactory
                        .getLog(MultipleRepositoryHandlerMapping.class);
 
@@ -33,6 +32,10 @@ public class MultipleRepositoryHandlerMapping implements HandlerMapping,
 
        private RepositoryRegister repositoryRegister;
 
+       /** Actually creates the servlet to be registered. */
+       protected abstract HttpServlet createServlet(Repository repository,
+                       String pathPrefix) throws ServletException;
+
        public HandlerExecutionChain getHandler(HttpServletRequest request)
                        throws Exception {
                if (log.isTraceEnabled()) {
@@ -58,19 +61,6 @@ public class MultipleRepositoryHandlerMapping implements HandlerMapping,
                return new HandlerExecutionChain(remotingServlet);
        }
 
-       protected HttpServlet createServlet(Repository repository, String pathPrefix)
-                       throws ServletException {
-               JcrRemotingServlet jcrRemotingServlet = new JcrRemotingServlet(
-                               repository);
-               Properties initParameters = new Properties();
-               initParameters.setProperty(
-                               JCRWebdavServerServlet.INIT_PARAM_RESOURCE_PATH_PREFIX,
-                               pathPrefix);
-               jcrRemotingServlet.init(new DelegatingServletConfig(pathPrefix.replace(
-                               '/', '_'), initParameters));
-               return jcrRemotingServlet;
-       }
-
        /** The repository name is the first part of the path info */
        protected String extractRepositoryName(HttpServletRequest request) {
                String pathInfo = request.getPathInfo();
@@ -103,7 +93,7 @@ public class MultipleRepositoryHandlerMapping implements HandlerMapping,
                this.repositoryRegister = repositoryRegister;
        }
 
-       private class DelegatingServletConfig implements ServletConfig {
+       protected class DelegatingServletConfig implements ServletConfig {
                private String name;
                private Properties initParameters;
 
@@ -125,6 +115,7 @@ public class MultipleRepositoryHandlerMapping implements HandlerMapping,
                        return initParameters.getProperty(paramName);
                }
 
+               @SuppressWarnings("rawtypes")
                public Enumeration getInitParameterNames() {
                        return initParameters.keys();
                }
index e1500a83b9df460a083135e3c941f43e83ed67e9..02a4363d916f53b8121edcbd7c0a30305ae6d3b4 100644 (file)
                </plugins>
        </build>
        <dependencies>
+               <dependency>
+                       <groupId>org.argeo.commons.server</groupId>
+                       <artifactId>org.argeo.server.jcr</artifactId>
+                       <version>0.2.3-SNAPSHOT</version>
+               </dependency>
+
                <dependency>
                        <groupId>org.argeo.dep.osgi</groupId>
                        <artifactId>org.argeo.dep.osgi.modeshape</artifactId>