exo-jcr SVN: r5648 - in jcr/branches/1.15.x/applications: exo.jcr.applications.jboss and 12 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2012-02-16 02:31:26 -0500 (Thu, 16 Feb 2012)
New Revision: 5648
Modified:
jcr/branches/1.15.x/applications/exo.jcr.applications.config/pom.xml
jcr/branches/1.15.x/applications/exo.jcr.applications.jboss/pom.xml
jcr/branches/1.15.x/applications/exo.jcr.applications.jetty/pom.xml
jcr/branches/1.15.x/applications/exo.jcr.applications.jonas/pom.xml
jcr/branches/1.15.x/applications/exo.jcr.applications.tomcat/pom.xml
jcr/branches/1.15.x/applications/exo.jcr.ear/pom.xml
jcr/branches/1.15.x/applications/product-patches/as/jboss/bin/run.conf
jcr/branches/1.15.x/applications/product-patches/as/jboss/bin/run.conf.bat
jcr/branches/1.15.x/applications/product-patches/as/jboss/exo-readme.txt
jcr/branches/1.15.x/applications/product-patches/as/jetty/eXo.bat
jcr/branches/1.15.x/applications/product-patches/as/jetty/eXo.sh
jcr/branches/1.15.x/applications/product-patches/as/jetty/exo-readme.txt
jcr/branches/1.15.x/applications/product-patches/as/jonas/bin/nt/jonas.bat
jcr/branches/1.15.x/applications/product-patches/as/jonas/bin/unix/jonas
jcr/branches/1.15.x/applications/product-patches/as/jonas/exo-readme.txt
jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo.bat
jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo.sh
jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo_debug.bat
jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo_debug.sh
jcr/branches/1.15.x/applications/product-patches/as/tomcat/exo-readme.txt
Log:
EXOJCR-1764: AS deployment cleanup
Modified: jcr/branches/1.15.x/applications/exo.jcr.applications.config/pom.xml
===================================================================
--- jcr/branches/1.15.x/applications/exo.jcr.applications.config/pom.xml 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/exo.jcr.applications.config/pom.xml 2012-02-16 07:31:26 UTC (rev 5648)
@@ -29,6 +29,11 @@
<artifactId>exo.jcr.applications.config</artifactId>
<packaging>pom</packaging>
<name>eXo JCR :: Applications :: Config</name>
+
+ <properties>
+ <exo.deploy.profile>jbc</exo.deploy.profile>
+ </properties>
+
<dependencies>
<dependency>
<groupId>org.exoplatform.jcr</groupId>
@@ -100,6 +105,10 @@
<version>${project.version}</version>
</dependency>
</dependencies>
+
+ <properties>
+ <exo.deploy.profile>ispn</exo.deploy.profile>
+ </properties>
</profile>
</profiles>
</project>
Modified: jcr/branches/1.15.x/applications/exo.jcr.applications.jboss/pom.xml
===================================================================
--- jcr/branches/1.15.x/applications/exo.jcr.applications.jboss/pom.xml 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/exo.jcr.applications.jboss/pom.xml 2012-02-16 07:31:26 UTC (rev 5648)
@@ -127,6 +127,10 @@
<copy todir="${exo.projects.directory.working}/exo-jboss/bin/" verbose="true" overwrite="true">
<fileset dir="${basedir}/../product-patches/as/jboss/bin/" includes="*.*" />
</copy>
+
+ <replace dir="${exo.projects.directory.working}/exo-jboss/bin" token="-Dexo.profiles=jbc" value="-Dexo.profiles=${exo.deploy.profile}"/>
+ <move file="${exo.projects.directory.working}/exo-jboss/bin/run.bat" tofile="${exo.projects.directory.working}/exo-jboss/bin/run-${exo.deploy.profile}.bat" />
+ <move file="${exo.projects.directory.working}/exo-jboss/bin/run.sh" tofile="${exo.projects.directory.working}/exo-jboss/bin/run-${exo.deploy.profile}.sh" />
</tasks>
</configuration>
</plugin>
Modified: jcr/branches/1.15.x/applications/exo.jcr.applications.jetty/pom.xml
===================================================================
--- jcr/branches/1.15.x/applications/exo.jcr.applications.jetty/pom.xml 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/exo.jcr.applications.jetty/pom.xml 2012-02-16 07:31:26 UTC (rev 5648)
@@ -121,6 +121,13 @@
<copy todir="${exo.projects.directory.working}/exo-jetty/" verbose="true" overwrite="true">
<fileset dir="${basedir}/../product-patches/as/jetty/" />
</copy>
+ <replace dir="${exo.projects.directory.working}/exo-jetty" token="@exo.deploy.profile@" value="${exo.deploy.profile}"/>
+ <move todir="${exo.projects.directory.working}/exo-jetty/">
+ <fileset dir="${exo.projects.directory.working}/exo-jetty/">
+ <include name="**/eXo.*" />
+ </fileset>
+ <globmapper from="eXo.*" to="eXo-${exo.deploy.profile}.*" />
+ </move>
<chmod dir="${exo.projects.directory.working}/exo-jetty" perm="+x" includes="*.sh" />
<move todir="${basedir}/target/lib-binary.dir/">
<fileset dir="${basedir}/target/lib-binary.dir/">
Modified: jcr/branches/1.15.x/applications/exo.jcr.applications.jonas/pom.xml
===================================================================
--- jcr/branches/1.15.x/applications/exo.jcr.applications.jonas/pom.xml 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/exo.jcr.applications.jonas/pom.xml 2012-02-16 07:31:26 UTC (rev 5648)
@@ -157,8 +157,11 @@
<!-- Copying patch directory -->
<copy todir="${exo.projects.directory.working}/exo-jonas/" verbose="true" overwrite="true">
- <fileset dir="${basedir}/../product-patches/as/jonas/" />
+ <fileset dir="${basedir}/../product-patches/as/jonas/" />
</copy>
+ <replace dir="${exo.projects.directory.working}/exo-jonas/" token="@exo.deploy.profile@" value="${exo.deploy.profile}"/>
+ <move file="${exo.projects.directory.working}/exo-jonas/bin/nt/jonas.bat" tofile="${exo.projects.directory.working}/exo-jonas/bin/nt/jonas-${exo.deploy.profile}.bat" />
+ <move file="${exo.projects.directory.working}/exo-jonas/bin/unix/jonas" tofile="${exo.projects.directory.working}/exo-jonas/bin/unix/jonas-${exo.deploy.profile}" />
<!-- Coping wars, rar -->
<copy todir="${exo.projects.directory.working}/exo-jonas/apps/autoload/exoplatform.ear" verbose="true" overwrite="true">
Modified: jcr/branches/1.15.x/applications/exo.jcr.applications.tomcat/pom.xml
===================================================================
--- jcr/branches/1.15.x/applications/exo.jcr.applications.tomcat/pom.xml 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/exo.jcr.applications.tomcat/pom.xml 2012-02-16 07:31:26 UTC (rev 5648)
@@ -122,6 +122,14 @@
<copy todir="${exo.projects.directory.working}/exo-tomcat/" verbose="true" overwrite="true">
<fileset dir="${basedir}/../product-patches/as/tomcat/" />
</copy>
+ <replace dir="${exo.projects.directory.working}/exo-tomcat/bin" token="@exo.deploy.profile@" value="${exo.deploy.profile}"/>
+ <move todir="${exo.projects.directory.working}/exo-tomcat/bin/">
+ <fileset dir="${exo.projects.directory.working}/exo-tomcat/bin/">
+ <include name="**/eXo.*" />
+ </fileset>
+ <globmapper from="eXo.*" to="eXo-${exo.deploy.profile}.*" />
+ </move>
+
<chmod dir="${exo.projects.directory.working}/exo-tomcat/bin" perm="+x" includes="*.sh" />
<move todir="${basedir}/target/lib-binary.dir/">
Modified: jcr/branches/1.15.x/applications/exo.jcr.ear/pom.xml
===================================================================
--- jcr/branches/1.15.x/applications/exo.jcr.ear/pom.xml 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/exo.jcr.ear/pom.xml 2012-02-16 07:31:26 UTC (rev 5648)
@@ -29,9 +29,13 @@
<artifactId>exo.jcr.ear</artifactId>
<packaging>ear</packaging>
<name>eXo JCR :: EAR</name>
+
<properties>
<enforcer.skip>true</enforcer.skip>
+ <exo.deploy.profile>jbc</exo.deploy.profile>
</properties>
+
+
<dependencies>
<dependency>
<groupId>org.exoplatform.jcr</groupId>
@@ -128,6 +132,10 @@
<version>${project.version}</version>
</dependency>
</dependencies>
+
+ <properties>
+ <exo.deploy.profile>jbc</exo.deploy.profile>
+ </properties>
</profile>
</profiles>
<build>
Modified: jcr/branches/1.15.x/applications/product-patches/as/jboss/bin/run.conf
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jboss/bin/run.conf 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/product-patches/as/jboss/bin/run.conf 2012-02-16 07:31:26 UTC (rev 5648)
@@ -52,11 +52,4 @@
#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_shmem,address=jboss,server=y,suspend=n"
# Add the eXo variables
-EXO_PROFILES="-Dexo.profiles="
-if [ "$1" = "jbc" ] || [ "$1" = "ispn" ]; then
- EXO_PROFILES="$EXO_PROFILES,$1"
- shift 1
-else
- EXO_PROFILES="$EXO_PROFILES,jbc"
-fi
-JAVA_OPTS="$JAVA_OPTS $EXO_PROFILES -Dexo.jcr.parent.dir=../server/default/data"
+JAVA_OPTS="$JAVA_OPTS -Dexo.profiles=jbc -Dexo.jcr.parent.dir=../server/default/data"
Modified: jcr/branches/1.15.x/applications/product-patches/as/jboss/bin/run.conf.bat
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jboss/bin/run.conf.bat 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/product-patches/as/jboss/bin/run.conf.bat 2012-02-16 07:31:26 UTC (rev 5648)
@@ -55,22 +55,6 @@
rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_shmem,address=jboss,server=y,suspend=n"
rem # Add the eXo variables
+set "JAVA_OPTS=%JAVA_OPTS% -Dexo.profiles=jbc -Dexo.jcr.parent.dir=../server/default/data"
-set EXO_PROFILES=-Dexo.profiles=
-if ""%1"" == ""jbc"" goto profile
-if ""%1"" == ""ispn"" goto profile
-goto default_profile
-
-:profile
-set EXO_PROFILES=%EXO_PROFILES%,%1
-shift
-goto endif
-
-:default_profile
-set EXO_PROFILES=%EXO_PROFILES%,jbc
-goto endif
-
-:endif
-set "JAVA_OPTS=%JAVA_OPTS% %EXO_PROFILES% -Dexo.jcr.parent.dir=../server/default/data"
-
:JAVA_OPTS_SET
Modified: jcr/branches/1.15.x/applications/product-patches/as/jboss/exo-readme.txt
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jboss/exo-readme.txt 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/product-patches/as/jboss/exo-readme.txt 2012-02-16 07:31:26 UTC (rev 5648)
@@ -4,12 +4,10 @@
In Unix environment
-* "./run.sh" to launch eXo JCR with the default configuration
-* "./run.sh ispn" to launch eXo JCR with the configuration for Infinispan
-* "./run.sh jbc" to launch eXo JCR with the configuration for JBoss Cache
+* "./run-ispn.sh" to launch eXo JCR with the configuration for Infinispan
+* "./run-jbc.sh" to launch eXo JCR with the configuration for JBoss Cache
In Windows environment
-* "run.bat" to launch eXo JCR with the default configuration
-* "run.bat ispn" to launch eXo JCR with the configuration for Infinispan
-* "run.bat jbc" to launch eXo JCR with the configuration for JBoss Cache
+* "run-ispn.bat" to launch eXo JCR with the configuration for Infinispan
+* "run-jbc.bat" to launch eXo JCR with the configuration for JBoss Cache
Modified: jcr/branches/1.15.x/applications/product-patches/as/jetty/eXo.bat
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jetty/eXo.bat 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/product-patches/as/jetty/eXo.bat 2012-02-16 07:31:26 UTC (rev 5648)
@@ -1,17 +1 @@
-set EXO_PROFILES=-Dexo.profiles=
-if ""%1"" == ""jbc"" goto profile
-if ""%1"" == ""ispn"" goto profile
-goto default_profile
-
-:profile
-set EXO_PROFILES=%EXO_PROFILES%,%1
-shift
-goto endif
-
-:default_profile
-set EXO_PROFILES=%EXO_PROFILES%,jbc
-goto endif
-
-:endif
-
-java -Djava.security.auth.login.config=jaas.conf %EXO_PROFILES% -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=. -jar start.jar
+java -Djava.security.auth.login.config=jaas.conf -Dexo.profiles=(a)exo.deploy.profile@ -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=. -jar start.jar
Modified: jcr/branches/1.15.x/applications/product-patches/as/jetty/eXo.sh
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jetty/eXo.sh 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/product-patches/as/jetty/eXo.sh 2012-02-16 07:31:26 UTC (rev 5648)
@@ -1,10 +1 @@
-EXO_PROFILES="-Dexo.profiles="
-if [ "$1" = "jbc" ] || [ "$1" = "ispn" ]; then
- EXO_PROFILES="$EXO_PROFILES,$1"
- shift 1
-else
- EXO_PROFILES="$EXO_PROFILES,jbc"
-fi
-EXO_OPTS="-Dexo.product.developing=true $EXO_PROFILES -Djava.net.preferIPv4Stack=true"
-
-java -Djava.security.auth.login.config=jaas.conf $EXO_PROFILES -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=. -jar start.jar
+java -Djava.security.auth.login.config=jaas.conf -Dexo.profiles=(a)exo.deploy.profile@ -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=. -jar start.jar
Modified: jcr/branches/1.15.x/applications/product-patches/as/jetty/exo-readme.txt
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jetty/exo-readme.txt 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/product-patches/as/jetty/exo-readme.txt 2012-02-16 07:31:26 UTC (rev 5648)
@@ -4,12 +4,10 @@
In Unix environment
-* "./eXo.sh" to launch eXo JCR with the default configuration
-* "./eXo.sh ispn" to launch eXo JCR with the configuration for Infinispan
-* "./eXo.sh jbc" to launch eXo JCR with the configuration for JBoss Cache
+* "./eXo-ispn.sh" to launch eXo JCR with the configuration for Infinispan
+* "./eXo-jbc.sh" to launch eXo JCR with the configuration for JBoss Cache
In Windows environment
-* "eXo.bat" to launch eXo JCR with the default configuration
-* "eXo.bat ispn" to launch eXo JCR with the configuration for Infinispan
-* "eXo.bat jbc" to launch eXo JCR with the configuration for JBoss Cache
+* "eXo-ispn.bat" to launch eXo JCR with the configuration for Infinispan
+* "eXo-jbc.bat" to launch eXo JCR with the configuration for JBoss Cache
Modified: jcr/branches/1.15.x/applications/product-patches/as/jonas/bin/nt/jonas.bat
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jonas/bin/nt/jonas.bat 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/product-patches/as/jonas/bin/nt/jonas.bat 2012-02-16 07:31:26 UTC (rev 5648)
@@ -80,25 +80,9 @@
Rem ----------------------- Begin eXo configuration ----------------------------
cd %JONAS_ROOT%/bin
+set JONAS_OPTS=%JONAS_OPTS% -Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog -Djava.awt.headless=true -Dexo.profiles=(a)exo.deploy.profile@ -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=../..
+set JAVA_OPTS=%JAVA_OPTS% -Xmx512M
-set EXO_PROFILES=-Dexo.profiles=
-if ""%1"" == ""jbc"" goto profile
-if ""%1"" == ""ispn"" goto profile
-goto default_profile
-
-:profile
-set EXO_PROFILES=%EXO_PROFILES%,%1
-shift
-goto endif
-
-:default_profile
-set EXO_PROFILES=%EXO_PROFILES%,jbc
-goto endif
-
-:endif
-set JONAS_OPTS=%JONAS_OPTS% -Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog -Djava.awt.headless=true %EXO_PROFILES% -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=../..
-
-
Rem ------------------------ End eXo configuration -----------------------------
Rem ---------------------------------------------
Modified: jcr/branches/1.15.x/applications/product-patches/as/jonas/bin/unix/jonas
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jonas/bin/unix/jonas 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/product-patches/as/jonas/bin/unix/jonas 2012-02-16 07:31:26 UTC (rev 5648)
@@ -79,18 +79,8 @@
# ------------------------- Begin eXo configuration ----------------------------
cd $JONAS_ROOT/bin
-
-EXO_PROFILES="-Dexo.profiles="
-if [ "$1" = "jbc" ] || [ "$1" = "ispn" ]; then
- EXO_PROFILES="$EXO_PROFILES,$1"
- shift
-else
- EXO_PROFILES="$EXO_PROFILES,jbc"
-fi
-EXO_OPTS="-Dexo.product.developing=true $EXO_PROFILES -Djava.net.preferIPv4Stack=true"
-
-JONAS_OPTS="$JONAS_OPTS -Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog -Djava.awt.headless=true $EXO_PROFILES -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=.."
-
+JONAS_OPTS="$JONAS_OPTS -Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog -Djava.awt.headless=true -Dexo.profiles=(a)exo.deploy.profile@ -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=.."
+JAVA_OPTS="$JAVA_OPTS -Xmx512M"
# -------------------------- End eXo configuration -----------------------------
Modified: jcr/branches/1.15.x/applications/product-patches/as/jonas/exo-readme.txt
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/jonas/exo-readme.txt 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/product-patches/as/jonas/exo-readme.txt 2012-02-16 07:31:26 UTC (rev 5648)
@@ -2,12 +2,10 @@
In Unix environment, go in the directory bin/unix then execute the following command:
-* "./jonas start" to launch eXo JCR with the default configuration
-* "./jonas ispn start" to launch eXo JCR with the configuration for Infinispan
-* "./jonas jbc start" to launch eXo JCR with the configuration for JBoss Cache
+* "./jonas-ispn start" to launch eXo JCR with the configuration for Infinispan
+* "./jonas-jbc start" to launch eXo JCR with the configuration for JBoss Cache
In Windows environment, go in the directory bin\nt then execute the following command:
-* "jonas.bat start" to launch eXo JCR with the default configuration
-* "jonas.bat ispn start" to launch eXo JCR with the configuration for Infinispan
-* "jonas.bat jbc start" to launch eXo JCR with the configuration for JBoss Cache
+* "jonas-ispn.bat start" to launch eXo JCR with the configuration for Infinispan
+* "jonas-jbc.bat start" to launch eXo JCR with the configuration for JBoss Cache
Modified: jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo.bat
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo.bat 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo.bat 2012-02-16 07:31:26 UTC (rev 5648)
@@ -8,23 +8,7 @@
rem Sets some variables
set LOG_OPTS="-Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog"
set SECURITY_OPTS="-Djava.security.auth.login.config=%TOMCAT_HOME%\conf\jaas.conf"
-
-set EXO_PROFILES=-Dexo.profiles=
-if ""%1"" == ""jbc"" goto profile
-if ""%1"" == ""ispn"" goto profile
-goto default_profile
-
-:profile
-set EXO_PROFILES=%EXO_PROFILES%,%1
-shift
-goto endif
-
-:default_profile
-set EXO_PROFILES=%EXO_PROFILES%,jbc
-goto endif
-
-:endif
-set EXO_OPTS=-Dexo.product.developing=true %EXO_PROFILES% -Djava.net.preferIPv4Stack=true
+set EXO_OPTS=-Dexo.product.developing=true -Dexo.profiles=(a)exo.deploy.profile@ -Djava.net.preferIPv4Stack=true
set JAVA_OPTS=-Xshare:auto -Xms128m -Xmx512m %LOG_OPTS% %SECURITY_OPTS% %EXO_OPTS%
rem Launches the server
Modified: jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo.sh
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo.sh 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo.sh 2012-02-16 07:31:26 UTC (rev 5648)
@@ -5,14 +5,7 @@
PRGDIR=`dirname "$PRG"`
LOG_OPTS="-Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog"
SECURITY_OPTS="-Djava.security.auth.login.config=$PRGDIR/../conf/jaas.conf"
-EXO_PROFILES="-Dexo.profiles="
-if [ "$1" = "jbc" ] || [ "$1" = "ispn" ]; then
- EXO_PROFILES="$EXO_PROFILES,$1"
- shift
-else
- EXO_PROFILES="$EXO_PROFILES,jbc"
-fi
-EXO_OPTS="-Dexo.product.developing=true $EXO_PROFILES -Djava.net.preferIPv4Stack=true"
+EXO_OPTS="-Dexo.product.developing=true -Dexo.profiles=(a)exo.deploy.profile@ -Djava.net.preferIPv4Stack=true"
JAVA_OPTS="$JAVA_OPTS $LOG_OPTS $SECURITY_OPTS $EXO_OPTS $JPDA_OPTS"
export JAVA_OPTS
Modified: jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo_debug.bat
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo_debug.bat 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo_debug.bat 2012-02-16 07:31:26 UTC (rev 5648)
@@ -7,4 +7,4 @@
rem -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,
rem address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
@SET JPDA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=18000,server=y,suspend=y
-@ eXo.bat jpda start
+@ eXo-@exo.deploy.profile@.bat jpda start
Modified: jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo_debug.sh
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo_debug.sh 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/product-patches/as/tomcat/bin/eXo_debug.sh 2012-02-16 07:31:26 UTC (rev 5648)
@@ -2,4 +2,5 @@
export JPDA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=18000,server=y,suspend=y"
PRGDIR=`dirname "$PRG"`
-exec "$PRGDIR"/eXo.sh "$@"
+exec "$PRGDIR"/eXo-@exo.deploy.profile@.sh "$@"
+
Modified: jcr/branches/1.15.x/applications/product-patches/as/tomcat/exo-readme.txt
===================================================================
--- jcr/branches/1.15.x/applications/product-patches/as/tomcat/exo-readme.txt 2012-02-15 15:58:24 UTC (rev 5647)
+++ jcr/branches/1.15.x/applications/product-patches/as/tomcat/exo-readme.txt 2012-02-16 07:31:26 UTC (rev 5648)
@@ -4,12 +4,10 @@
In Unix environment
-* "./eXo.sh run" to launch eXo JCR with the default configuration
-* "./eXo.sh ispn run" to launch eXo JCR with the configuration for Infinispan
-* "./eXo.sh jbc run" to launch eXo JCR with the configuration for JBoss Cache
+* "./eXo-ispn.sh run" to launch eXo JCR with the configuration for Infinispan
+* "./eXo-jbc.sh jbc run" to launch eXo JCR with the configuration for JBoss Cache
In Windows environment
-* "eXo.bat run" to launch eXo JCR with the default configuration
-* "eXo.bat ispn run" to launch eXo JCR with the configuration for Infinispan
-* "eXo.bat jbc run" to launch eXo JCR with the configuration for JBoss Cache
+* "eXo-ispn.bat run" to launch eXo JCR with the configuration for Infinispan
+* "eXo-jbc.bat run" to launch eXo JCR with the configuration for JBoss Cache
12 years, 4 months
exo-jcr SVN: r5647 - in jcr/trunk/applications: exo.jcr.ear and 2 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2012-02-15 10:58:24 -0500 (Wed, 15 Feb 2012)
New Revision: 5647
Modified:
jcr/trunk/applications/exo.jcr.applications.jboss/pom.xml
jcr/trunk/applications/exo.jcr.ear/pom.xml
jcr/trunk/applications/product-patches/as/jboss/bin/run.conf
jcr/trunk/applications/product-patches/as/jboss/bin/run.conf.bat
jcr/trunk/applications/product-patches/as/jboss/exo-readme.txt
Log:
EXOJCR-1764: AS deployment cleanup
Modified: jcr/trunk/applications/exo.jcr.applications.jboss/pom.xml
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.jboss/pom.xml 2012-02-15 15:57:06 UTC (rev 5646)
+++ jcr/trunk/applications/exo.jcr.applications.jboss/pom.xml 2012-02-15 15:58:24 UTC (rev 5647)
@@ -127,6 +127,10 @@
<copy todir="${exo.projects.directory.working}/exo-jboss/bin/" verbose="true" overwrite="true">
<fileset dir="${basedir}/../product-patches/as/jboss/bin/" includes="*.*" />
</copy>
+
+ <replace dir="${exo.projects.directory.working}/exo-jboss/bin" token="-Dexo.profiles=jbc" value="-Dexo.profiles=${exo.deploy.profile}"/>
+ <move file="${exo.projects.directory.working}/exo-jboss/bin/run.bat" tofile="${exo.projects.directory.working}/exo-jboss/bin/run-${exo.deploy.profile}.bat" />
+ <move file="${exo.projects.directory.working}/exo-jboss/bin/run.sh" tofile="${exo.projects.directory.working}/exo-jboss/bin/run-${exo.deploy.profile}.sh" />
</tasks>
</configuration>
</plugin>
Modified: jcr/trunk/applications/exo.jcr.ear/pom.xml
===================================================================
--- jcr/trunk/applications/exo.jcr.ear/pom.xml 2012-02-15 15:57:06 UTC (rev 5646)
+++ jcr/trunk/applications/exo.jcr.ear/pom.xml 2012-02-15 15:58:24 UTC (rev 5647)
@@ -31,7 +31,9 @@
<name>eXo JCR :: EAR</name>
<properties>
<enforcer.skip>true</enforcer.skip>
+ <exo.deploy.profile>jbc</exo.deploy.profile>
</properties>
+
<dependencies>
<dependency>
<groupId>org.exoplatform.jcr</groupId>
@@ -128,6 +130,10 @@
<version>${project.version}</version>
</dependency>
</dependencies>
+
+ <properties>
+ <exo.deploy.profile>jbc</exo.deploy.profile>
+ </properties>
</profile>
</profiles>
<build>
Modified: jcr/trunk/applications/product-patches/as/jboss/bin/run.conf
===================================================================
--- jcr/trunk/applications/product-patches/as/jboss/bin/run.conf 2012-02-15 15:57:06 UTC (rev 5646)
+++ jcr/trunk/applications/product-patches/as/jboss/bin/run.conf 2012-02-15 15:58:24 UTC (rev 5647)
@@ -52,7 +52,4 @@
#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_shmem,address=jboss,server=y,suspend=n"
# Add the eXo variables
-JAVA_OPTS="$JAVA_OPTS -Dexo.profiles=$1 -Dexo.jcr.parent.dir=../server/default/data"
-if [ "$1" = "jbc" ] || [ "$1" = "ispn" ]; then
- shift
-fi
\ No newline at end of file
+JAVA_OPTS="$JAVA_OPTS -Dexo.profiles=jbc -Dexo.jcr.parent.dir=../server/default/data"
Modified: jcr/trunk/applications/product-patches/as/jboss/bin/run.conf.bat
===================================================================
--- jcr/trunk/applications/product-patches/as/jboss/bin/run.conf.bat 2012-02-15 15:57:06 UTC (rev 5646)
+++ jcr/trunk/applications/product-patches/as/jboss/bin/run.conf.bat 2012-02-15 15:58:24 UTC (rev 5647)
@@ -55,9 +55,6 @@
rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_shmem,address=jboss,server=y,suspend=n"
rem # Add the eXo variables
-set "JAVA_OPTS=%JAVA_OPTS% -Dexo.profiles=%1 -Dexo.jcr.parent.dir=../server/default/data"
+set "JAVA_OPTS=%JAVA_OPTS% -Dexo.profiles=jbc -Dexo.jcr.parent.dir=../server/default/data"
-if ""%1"" == ""jbc"" shift
-if ""%1"" == ""ispn"" shift
-
:JAVA_OPTS_SET
Modified: jcr/trunk/applications/product-patches/as/jboss/exo-readme.txt
===================================================================
--- jcr/trunk/applications/product-patches/as/jboss/exo-readme.txt 2012-02-15 15:57:06 UTC (rev 5646)
+++ jcr/trunk/applications/product-patches/as/jboss/exo-readme.txt 2012-02-15 15:58:24 UTC (rev 5647)
@@ -4,12 +4,10 @@
In Unix environment
-* "./run.sh" to launch eXo JCR with the default configuration
-* "./run.sh ispn" to launch eXo JCR with the configuration for Infinispan
-* "./run.sh jbc" to launch eXo JCR with the configuration for JBoss Cache
+* "./run-ispn.sh" to launch eXo JCR with the configuration for Infinispan
+* "./run-jbc.sh" to launch eXo JCR with the configuration for JBoss Cache
In Windows environment
-* "run.bat" to launch eXo JCR with the default configuration
-* "run.bat ispn" to launch eXo JCR with the configuration for Infinispan
-* "run.bat jbc" to launch eXo JCR with the configuration for JBoss Cache
+* "run-ispn.bat" to launch eXo JCR with the configuration for Infinispan
+* "run-jbc.bat" to launch eXo JCR with the configuration for JBoss Cache
12 years, 4 months
exo-jcr SVN: r5645 - in jcr/trunk/applications: product-patches/as/jetty and 1 other directory.
by do-not-reply@jboss.org
Author: tolusha
Date: 2012-02-15 10:12:49 -0500 (Wed, 15 Feb 2012)
New Revision: 5645
Modified:
jcr/trunk/applications/exo.jcr.applications.jetty/pom.xml
jcr/trunk/applications/product-patches/as/jetty/eXo.bat
jcr/trunk/applications/product-patches/as/jetty/eXo.sh
jcr/trunk/applications/product-patches/as/jetty/exo-readme.txt
Log:
EXOJCR-1764: AS deployment cleanup
Modified: jcr/trunk/applications/exo.jcr.applications.jetty/pom.xml
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.jetty/pom.xml 2012-02-15 15:05:38 UTC (rev 5644)
+++ jcr/trunk/applications/exo.jcr.applications.jetty/pom.xml 2012-02-15 15:12:49 UTC (rev 5645)
@@ -121,6 +121,13 @@
<copy todir="${exo.projects.directory.working}/exo-jetty/" verbose="true" overwrite="true">
<fileset dir="${basedir}/../product-patches/as/jetty/" />
</copy>
+ <replace dir="${exo.projects.directory.working}/exo-jetty" token="@exo.deploy.profile@" value="${exo.deploy.profile}"/>
+ <move todir="${exo.projects.directory.working}/exo-jetty/">
+ <fileset dir="${exo.projects.directory.working}/exo-jetty/">
+ <include name="**/eXo.*" />
+ </fileset>
+ <globmapper from="eXo.*" to="eXo-${exo.deploy.profile}.*" />
+ </move>
<chmod dir="${exo.projects.directory.working}/exo-jetty" perm="+x" includes="*.sh" />
<move todir="${basedir}/target/lib-binary.dir/">
<fileset dir="${basedir}/target/lib-binary.dir/">
Modified: jcr/trunk/applications/product-patches/as/jetty/eXo.bat
===================================================================
--- jcr/trunk/applications/product-patches/as/jetty/eXo.bat 2012-02-15 15:05:38 UTC (rev 5644)
+++ jcr/trunk/applications/product-patches/as/jetty/eXo.bat 2012-02-15 15:12:49 UTC (rev 5645)
@@ -1 +1 @@
-java -Djava.security.auth.login.config=jaas.conf -Dexo.profiles=%1 -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=. -jar start.jar
+java -Djava.security.auth.login.config=jaas.conf -Dexo.profiles=(a)exo.deploy.profile@ -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=. -jar start.jar
Modified: jcr/trunk/applications/product-patches/as/jetty/eXo.sh
===================================================================
--- jcr/trunk/applications/product-patches/as/jetty/eXo.sh 2012-02-15 15:05:38 UTC (rev 5644)
+++ jcr/trunk/applications/product-patches/as/jetty/eXo.sh 2012-02-15 15:12:49 UTC (rev 5645)
@@ -1 +1 @@
-java -Djava.security.auth.login.config=jaas.conf -Dexo.profiles=$1 -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=. -jar start.jar
+java -Djava.security.auth.login.config=jaas.conf -Dexo.profiles=(a)exo.deploy.profile@ -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=. -jar start.jar
Modified: jcr/trunk/applications/product-patches/as/jetty/exo-readme.txt
===================================================================
--- jcr/trunk/applications/product-patches/as/jetty/exo-readme.txt 2012-02-15 15:05:38 UTC (rev 5644)
+++ jcr/trunk/applications/product-patches/as/jetty/exo-readme.txt 2012-02-15 15:12:49 UTC (rev 5645)
@@ -4,12 +4,10 @@
In Unix environment
-* "./eXo.sh" to launch eXo JCR with the default configuration
-* "./eXo.sh ispn" to launch eXo JCR with the configuration for Infinispan
-* "./eXo.sh jbc" to launch eXo JCR with the configuration for JBoss Cache
+* "./eXo-ispn.sh" to launch eXo JCR with the configuration for Infinispan
+* "./eXo-jbc.sh" to launch eXo JCR with the configuration for JBoss Cache
In Windows environment
-* "eXo.bat" to launch eXo JCR with the default configuration
-* "eXo.bat ispn" to launch eXo JCR with the configuration for Infinispan
-* "eXo.bat jbc" to launch eXo JCR with the configuration for JBoss Cache
+* "eXo-ispn.bat" to launch eXo JCR with the configuration for Infinispan
+* "eXo-jbc.bat" to launch eXo JCR with the configuration for JBoss Cache
12 years, 4 months
exo-jcr SVN: r5644 - in jcr/trunk/applications: exo.jcr.applications.tomcat and 3 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2012-02-15 10:05:38 -0500 (Wed, 15 Feb 2012)
New Revision: 5644
Modified:
jcr/trunk/applications/exo.jcr.applications.jonas/pom.xml
jcr/trunk/applications/exo.jcr.applications.tomcat/pom.xml
jcr/trunk/applications/product-patches/as/jonas/bin/nt/jonas.bat
jcr/trunk/applications/product-patches/as/jonas/bin/unix/jonas
jcr/trunk/applications/product-patches/as/jonas/exo-readme.txt
Log:
EXOJCR-1764: AS deployment cleanup
Modified: jcr/trunk/applications/exo.jcr.applications.jonas/pom.xml
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.jonas/pom.xml 2012-02-15 14:32:39 UTC (rev 5643)
+++ jcr/trunk/applications/exo.jcr.applications.jonas/pom.xml 2012-02-15 15:05:38 UTC (rev 5644)
@@ -157,8 +157,11 @@
<!-- Copying patch directory -->
<copy todir="${exo.projects.directory.working}/exo-jonas/" verbose="true" overwrite="true">
- <fileset dir="${basedir}/../product-patches/as/jonas/" />
+ <fileset dir="${basedir}/../product-patches/as/jonas/" />
</copy>
+ <replace dir="${exo.projects.directory.working}/exo-jonas/" token="@exo.deploy.profile@" value="${exo.deploy.profile}"/>
+ <move file="${exo.projects.directory.working}/exo-jonas/bin/nt/jonas.bat" tofile="${exo.projects.directory.working}/exo-jonas/bin/nt/jonas-${exo.deploy.profile}.bat" />
+ <move file="${exo.projects.directory.working}/exo-jonas/bin/unix/jonas" tofile="${exo.projects.directory.working}/exo-jonas/bin/unix/jonas-${exo.deploy.profile}" />
<!-- Coping wars, rar -->
<copy todir="${exo.projects.directory.working}/exo-jonas/apps/autoload/exoplatform.ear" verbose="true" overwrite="true">
@@ -177,6 +180,8 @@
<include name="**/hsqldb*.jar" />
</fileset>
</copy>
+
+ <delete file="${exo.projects.directory.working}/exo-jonas/lib/commons/jonas/carol/jgroups-all.jar" />
</tasks>
</configuration>
<dependencies>
Modified: jcr/trunk/applications/exo.jcr.applications.tomcat/pom.xml
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.tomcat/pom.xml 2012-02-15 14:32:39 UTC (rev 5643)
+++ jcr/trunk/applications/exo.jcr.applications.tomcat/pom.xml 2012-02-15 15:05:38 UTC (rev 5644)
@@ -123,7 +123,7 @@
<fileset dir="${basedir}/../product-patches/as/tomcat/" />
</copy>
<replace dir="${exo.projects.directory.working}/exo-tomcat/bin" token="@exo.deploy.profile@" value="${exo.deploy.profile}"/>
- <move todir="${exo.projects.directory.working}/exo-tomcat/bin//">
+ <move todir="${exo.projects.directory.working}/exo-tomcat/bin/">
<fileset dir="${exo.projects.directory.working}/exo-tomcat/bin/">
<include name="**/eXo.*" />
</fileset>
Modified: jcr/trunk/applications/product-patches/as/jonas/bin/nt/jonas.bat
===================================================================
--- jcr/trunk/applications/product-patches/as/jonas/bin/nt/jonas.bat 2012-02-15 14:32:39 UTC (rev 5643)
+++ jcr/trunk/applications/product-patches/as/jonas/bin/nt/jonas.bat 2012-02-15 15:05:38 UTC (rev 5644)
@@ -80,10 +80,8 @@
Rem ----------------------- Begin eXo configuration ----------------------------
cd %JONAS_ROOT%/bin
-set JONAS_OPTS=%JONAS_OPTS% -Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog -Djava.awt.headless=true -Dexo.profiles=%1 -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=../..
+set JONAS_OPTS=%JONAS_OPTS% -Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog -Djava.awt.headless=true -Dexo.profiles=(a)exo.deploy.profile@ -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=../..
set JAVA_OPTS=%JAVA_OPTS% -Xmx512M
-if ""%1"" == ""jbc"" shift
-if ""%1"" == ""ispn"" shift
Rem ------------------------ End eXo configuration -----------------------------
Modified: jcr/trunk/applications/product-patches/as/jonas/bin/unix/jonas
===================================================================
--- jcr/trunk/applications/product-patches/as/jonas/bin/unix/jonas 2012-02-15 14:32:39 UTC (rev 5643)
+++ jcr/trunk/applications/product-patches/as/jonas/bin/unix/jonas 2012-02-15 15:05:38 UTC (rev 5644)
@@ -79,11 +79,8 @@
# ------------------------- Begin eXo configuration ----------------------------
cd $JONAS_ROOT/bin
-JONAS_OPTS="$JONAS_OPTS -Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog -Djava.awt.headless=true -Dexo.profiles=$1 -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=.."
+JONAS_OPTS="$JONAS_OPTS -Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog -Djava.awt.headless=true -Dexo.profiles=(a)exo.deploy.profile@ -Djava.net.preferIPv4Stack=true -Dexo.jcr.parent.dir=.."
JAVA_OPTS="$JAVA_OPTS -Xmx512M"
-if [ "$1" = "jbc" ] || [ "$1" = "ispn" ]; then
- shift
-fi
# -------------------------- End eXo configuration -----------------------------
Modified: jcr/trunk/applications/product-patches/as/jonas/exo-readme.txt
===================================================================
--- jcr/trunk/applications/product-patches/as/jonas/exo-readme.txt 2012-02-15 14:32:39 UTC (rev 5643)
+++ jcr/trunk/applications/product-patches/as/jonas/exo-readme.txt 2012-02-15 15:05:38 UTC (rev 5644)
@@ -2,12 +2,10 @@
In Unix environment, go in the directory bin/unix then execute the following command:
-* "./jonas start" to launch eXo JCR with the default configuration
-* "./jonas ispn start" to launch eXo JCR with the configuration for Infinispan
-* "./jonas jbc start" to launch eXo JCR with the configuration for JBoss Cache
+* "./jonas-ispn start" to launch eXo JCR with the configuration for Infinispan
+* "./jonas-jbc start" to launch eXo JCR with the configuration for JBoss Cache
In Windows environment, go in the directory bin\nt then execute the following command:
-* "jonas.bat start" to launch eXo JCR with the default configuration
-* "jonas.bat ispn start" to launch eXo JCR with the configuration for Infinispan
-* "jonas.bat jbc start" to launch eXo JCR with the configuration for JBoss Cache
+* "jonas-ispn.bat start" to launch eXo JCR with the configuration for Infinispan
+* "jonas-jbc.bat start" to launch eXo JCR with the configuration for JBoss Cache
12 years, 4 months
exo-jcr SVN: r5643 - in jcr/trunk/applications: product-patches/as/tomcat and 1 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2012-02-15 09:32:39 -0500 (Wed, 15 Feb 2012)
New Revision: 5643
Added:
jcr/trunk/applications/product-patches/as/tomcat/bin/eXo.bat
jcr/trunk/applications/product-patches/as/tomcat/bin/eXo.sh
Removed:
jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-ispn.bat
jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-ispn.sh
jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-jbc.bat
jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-jbc.sh
Modified:
jcr/trunk/applications/exo.jcr.applications.tomcat/pom.xml
jcr/trunk/applications/product-patches/as/tomcat/bin/eXo_debug.bat
jcr/trunk/applications/product-patches/as/tomcat/bin/eXo_debug.sh
jcr/trunk/applications/product-patches/as/tomcat/exo-readme.txt
Log:
EXOJCR-1764: AS deployment cleanup
Modified: jcr/trunk/applications/exo.jcr.applications.tomcat/pom.xml
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.tomcat/pom.xml 2012-02-15 13:33:46 UTC (rev 5642)
+++ jcr/trunk/applications/exo.jcr.applications.tomcat/pom.xml 2012-02-15 14:32:39 UTC (rev 5643)
@@ -120,16 +120,15 @@
<fileset dir="${basedir}/target/lib-binary.dir/" includes="**/*.jar" />
</copy>
<copy todir="${exo.projects.directory.working}/exo-tomcat/" verbose="true" overwrite="true">
- <fileset dir="${basedir}/../product-patches/as/tomcat/">
- <exclude name="**/*-jbc.*" />
- <exclude name="**/*-ispn.*" />
- </fileset>
+ <fileset dir="${basedir}/../product-patches/as/tomcat/" />
</copy>
- <copy todir="${exo.projects.directory.working}/exo-tomcat/bin" verbose="true" overwrite="true">
- <fileset dir="${basedir}/../product-patches/as/tomcat/bin">
- <include name="**/eXo-${exo.deploy.profile}.*" />
- </fileset>
- </copy>
+ <replace dir="${exo.projects.directory.working}/exo-tomcat/bin" token="@exo.deploy.profile@" value="${exo.deploy.profile}"/>
+ <move todir="${exo.projects.directory.working}/exo-tomcat/bin//">
+ <fileset dir="${exo.projects.directory.working}/exo-tomcat/bin/">
+ <include name="**/eXo.*" />
+ </fileset>
+ <globmapper from="eXo.*" to="eXo-${exo.deploy.profile}.*" />
+ </move>
<chmod dir="${exo.projects.directory.working}/exo-tomcat/bin" perm="+x" includes="*.sh" />
Deleted: jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-ispn.bat
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-ispn.bat 2012-02-15 13:33:46 UTC (rev 5642)
+++ jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-ispn.bat 2012-02-15 14:32:39 UTC (rev 5643)
@@ -1,16 +0,0 @@
-@echo off
-
-rem Computes the absolute path of eXo
-setlocal ENABLEDELAYEDEXPANSION
-for %%i in ( !%~f0! ) do set BIN_DIR=%%~dpi
-for %%i in ( !%BIN_DIR%\..! ) do set TOMCAT_HOME=%%~fi
-
-rem Sets some variables
-set LOG_OPTS="-Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog"
-set SECURITY_OPTS="-Djava.security.auth.login.config=%TOMCAT_HOME%\conf\jaas.conf"
-set EXO_OPTS=-Dexo.product.developing=true -Dexo.profiles=ispn -Djava.net.preferIPv4Stack=true
-set JAVA_OPTS=-Xshare:auto -Xms128m -Xmx512m %LOG_OPTS% %SECURITY_OPTS% %EXO_OPTS%
-
-rem Launches the server
-cd %BIN_DIR%
-call catalina.bat %1 %2 %3
Deleted: jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-ispn.sh
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-ispn.sh 2012-02-15 13:33:46 UTC (rev 5642)
+++ jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-ispn.sh 2012-02-15 14:32:39 UTC (rev 5643)
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-PRG="$0"
-
-PRGDIR=`dirname "$PRG"`
-LOG_OPTS="-Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog"
-SECURITY_OPTS="-Djava.security.auth.login.config=$PRGDIR/../conf/jaas.conf"
-EXO_OPTS="-Dexo.product.developing=true -Dexo.profiles=ispn -Djava.net.preferIPv4Stack=true"
-
-JAVA_OPTS="$JAVA_OPTS $LOG_OPTS $SECURITY_OPTS $EXO_OPTS $JPDA_OPTS"
-export JAVA_OPTS
-exec "$PRGDIR"/catalina.sh "$@"
Deleted: jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-jbc.bat
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-jbc.bat 2012-02-15 13:33:46 UTC (rev 5642)
+++ jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-jbc.bat 2012-02-15 14:32:39 UTC (rev 5643)
@@ -1,16 +0,0 @@
-@echo off
-
-rem Computes the absolute path of eXo
-setlocal ENABLEDELAYEDEXPANSION
-for %%i in ( !%~f0! ) do set BIN_DIR=%%~dpi
-for %%i in ( !%BIN_DIR%\..! ) do set TOMCAT_HOME=%%~fi
-
-rem Sets some variables
-set LOG_OPTS="-Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog"
-set SECURITY_OPTS="-Djava.security.auth.login.config=%TOMCAT_HOME%\conf\jaas.conf"
-set EXO_OPTS=-Dexo.product.developing=true -Dexo.profiles=jbc -Djava.net.preferIPv4Stack=true
-set JAVA_OPTS=-Xshare:auto -Xms128m -Xmx512m %LOG_OPTS% %SECURITY_OPTS% %EXO_OPTS%
-
-rem Launches the server
-cd %BIN_DIR%
-call catalina.bat %1 %2 %3
Deleted: jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-jbc.sh
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-jbc.sh 2012-02-15 13:33:46 UTC (rev 5642)
+++ jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-jbc.sh 2012-02-15 14:32:39 UTC (rev 5643)
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-PRG="$0"
-
-PRGDIR=`dirname "$PRG"`
-LOG_OPTS="-Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog"
-SECURITY_OPTS="-Djava.security.auth.login.config=$PRGDIR/../conf/jaas.conf"
-EXO_OPTS="-Dexo.product.developing=true -Dexo.profiles=jbc -Djava.net.preferIPv4Stack=true"
-
-JAVA_OPTS="$JAVA_OPTS $LOG_OPTS $SECURITY_OPTS $EXO_OPTS $JPDA_OPTS"
-export JAVA_OPTS
-exec "$PRGDIR"/catalina.sh "$@"
Added: jcr/trunk/applications/product-patches/as/tomcat/bin/eXo.bat
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/bin/eXo.bat (rev 0)
+++ jcr/trunk/applications/product-patches/as/tomcat/bin/eXo.bat 2012-02-15 14:32:39 UTC (rev 5643)
@@ -0,0 +1,16 @@
+@echo off
+
+rem Computes the absolute path of eXo
+setlocal ENABLEDELAYEDEXPANSION
+for %%i in ( !%~f0! ) do set BIN_DIR=%%~dpi
+for %%i in ( !%BIN_DIR%\..! ) do set TOMCAT_HOME=%%~fi
+
+rem Sets some variables
+set LOG_OPTS="-Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog"
+set SECURITY_OPTS="-Djava.security.auth.login.config=%TOMCAT_HOME%\conf\jaas.conf"
+set EXO_OPTS=-Dexo.product.developing=true -Dexo.profiles=(a)exo.deploy.profile@ -Djava.net.preferIPv4Stack=true
+set JAVA_OPTS=-Xshare:auto -Xms128m -Xmx512m %LOG_OPTS% %SECURITY_OPTS% %EXO_OPTS%
+
+rem Launches the server
+cd %BIN_DIR%
+call catalina.bat %1 %2 %3
Added: jcr/trunk/applications/product-patches/as/tomcat/bin/eXo.sh
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/bin/eXo.sh (rev 0)
+++ jcr/trunk/applications/product-patches/as/tomcat/bin/eXo.sh 2012-02-15 14:32:39 UTC (rev 5643)
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+PRG="$0"
+
+PRGDIR=`dirname "$PRG"`
+LOG_OPTS="-Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog"
+SECURITY_OPTS="-Djava.security.auth.login.config=$PRGDIR/../conf/jaas.conf"
+EXO_OPTS="-Dexo.product.developing=true -Dexo.profiles=(a)exo.deploy.profile@ -Djava.net.preferIPv4Stack=true"
+
+JAVA_OPTS="$JAVA_OPTS $LOG_OPTS $SECURITY_OPTS $EXO_OPTS $JPDA_OPTS"
+export JAVA_OPTS
+exec "$PRGDIR"/catalina.sh "$@"
Modified: jcr/trunk/applications/product-patches/as/tomcat/bin/eXo_debug.bat
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/bin/eXo_debug.bat 2012-02-15 13:33:46 UTC (rev 5642)
+++ jcr/trunk/applications/product-patches/as/tomcat/bin/eXo_debug.bat 2012-02-15 14:32:39 UTC (rev 5643)
@@ -7,5 +7,4 @@
rem -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,
rem address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
@SET JPDA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=18000,server=y,suspend=y
-if EXIST eXo-jbc.bat @ eXo-jbc.bat jpda start
-if EXIST eXo-ispn.bat @ eXo-ispn.bat jpda start
+@ eXo-@exo.deploy.profile@.bat jpda start
Modified: jcr/trunk/applications/product-patches/as/tomcat/bin/eXo_debug.sh
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/bin/eXo_debug.sh 2012-02-15 13:33:46 UTC (rev 5642)
+++ jcr/trunk/applications/product-patches/as/tomcat/bin/eXo_debug.sh 2012-02-15 14:32:39 UTC (rev 5643)
@@ -2,11 +2,5 @@
export JPDA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=18000,server=y,suspend=y"
PRGDIR=`dirname "$PRG"`
+exec "$PRGDIR"/eXo-@exo.deploy.profile@.sh "$@"
-if [ -f eXo-jbc.sh ]; then
- exec "$PRGDIR"/eXo-jbc.sh "$@"
-else if [ -f eXo-ispn.sh ]; then
- exec "$PRGDIR"/eXo-ispn.sh "$@"
- fi
-fi
-
Modified: jcr/trunk/applications/product-patches/as/tomcat/exo-readme.txt
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/exo-readme.txt 2012-02-15 13:33:46 UTC (rev 5642)
+++ jcr/trunk/applications/product-patches/as/tomcat/exo-readme.txt 2012-02-15 14:32:39 UTC (rev 5643)
@@ -11,8 +11,3 @@
* "eXo-ispn.bat run" to launch eXo JCR with the configuration for Infinispan
* "eXo-jbc.bat run" to launch eXo JCR with the configuration for JBoss Cache
-
-Notice!
-JCR Bundles for Infinispan and JBoss Cache differs by their dependencies.
-In ordrer to run eXo JCR with Infinispan configuration it must be deployed
-with "ispn" profile.
12 years, 4 months
exo-jcr SVN: r5642 - in jcr/trunk/applications: exo.jcr.applications.tomcat and 2 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2012-02-15 08:33:46 -0500 (Wed, 15 Feb 2012)
New Revision: 5642
Added:
jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-ispn.bat
jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-ispn.sh
jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-jbc.bat
jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-jbc.sh
jcr/trunk/applications/product-patches/as/tomcat/bin/eXo_debug.sh
Removed:
jcr/trunk/applications/product-patches/as/tomcat/bin/eXo.bat
jcr/trunk/applications/product-patches/as/tomcat/bin/eXo.sh
Modified:
jcr/trunk/applications/exo.jcr.applications.config/pom.xml
jcr/trunk/applications/exo.jcr.applications.tomcat/pom.xml
jcr/trunk/applications/product-patches/as/tomcat/bin/eXo_debug.bat
jcr/trunk/applications/product-patches/as/tomcat/exo-readme.txt
Log:
EXOJCR-1764: Tomcat deployment cleanup
Modified: jcr/trunk/applications/exo.jcr.applications.config/pom.xml
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.config/pom.xml 2012-02-15 12:36:12 UTC (rev 5641)
+++ jcr/trunk/applications/exo.jcr.applications.config/pom.xml 2012-02-15 13:33:46 UTC (rev 5642)
@@ -29,6 +29,11 @@
<artifactId>exo.jcr.applications.config</artifactId>
<packaging>pom</packaging>
<name>eXo JCR :: Applications :: Config</name>
+
+ <properties>
+ <exo.deploy.profile>jbc</exo.deploy.profile>
+ </properties>
+
<dependencies>
<dependency>
<groupId>org.exoplatform.jcr</groupId>
@@ -100,6 +105,10 @@
<version>${project.version}</version>
</dependency>
</dependencies>
+
+ <properties>
+ <exo.deploy.profile>ispn</exo.deploy.profile>
+ </properties>
</profile>
</profiles>
</project>
Modified: jcr/trunk/applications/exo.jcr.applications.tomcat/pom.xml
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.tomcat/pom.xml 2012-02-15 12:36:12 UTC (rev 5641)
+++ jcr/trunk/applications/exo.jcr.applications.tomcat/pom.xml 2012-02-15 13:33:46 UTC (rev 5642)
@@ -120,8 +120,17 @@
<fileset dir="${basedir}/target/lib-binary.dir/" includes="**/*.jar" />
</copy>
<copy todir="${exo.projects.directory.working}/exo-tomcat/" verbose="true" overwrite="true">
- <fileset dir="${basedir}/../product-patches/as/tomcat/" />
+ <fileset dir="${basedir}/../product-patches/as/tomcat/">
+ <exclude name="**/*-jbc.*" />
+ <exclude name="**/*-ispn.*" />
+ </fileset>
</copy>
+ <copy todir="${exo.projects.directory.working}/exo-tomcat/bin" verbose="true" overwrite="true">
+ <fileset dir="${basedir}/../product-patches/as/tomcat/bin">
+ <include name="**/eXo-${exo.deploy.profile}.*" />
+ </fileset>
+ </copy>
+
<chmod dir="${exo.projects.directory.working}/exo-tomcat/bin" perm="+x" includes="*.sh" />
<move todir="${basedir}/target/lib-binary.dir/">
Added: jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-ispn.bat
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-ispn.bat (rev 0)
+++ jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-ispn.bat 2012-02-15 13:33:46 UTC (rev 5642)
@@ -0,0 +1,16 @@
+@echo off
+
+rem Computes the absolute path of eXo
+setlocal ENABLEDELAYEDEXPANSION
+for %%i in ( !%~f0! ) do set BIN_DIR=%%~dpi
+for %%i in ( !%BIN_DIR%\..! ) do set TOMCAT_HOME=%%~fi
+
+rem Sets some variables
+set LOG_OPTS="-Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog"
+set SECURITY_OPTS="-Djava.security.auth.login.config=%TOMCAT_HOME%\conf\jaas.conf"
+set EXO_OPTS=-Dexo.product.developing=true -Dexo.profiles=ispn -Djava.net.preferIPv4Stack=true
+set JAVA_OPTS=-Xshare:auto -Xms128m -Xmx512m %LOG_OPTS% %SECURITY_OPTS% %EXO_OPTS%
+
+rem Launches the server
+cd %BIN_DIR%
+call catalina.bat %1 %2 %3
Added: jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-ispn.sh
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-ispn.sh (rev 0)
+++ jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-ispn.sh 2012-02-15 13:33:46 UTC (rev 5642)
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+PRG="$0"
+
+PRGDIR=`dirname "$PRG"`
+LOG_OPTS="-Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog"
+SECURITY_OPTS="-Djava.security.auth.login.config=$PRGDIR/../conf/jaas.conf"
+EXO_OPTS="-Dexo.product.developing=true -Dexo.profiles=ispn -Djava.net.preferIPv4Stack=true"
+
+JAVA_OPTS="$JAVA_OPTS $LOG_OPTS $SECURITY_OPTS $EXO_OPTS $JPDA_OPTS"
+export JAVA_OPTS
+exec "$PRGDIR"/catalina.sh "$@"
Added: jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-jbc.bat
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-jbc.bat (rev 0)
+++ jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-jbc.bat 2012-02-15 13:33:46 UTC (rev 5642)
@@ -0,0 +1,16 @@
+@echo off
+
+rem Computes the absolute path of eXo
+setlocal ENABLEDELAYEDEXPANSION
+for %%i in ( !%~f0! ) do set BIN_DIR=%%~dpi
+for %%i in ( !%BIN_DIR%\..! ) do set TOMCAT_HOME=%%~fi
+
+rem Sets some variables
+set LOG_OPTS="-Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog"
+set SECURITY_OPTS="-Djava.security.auth.login.config=%TOMCAT_HOME%\conf\jaas.conf"
+set EXO_OPTS=-Dexo.product.developing=true -Dexo.profiles=jbc -Djava.net.preferIPv4Stack=true
+set JAVA_OPTS=-Xshare:auto -Xms128m -Xmx512m %LOG_OPTS% %SECURITY_OPTS% %EXO_OPTS%
+
+rem Launches the server
+cd %BIN_DIR%
+call catalina.bat %1 %2 %3
Added: jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-jbc.sh
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-jbc.sh (rev 0)
+++ jcr/trunk/applications/product-patches/as/tomcat/bin/eXo-jbc.sh 2012-02-15 13:33:46 UTC (rev 5642)
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+PRG="$0"
+
+PRGDIR=`dirname "$PRG"`
+LOG_OPTS="-Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog"
+SECURITY_OPTS="-Djava.security.auth.login.config=$PRGDIR/../conf/jaas.conf"
+EXO_OPTS="-Dexo.product.developing=true -Dexo.profiles=jbc -Djava.net.preferIPv4Stack=true"
+
+JAVA_OPTS="$JAVA_OPTS $LOG_OPTS $SECURITY_OPTS $EXO_OPTS $JPDA_OPTS"
+export JAVA_OPTS
+exec "$PRGDIR"/catalina.sh "$@"
Deleted: jcr/trunk/applications/product-patches/as/tomcat/bin/eXo.bat
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/bin/eXo.bat 2012-02-15 12:36:12 UTC (rev 5641)
+++ jcr/trunk/applications/product-patches/as/tomcat/bin/eXo.bat 2012-02-15 13:33:46 UTC (rev 5642)
@@ -1,18 +0,0 @@
-@echo off
-
-rem Computes the absolute path of eXo
-setlocal ENABLEDELAYEDEXPANSION
-for %%i in ( !%~f0! ) do set BIN_DIR=%%~dpi
-for %%i in ( !%BIN_DIR%\..! ) do set TOMCAT_HOME=%%~fi
-
-rem Sets some variables
-set LOG_OPTS="-Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog"
-set SECURITY_OPTS="-Djava.security.auth.login.config=%TOMCAT_HOME%\conf\jaas.conf"
-set EXO_OPTS=-Dexo.product.developing=true -Dexo.profiles=%1 -Djava.net.preferIPv4Stack=true
-set JAVA_OPTS=-Xshare:auto -Xms128m -Xmx512m %LOG_OPTS% %SECURITY_OPTS% %EXO_OPTS%
-if ""%1"" == ""jbc"" shift
-if ""%1"" == ""ispn"" shift
-
-rem Launches the server
-cd %BIN_DIR%
-call catalina.bat %1 %2 %3
Deleted: jcr/trunk/applications/product-patches/as/tomcat/bin/eXo.sh
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/bin/eXo.sh 2012-02-15 12:36:12 UTC (rev 5641)
+++ jcr/trunk/applications/product-patches/as/tomcat/bin/eXo.sh 2012-02-15 13:33:46 UTC (rev 5642)
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-PRG="$0"
-
-PRGDIR=`dirname "$PRG"`
-LOG_OPTS="-Dorg.exoplatform.services.log.Log=org.apache.commons.logging.impl.SimpleLog"
-SECURITY_OPTS="-Djava.security.auth.login.config=$PRGDIR/../conf/jaas.conf"
-EXO_OPTS="-Dexo.product.developing=true -Dexo.profiles=$1 -Djava.net.preferIPv4Stack=true"
-if [ "$1" = "jbc" ] || [ "$1" = "ispn" ]; then
- shift
-fi
-
-JAVA_OPTS="$JAVA_OPTS $LOG_OPTS $SECURITY_OPTS $EXO_OPTS"
-export JAVA_OPTS
-exec "$PRGDIR"/catalina.sh "$@"
Modified: jcr/trunk/applications/product-patches/as/tomcat/bin/eXo_debug.bat
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/bin/eXo_debug.bat 2012-02-15 12:36:12 UTC (rev 5641)
+++ jcr/trunk/applications/product-patches/as/tomcat/bin/eXo_debug.bat 2012-02-15 13:33:46 UTC (rev 5642)
@@ -7,4 +7,5 @@
rem -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,
rem address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
@SET JPDA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=18000,server=y,suspend=y
-@ eXo.bat jpda start
+if EXIST eXo-jbc.bat @ eXo-jbc.bat jpda start
+if EXIST eXo-ispn.bat @ eXo-ispn.bat jpda start
Added: jcr/trunk/applications/product-patches/as/tomcat/bin/eXo_debug.sh
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/bin/eXo_debug.sh (rev 0)
+++ jcr/trunk/applications/product-patches/as/tomcat/bin/eXo_debug.sh 2012-02-15 13:33:46 UTC (rev 5642)
@@ -0,0 +1,12 @@
+#!/bin/sh
+export JPDA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=18000,server=y,suspend=y"
+
+PRGDIR=`dirname "$PRG"`
+
+if [ -f eXo-jbc.sh ]; then
+ exec "$PRGDIR"/eXo-jbc.sh "$@"
+else if [ -f eXo-ispn.sh ]; then
+ exec "$PRGDIR"/eXo-ispn.sh "$@"
+ fi
+fi
+
Modified: jcr/trunk/applications/product-patches/as/tomcat/exo-readme.txt
===================================================================
--- jcr/trunk/applications/product-patches/as/tomcat/exo-readme.txt 2012-02-15 12:36:12 UTC (rev 5641)
+++ jcr/trunk/applications/product-patches/as/tomcat/exo-readme.txt 2012-02-15 13:33:46 UTC (rev 5642)
@@ -4,15 +4,13 @@
In Unix environment
-* "./eXo.sh run" to launch eXo JCR with the default configuration
-* "./eXo.sh ispn run" to launch eXo JCR with the configuration for Infinispan
-* "./eXo.sh jbc run" to launch eXo JCR with the configuration for JBoss Cache
+* "./eXo-ispn.sh run" to launch eXo JCR with the configuration for Infinispan
+* "./eXo-jbc.sh run" to launch eXo JCR with the configuration for JBoss Cache
In Windows environment
-* "eXo.bat run" to launch eXo JCR with the default configuration
-* "eXo.bat ispn run" to launch eXo JCR with the configuration for Infinispan
-* "eXo.bat jbc run" to launch eXo JCR with the configuration for JBoss Cache
+* "eXo-ispn.bat run" to launch eXo JCR with the configuration for Infinispan
+* "eXo-jbc.bat run" to launch eXo JCR with the configuration for JBoss Cache
Notice!
JCR Bundles for Infinispan and JBoss Cache differs by their dependencies.
12 years, 4 months
exo-jcr SVN: r5641 - kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/impl.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2012-02-15 07:36:12 -0500 (Wed, 15 Feb 2012)
New Revision: 5641
Modified:
kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/impl/MailServiceImpl.java
Log:
EXOJCR-1733: yet another fix, as we can have one MailService per PortalContainer we sould avoid using static field to count threads
Modified: kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/impl/MailServiceImpl.java
===================================================================
--- kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/impl/MailServiceImpl.java 2012-02-15 11:09:59 UTC (rev 5640)
+++ kernel/branches/2.4.x/exo.kernel.component.common/src/main/java/org/exoplatform/services/mail/impl/MailServiceImpl.java 2012-02-15 12:36:12 UTC (rev 5641)
@@ -81,7 +81,7 @@
* Track current threads number used for asynchronouys mail send
* to set explicit thread names.
*/
- private static volatile int mailServiceThreadCounter = 0;
+ private volatile int mailServiceThreadCounter = 0;
public MailServiceImpl(InitParams params, final ExoContainerContext ctx) throws Exception
{
12 years, 4 months
exo-jcr SVN: r5640 - in jcr/branches/1.15.x: exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command and 2 other directories.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2012-02-15 06:09:59 -0500 (Wed, 15 Feb 2012)
New Revision: 5640
Modified:
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavService.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java
jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-configuration.xml
jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml
Log:
EXOJCR-1719:
* added new WebDavServiceImpl initial parameter - 'untrusted-user-agents'
* added docbook description of 'untrusted-user-agents' initial parameter
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavService.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavService.java 2012-02-15 10:55:04 UTC (rev 5639)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavService.java 2012-02-15 11:09:59 UTC (rev 5640)
@@ -67,7 +67,7 @@
Response head(String repoName, String repoPath, UriInfo baseURI);
/**
- * WedDAV "HEAD" method. See <a
+ * WedDAV "PUT" method. See <a
* href='http://www.ietf.org/rfc/rfc2518.txt'>HTTP methods for distributed
* authoring sec. 8.7 "PUT"</a>.
*
@@ -79,11 +79,14 @@
* @param contentNodeTypeHeader JCR Content-NodeType header
* @param mixinTypes JCR Mixin types header
* @param mimeType Content-Type HTTP header
+ * @param userAgent User-Agent HTTP header
* @param inputStream stream that contain incoming data
+ * @param UriInfo URI info
* @return the instance of javax.ws.rs.core.Response
*/
Response put(String repoName, String repoPath, String lockTokenHeader, String ifHeader, String fileNodeTypeHeader,
- String contentNodeTypeHeader, String mixinTypes, MediaType mediatype, InputStream inputStream, UriInfo uriInfo);
+ String contentNodeTypeHeader, String mixinTypes, MediaType mediaType, String userAgent, InputStream inputStream,
+ UriInfo uriInfo);
/**
* @param repoName repository name
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java 2012-02-15 10:55:04 UTC (rev 5639)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java 2012-02-15 11:09:59 UTC (rev 5640)
@@ -23,6 +23,7 @@
import org.exoplatform.commons.utils.MimeTypeResolver;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.container.xml.ValueParam;
+import org.exoplatform.container.xml.ValuesParam;
import org.exoplatform.services.jcr.RepositoryService;
import org.exoplatform.services.jcr.core.ManageableRepository;
import org.exoplatform.services.jcr.ext.app.ThreadLocalSessionProviderService;
@@ -78,8 +79,10 @@
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import javax.jcr.NoSuchWorkspaceException;
import javax.jcr.PathNotFoundException;
@@ -143,6 +146,8 @@
public static final String FOLDER_ICON_PATH = "folder-icon-path";
+ public static final String UNTRUSTED_USER_AGENTS = "untrusted-user-agents";
+
/**
* Logger.
*/
@@ -194,6 +199,11 @@
private Map<String, String> xsltParams = new HashMap<String, String>();
/**
+ * Set of untrusted user agents. Special rules are applied for listed agents.
+ */
+ private Set<String> untrustedUserAgents = new HashSet<String>();
+
+ /**
* The list of allowed methods.
*/
private static final String ALLOW;
@@ -303,6 +313,13 @@
}
}
+
+ ValuesParam pUntrustedUserAgents = params.getValuesParam(UNTRUSTED_USER_AGENTS);
+ if (pUntrustedUserAgents != null)
+ {
+ untrustedUserAgents.addAll((List<String>)pUntrustedUserAgents.getValues());
+ }
+
this.mimeTypeResolver = new MimeTypeResolver();
this.mimeTypeResolver.setDefaultMimeType(defaultFileMimeType);
}
@@ -386,6 +403,24 @@
}
}
+
+ /*
+ * As this constructor receives Map<String, String> instead of InitParams
+ * we cannot pass multi-valued parameters in the form of
+ * String -> Collection
+ * We pass a set of 'untrusted-user-agents' as a single String
+ * with mime types separated by comma (",")
+ * i.e. "agent1, agent2, agent3"
+ */
+ paramValue = params.get(UNTRUSTED_USER_AGENTS);
+ if (paramValue != null)
+ {
+ for (String mimeType : paramValue.split(","))
+ {
+ untrustedUserAgents.add(mimeType.trim());
+ }
+ }
+
this.mimeTypeResolver = new MimeTypeResolver();
this.mimeTypeResolver.setDefaultMimeType(defaultFileMimeType);
}
@@ -1113,7 +1148,8 @@
@HeaderParam(ExtHttpHeaders.FILE_NODETYPE) String fileNodeTypeHeader,
@HeaderParam(ExtHttpHeaders.CONTENT_NODETYPE) String contentNodeTypeHeader,
@HeaderParam(ExtHttpHeaders.CONTENT_MIXINTYPES) String mixinTypes,
- @HeaderParam(ExtHttpHeaders.CONTENT_TYPE) MediaType mediatype, InputStream inputStream, @Context UriInfo uriInfo)
+ @HeaderParam(ExtHttpHeaders.CONTENT_TYPE) MediaType mediaType,
+ @HeaderParam(ExtHttpHeaders.USER_AGENT) String userAgent, InputStream inputStream, @Context UriInfo uriInfo)
{
if (log.isDebugEnabled())
{
@@ -1127,14 +1163,14 @@
String mimeType = null;
String encoding = null;
- if (mediatype == null)
+ if (mediaType == null || untrustedUserAgents.contains(userAgent))
{
mimeType = mimeTypeResolver.getMimeType(TextUtil.nameOnly(repoPath));
}
else
{
- mimeType = mediatype.getType() + "/" + mediatype.getSubtype();
- encoding = mediatype.getParameters().get("charset");
+ mimeType = mediaType.getType() + "/" + mediaType.getSubtype();
+ encoding = mediaType.getParameters().get("charset");
}
List<String> tokens = lockTokens(lockTokenHeader, ifHeader);
@@ -1505,4 +1541,5 @@
return new URI(TextUtil.escape(path, '%', true));
}
}
+
}
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java 2012-02-15 10:55:04 UTC (rev 5639)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java 2012-02-15 11:09:59 UTC (rev 5640)
@@ -184,6 +184,85 @@
.toString());
}
+ /**
+ * Testing if we use MimeTypeResolver to define jcr:mimeType property
+ * for untrusted user agents during resource creation.
+ */
+ public void testUntrustedUserAgentResourceCreation() throws Exception
+ {
+ String content = TestUtils.getFileContent();
+ String path = TestUtils.getFileName();
+
+ // create User-Agent header indicating that the resource we create
+ // has application/octet-stream type
+ // though it's extension is .txt
+ MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
+ headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM);
+ headers.add(HttpHeaders.USER_AGENT, "test-user-agent");
+
+ // fullfiling the request
+ service(WebDAVMethods.PUT, getPathWS() + path, "", headers, content.getBytes());
+
+ Node node = session.getRootNode().getNode(TextUtil.relativizePath(path)).getNode("jcr:content");
+ // though that we passed application/octet-stream mime type
+ // the user agent is within untrusted user agents set
+ // so we use MimeTypeResolver to define the mimeType and
+ // ignore Content-Type header
+ assertEquals(MediaType.TEXT_PLAIN, node.getProperty("jcr:mimeType").getString());
+ }
+
+ /**
+ * Testing if we use MimeTypeResolver to define jcr:mimeType property
+ * for untrusted user agents during resource modification.
+ */
+ public void testUntrustedUserAgentResourceModification() throws Exception
+ {
+ String content = TestUtils.getFileContent();
+ String path = TestUtils.getFileName();
+
+ // create data with 'trusted' user agent
+ // (all user agents are considered to be trusted
+ // if they are not listed as untrusted)
+ MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
+ headers.add(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN);
+
+ service(WebDAVMethods.PUT, getPathWS() + path, "", headers, content.getBytes());
+
+ headers.clear();
+ content = TestUtils.getFileContent();
+ // define user agent to be among untrusted user agents
+ headers.add(HttpHeaders.USER_AGENT, "test-user-agent");
+ // define incorrect mime-type via seting Content-Type header
+ headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM);
+
+ service(WebDAVMethods.PUT, getPathWS() + path, "", headers, content.getBytes());
+
+ Node node = session.getRootNode().getNode(TextUtil.relativizePath(path)).getNode("jcr:content");
+ // mime-type should still be correct
+ assertEquals(MediaType.TEXT_PLAIN, node.getProperty("jcr:mimeType").getString());
+ }
+
+ /**
+ * Testing if we can modify mime-type of previously defined resource
+ * via trusted user agent
+ */
+ public void testTrustedUserAgentResourceModification() throws Exception
+ {
+ String content = TestUtils.getFileContent();
+ String path = TestUtils.getFileName() + ".html";
+
+ service(WebDAVMethods.PUT, getPathWS() + path, "", null, content.getBytes());
+ Node node = session.getRootNode().getNode(TextUtil.relativizePath(path));
+ // mime-type is defined according to resource's extension
+ assertEquals(MediaType.TEXT_HTML, node.getNode("jcr:content").getProperty("jcr:mimeType").getString());
+
+ MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
+ headers.add(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_XML);
+ service(WebDAVMethods.PUT, getPathWS() + path, "", headers, content.getBytes());
+ // mime-type modified according to Content-Type header content
+ assertEquals(MediaType.TEXT_XML, node.getNode("jcr:content").getProperty("jcr:mimeType").getString());
+ }
+
@Override
protected String getRepositoryName()
{
Modified: jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-configuration.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-configuration.xml 2012-02-15 10:55:04 UTC (rev 5639)
+++ jcr/branches/1.15.x/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-configuration.xml 2012-02-15 11:09:59 UTC (rev 5640)
@@ -209,6 +209,16 @@
<name>folder-icon-path</name>
<value>/absolute/path/to/file</value>
</value-param>
+
+ <!--
+ For testing untrusted-user-agents proper treatment.
+ Content-type headers of listed here user agents should be
+ ignored and MimeTypeResolver should be explicitly used instead
+ -->
+ <values-param>
+ <name>untrusted-user-agents</name>
+ <value>test-user-agent</value>
+ </values-param>
</init-params>
</component>
Modified: jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml
===================================================================
--- jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml 2012-02-15 10:55:04 UTC (rev 5639)
+++ jcr/branches/1.15.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml 2012-02-15 11:09:59 UTC (rev 5640)
@@ -1,58 +1,79 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This document was created with Syntext Serna Free. -->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="JCR.WebDAV">
-<?dbhtml filename="ch-webdav.html"?> <title>WebDAV</title>
+ <?dbhtml filename="ch-webdav.html"?>
+
+ <title>WebDAV</title>
+
<section>
<title>Related documents</title>
+
<itemizedlist>
<listitem>
- <para><link linkend="JCR.LinkProducerService">Link Producer</link></para>
+ <para><link linkend="JCR.LinkProducerService">Link
+ Producer</link></para>
</listitem>
</itemizedlist>
</section>
+
<section>
<title>Introduction</title>
+
<para>The WebDAV protocol enables you to use the third party tools to
communicate with hierarchical content servers via HTTP. It is possible to
add and remove documents or a set of documents from a path on the server.
DeltaV is an extension of the WebDav protocol that allows managing
document versioning. Locking guarantees protection against multiple access
when writing resources. The ordering support allows changing the position
- of the resource in the list and sort the directory to make the directory tree viewed conveniently. The full-text search makes it easy to find the
+ of the resource in the list and sort the directory to make the directory
+ tree viewed conveniently. The full-text search makes it easy to find the
necessary documents. You can search by using two languages: SQL and
XPATH.</para>
+
<para>In eXo JCR, we plug in the WebDAV layer - based on the code taken
from the extension modules of the reference implementation - on the top of
our JCR implementation so that it is possible to browse a workspace using
the third party tools (it can be Windows folders or Mac ones as well as a
Java WebDAV client, such as DAVExplorer or IE using File->Open as a Web
Folder).</para>
+
<para>Now WebDav is an extension of the REST service. To get the WebDav
server ready, you must deploy the REST application. Then, you can access
any workspaces of your repository by using the following URL:</para>
+
<para>Standalone mode:</para>
+
<para><uri>http://host:port/rest/jcr/{RepositoryName}/{WorkspaceName}/{Path}</uri></para>
+
<para>Portal mode:</para>
+
<para><uri>http://host:port/portal/rest/private/jcr/{RepositoryName}/{WorkspaceName}...</uri></para>
- <para>When accessing the WebDAV server with the URL<uri>http://localhost:8080/rest/jcr/repository/production</uri>, you might
- also use "collaboration" (instead of "production") which is the default
- workspace in eXo products. You will be asked to enter your login and
- password. Those will then be checked by using the organization service
- that can be implemented thanks to an InMemory (dummy) module or a DB module
- or an LDAP one and the JCR user session will be created with the correct JCR
- Credentials.</para>
+
+ <para>When accessing the WebDAV server with the
+ URL<uri>http://localhost:8080/rest/jcr/repository/production</uri>, you
+ might also use "collaboration" (instead of "production") which is the
+ default workspace in eXo products. You will be asked to enter your login
+ and password. Those will then be checked by using the organization service
+ that can be implemented thanks to an InMemory (dummy) module or a DB
+ module or an LDAP one and the JCR user session will be created with the
+ correct JCR Credentials.</para>
+
<note>
- <para>If you try the "in ECM"
- option, add "@ecm" to the user's password. Alternatively, you may modify
- jaas.conf by adding the <emphasis role="bold">domain=ecm</emphasis> option
- as follows:</para>
+ <para>If you try the "in ECM" option, add "@ecm" to the user's password.
+ Alternatively, you may modify jaas.conf by adding the <emphasis
+ role="bold">domain=ecm</emphasis> option as follows:</para>
+
<programlisting>exo-domain {
org.exoplatform.services.security.jaas.BasicLoginModule required domain=ecm;
};</programlisting>
</note>
</section>
+
<section>
<title>Configuration</title>
+
<programlisting language="xml"><component>
<key>org.exoplatform.services.webdav.WebDavServiceImpl</key>
<type>org.exoplatform.services.webdav.WebDavServiceImpl</type>
@@ -68,7 +89,7 @@
<!-- this is the value of WWW-Authenticate header -->
<value-param>
<name>auth-header</name>
- <value>Basic realm="eXo-Platform Webdav Server 1.6.1"</value>
+ <value>Basic realm="eXo-Platform Webdav Server 1.6.1"</value>
</value-param>
<!-- default node type which is used for the creation of collections -->
@@ -83,7 +104,7 @@
<value>nt:file</value>
</value-param>
- <!-- if MimeTypeResolver can't find the required mime type,
+ <!-- if MimeTypeResolver can't find the required mime type,
which conforms with the file extension, and the mimeType header is absent
in the HTTP request header, this parameter is used
as the default mime type-->
@@ -93,9 +114,9 @@
</value-param>
<!-- This parameter indicates one of the three cases when you update the content of the resource by PUT command.
- In case of "create-version", PUT command creates the new version of the resource if this resource exists.
- In case of "replace" - if the resource exists, PUT command updates the content of the resource and its last modification date.
- In case of "add", the PUT command tries to create the new resource with the same name (if the parent node allows same-name siblings).-->
+ In case of "create-version", PUT command creates the new version of the resource if this resource exists.
+ In case of "replace" - if the resource exists, PUT command updates the content of the resource and its last modification date.
+ In case of "add", the PUT command tries to create the new resource with the same name (if the parent node allows same-name siblings).-->
<value-param>
<name>update-policy</name>
@@ -106,8 +127,8 @@
<!--
This parameter determines how service responds to a method that attempts to modify file content.
- In case of "checkout-checkin" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout and followed by a checkin operation.
- In case of "checkout" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout operation.
+ In case of "checkout-checkin" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout and followed by a checkin operation.
+ In case of "checkout" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout operation.
-->
<value-param>
<name>auto-version</name>
@@ -117,7 +138,7 @@
<!--
This parameter is responsible for managing Cache-Control header value which will be returned to the client.
- You can use patterns like "text/*", "image/*" or wildcard to define the type of content.
+ You can use patterns like "text/*", "image/*" or wildcard to define the type of content.
-->
<value-param>
<name>cache-control</name>
@@ -133,209 +154,313 @@
<value>/absolute/path/to/file</value>
</value-param>
- </init-params
+ <!--
+ This parameter is responsible for untrusted user agents definition.
+ Content-type headers of listed here user agents should be
+ ignored and MimeTypeResolver should be explicitly used instead
+ -->
+ <values-param>
+ <name>untrusted-user-agents</name>
+ <value>Microsoft Office Core Storage Infrastructure/1.0</value>
+ </values-param>
+
+ </init-params>
</component></programlisting>
</section>
+
<section>
<title>Screenshots</title>
- <para>At present, eXo JCR WebDav server is tested by using MS Internet
- Explorer, <ulink url="http://www.ics.uci.edu/~webdav">Dav Explorer</ulink>, <ulink url="http://www.xythos.com/home/xythos/products/xythos_drive.html">Xythos Drive</ulink>, Microsoft Office 2003 (as client), and Ubuntu Linux.</para>
+
+ <para>At present, eXo JCR WebDav server is tested by using MS Internet
+ Explorer, <ulink url="http://www.ics.uci.edu/~webdav">Dav
+ Explorer</ulink>, <ulink
+ url="http://www.xythos.com/home/xythos/products/xythos_drive.html">Xythos
+ Drive</ulink>, Microsoft Office 2003 (as client), and Ubuntu Linux.</para>
+
<section>
<title>MS Internet Explorer</title>
+
<para>(File -> Open as Web Folder)</para>
+
<mediaobject>
<imageobject>
- <imagedata fileref="images/protocols/webdav_explorer.jpg"/>
+ <imagedata fileref="images/protocols/webdav_explorer.jpg" />
</imageobject>
</mediaobject>
</section>
+
<section>
<title>Dav Explorer</title>
+
<mediaobject>
<imageobject>
- <imagedata fileref="images/protocols/webdav_davexplorer.jpg"/>
+ <imagedata fileref="images/protocols/webdav_davexplorer.jpg" />
</imageobject>
</mediaobject>
</section>
+
<section>
<title>Xythos Drive</title>
+
<mediaobject>
<imageobject>
- <imagedata fileref="images/protocols/webdav_xythosdrive.jpg"/>
+ <imagedata fileref="images/protocols/webdav_xythosdrive.jpg" />
</imageobject>
</mediaobject>
</section>
+
<section>
<title>Microsoft Office 2003</title>
+
<para>(as client) (File->Open with typing http://... href in the file
name box)</para>
+
<mediaobject>
<imageobject>
- <imagedata fileref="images/protocols/webdav_msoffice2003.jpg"/>
+ <imagedata fileref="images/protocols/webdav_msoffice2003.jpg" />
</imageobject>
</mediaobject>
</section>
+
<section>
<title>Ubuntu Linux</title>
+
<mediaobject>
<imageobject>
- <imagedata fileref="images/protocols/webdav_ubuntulinux.jpg"/>
+ <imagedata fileref="images/protocols/webdav_ubuntulinux.jpg" />
</imageobject>
</mediaobject>
</section>
</section>
+
<section>
<title>Comparison table of WebDav and JCR commands</title>
+
<table>
- <title/>
+ <title></title>
+
<tgroup cols="2">
<thead>
<row>
<entry>WebDav</entry>
+
<entry>JCR</entry>
</row>
</thead>
+
<tbody>
<row>
<entry>COPY</entry>
+
<entry>Workspace.copy(...)</entry>
</row>
+
<row>
<entry>DELETE</entry>
+
<entry>Node.remove()</entry>
</row>
+
<row>
<entry>GET</entry>
+
<entry>Node.getProperty(...); Property.getValue()</entry>
</row>
+
<row>
<entry>HEAD</entry>
+
<entry>Node.getProperty(...); Property.getLength()</entry>
</row>
+
<row>
<entry>MKCOL</entry>
+
<entry>Node.addNode(...)</entry>
</row>
+
<row>
<entry>MOVE</entry>
+
<entry>Session.move(...) or Workspace.move(...)</entry>
</row>
+
<row>
<entry>PROPFIND</entry>
- <entry>Session.getNode(...); Node.getNode(...); Node.getNodes(...); Node.getProperties()</entry>
+
+ <entry>Session.getNode(...); Node.getNode(...);
+ Node.getNodes(...); Node.getProperties()</entry>
</row>
+
<row>
<entry>PROPPATCH</entry>
- <entry>Node.setProperty(...); Node.getProperty(...).remove()</entry>
+
+ <entry>Node.setProperty(...);
+ Node.getProperty(...).remove()</entry>
</row>
+
<row>
<entry>PUT</entry>
- <entry>Node.addNode("node","nt:file"); Node.setProperty("jcr:data", "data")</entry>
+
+ <entry>Node.addNode("node","nt:file");
+ Node.setProperty("jcr:data", "data")</entry>
</row>
+
<row>
<entry>CHECKIN</entry>
+
<entry>Node.checkin()</entry>
</row>
+
<row>
<entry>CHECKOUT</entry>
+
<entry>Node.checkout()</entry>
</row>
+
<row>
<entry>REPORT</entry>
- <entry>Node.getVersionHistory(); VersionHistory.getAllVersions(); Version.getProperties()</entry>
+
+ <entry>Node.getVersionHistory(); VersionHistory.getAllVersions();
+ Version.getProperties()</entry>
</row>
+
<row>
<entry>RESTORE</entry>
+
<entry>Node.restore(...)</entry>
</row>
+
<row>
<entry>UNCHECKOUT</entry>
+
<entry>Node.restore(...)</entry>
</row>
+
<row>
<entry>VERSION-CONTROL</entry>
- <entry>Node.addMixin("mix:versionable")</entry>
+
+ <entry>Node.addMixin("mix:versionable")</entry>
</row>
+
<row>
<entry>LOCK</entry>
+
<entry>Node.lock(...)</entry>
</row>
+
<row>
<entry>UNLOCK</entry>
+
<entry>Node.unlock()</entry>
</row>
+
<row>
<entry>ORDERPATCH</entry>
+
<entry>Node.orderBefore(...)</entry>
</row>
+
<row>
<entry>SEARCH</entry>
- <entry>Workspace.getQueryManager(); QueryManager.createQuery(); Query.execute()</entry>
+
+ <entry>Workspace.getQueryManager(); QueryManager.createQuery();
+ Query.execute()</entry>
</row>
</tbody>
</tgroup>
</table>
</section>
+
<section>
<title>Restrictions</title>
+
<para>There are some restrictions for WebDAV in different Operating
systems.</para>
+
<section>
<title>Windows 7</title>
+
<para>When you try to set up a web folder by “adding a network location”
or “map a network drive” through My Computer, you can get an error
- message saying that either “The folder you entered does not appear to be valid.
- Please choose another” or “Windows cannot access… Check the spelling of
- the name. Otherwise, there might be…”. These errors may appear when you are
- using SSL or non-SSL.</para>
- <para>To fix this, do as follows:</para>
+ message saying that either “The folder you entered does not appear to be
+ valid. Please choose another” or “Windows cannot access… Check the
+ spelling of the name. Otherwise, there might be…”. These errors may
+ appear when you are using SSL or non-SSL.</para>
+
+ <para>To fix this, do as follows:</para>
+
<orderedlist>
<listitem>
<para>Go to Windows Registry Editor.</para>
</listitem>
+
<listitem>
<para>Find a key:
\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlset\services\WebClient\Parameters\BasicAuthLevel
.</para>
</listitem>
+
<listitem>
<para>Change the value to 2.</para>
</listitem>
</orderedlist>
</section>
- <section>
+
+ <section>
<title>Microsoft Office 2010</title>
- <para>If you have Microsoft Office 2010 applications or Microsoft Office 2007 applications installed on a client computer. From that client computer, you try to access an Office file that is stored on a web server that is configured for Basic authentication. The connection between your computer and the web server does not use Secure Sockets Layer (SSL). When you try to open or to download the file, you experience the following symptoms:
- <itemizedlist>
+
+ <para>If you have Microsoft Office 2010 applications or Microsoft Office
+ 2007 applications installed on a client computer. From that client
+ computer, you try to access an Office file that is stored on a web
+ server that is configured for Basic authentication. The connection
+ between your computer and the web server does not use Secure Sockets
+ Layer (SSL). When you try to open or to download the file, you
+ experience the following symptoms: <itemizedlist>
<listitem>
<para>The Office file does not open or download.</para>
- </listitem>
+ </listitem>
+
<listitem>
- <para>You do not receive a Basic authentication password prompt when you try to open or to download the file.</para>
+ <para>You do not receive a Basic authentication password prompt
+ when you try to open or to download the file.</para>
</listitem>
+
<listitem>
- <para>You do not receive an error message when you try to open the file. The associated Office application starts. However, the selected file does not open.</para>
+ <para>You do not receive an error message when you try to open the
+ file. The associated Office application starts. However, the
+ selected file does not open.</para>
</listitem>
- </itemizedlist>
- </para>
- <para>To enable Basic authentication on the client computer, follow these steps:</para>
+ </itemizedlist></para>
+
+ <para>To enable Basic authentication on the client computer, follow
+ these steps:</para>
+
<orderedlist>
<listitem>
- <para>Click Start, type regedit in the Start Search box, and then press Enter.</para>
+ <para>Click Start, type regedit in the Start Search box, and then
+ press Enter.</para>
</listitem>
+
<listitem>
- <para>Locate and then click the following registry subkey: </para>
+ <para>Locate and then click the following registry subkey:</para>
+
<para>HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\Internet</para>
</listitem>
+
<listitem>
- <para>On the Edit menu, point to New, and then click DWORD Value.</para>
+ <para>On the Edit menu, point to New, and then click DWORD
+ Value.</para>
</listitem>
+
<listitem>
<para>Type BasicAuthLevel, and then press Enter.</para>
</listitem>
+
<listitem>
<para>Right-click BasicAuthLevel, and then click Modify.</para>
</listitem>
+
<listitem>
<para>In the Value data box, type 2, and then click OK.</para>
</listitem>
12 years, 4 months
exo-jcr SVN: r5639 - jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2012-02-15 05:55:04 -0500 (Wed, 15 Feb 2012)
New Revision: 5639
Modified:
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml
Log:
EXOJCR-1719: added docbook description of 'untrusted-user-agents' initial parameter
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml 2012-02-15 10:20:35 UTC (rev 5638)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/protocols/webdav.xml 2012-02-15 10:55:04 UTC (rev 5639)
@@ -1,58 +1,79 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- This document was created with Syntext Serna Free. --><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This document was created with Syntext Serna Free. -->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="JCR.WebDAV">
-<?dbhtml filename="ch-webdav.html"?> <title>WebDAV</title>
+ <?dbhtml filename="ch-webdav.html"?>
+
+ <title>WebDAV</title>
+
<section>
<title>Related documents</title>
+
<itemizedlist>
<listitem>
- <para><link linkend="JCR.LinkProducerService">Link Producer</link></para>
+ <para><link linkend="JCR.LinkProducerService">Link
+ Producer</link></para>
</listitem>
</itemizedlist>
</section>
+
<section>
<title>Introduction</title>
+
<para>The WebDAV protocol enables you to use the third party tools to
communicate with hierarchical content servers via HTTP. It is possible to
add and remove documents or a set of documents from a path on the server.
DeltaV is an extension of the WebDav protocol that allows managing
document versioning. Locking guarantees protection against multiple access
when writing resources. The ordering support allows changing the position
- of the resource in the list and sort the directory to make the directory tree viewed conveniently. The full-text search makes it easy to find the
+ of the resource in the list and sort the directory to make the directory
+ tree viewed conveniently. The full-text search makes it easy to find the
necessary documents. You can search by using two languages: SQL and
XPATH.</para>
+
<para>In eXo JCR, we plug in the WebDAV layer - based on the code taken
from the extension modules of the reference implementation - on the top of
our JCR implementation so that it is possible to browse a workspace using
the third party tools (it can be Windows folders or Mac ones as well as a
Java WebDAV client, such as DAVExplorer or IE using File->Open as a Web
Folder).</para>
+
<para>Now WebDav is an extension of the REST service. To get the WebDav
server ready, you must deploy the REST application. Then, you can access
any workspaces of your repository by using the following URL:</para>
+
<para>Standalone mode:</para>
+
<para><uri>http://host:port/rest/jcr/{RepositoryName}/{WorkspaceName}/{Path}</uri></para>
+
<para>Portal mode:</para>
+
<para><uri>http://host:port/portal/rest/private/jcr/{RepositoryName}/{WorkspaceName}...</uri></para>
- <para>When accessing the WebDAV server with the URL<uri>http://localhost:8080/rest/jcr/repository/production</uri>, you might
- also use "collaboration" (instead of "production") which is the default
- workspace in eXo products. You will be asked to enter your login and
- password. Those will then be checked by using the organization service
- that can be implemented thanks to an InMemory (dummy) module or a DB module
- or an LDAP one and the JCR user session will be created with the correct JCR
- Credentials.</para>
+
+ <para>When accessing the WebDAV server with the
+ URL<uri>http://localhost:8080/rest/jcr/repository/production</uri>, you
+ might also use "collaboration" (instead of "production") which is the
+ default workspace in eXo products. You will be asked to enter your login
+ and password. Those will then be checked by using the organization service
+ that can be implemented thanks to an InMemory (dummy) module or a DB
+ module or an LDAP one and the JCR user session will be created with the
+ correct JCR Credentials.</para>
+
<note>
- <para>If you try the "in ECM"
- option, add "@ecm" to the user's password. Alternatively, you may modify
- jaas.conf by adding the <emphasis role="bold">domain=ecm</emphasis> option
- as follows:</para>
+ <para>If you try the "in ECM" option, add "@ecm" to the user's password.
+ Alternatively, you may modify jaas.conf by adding the <emphasis
+ role="bold">domain=ecm</emphasis> option as follows:</para>
+
<programlisting>exo-domain {
org.exoplatform.services.security.jaas.BasicLoginModule required domain=ecm;
};</programlisting>
</note>
</section>
+
<section>
<title>Configuration</title>
+
<programlisting language="xml"><component>
<key>org.exoplatform.services.webdav.WebDavServiceImpl</key>
<type>org.exoplatform.services.webdav.WebDavServiceImpl</type>
@@ -68,7 +89,7 @@
<!-- this is the value of WWW-Authenticate header -->
<value-param>
<name>auth-header</name>
- <value>Basic realm="eXo-Platform Webdav Server 1.6.1"</value>
+ <value>Basic realm="eXo-Platform Webdav Server 1.6.1"</value>
</value-param>
<!-- default node type which is used for the creation of collections -->
@@ -83,7 +104,7 @@
<value>nt:file</value>
</value-param>
- <!-- if MimeTypeResolver can't find the required mime type,
+ <!-- if MimeTypeResolver can't find the required mime type,
which conforms with the file extension, and the mimeType header is absent
in the HTTP request header, this parameter is used
as the default mime type-->
@@ -93,9 +114,9 @@
</value-param>
<!-- This parameter indicates one of the three cases when you update the content of the resource by PUT command.
- In case of "create-version", PUT command creates the new version of the resource if this resource exists.
- In case of "replace" - if the resource exists, PUT command updates the content of the resource and its last modification date.
- In case of "add", the PUT command tries to create the new resource with the same name (if the parent node allows same-name siblings).-->
+ In case of "create-version", PUT command creates the new version of the resource if this resource exists.
+ In case of "replace" - if the resource exists, PUT command updates the content of the resource and its last modification date.
+ In case of "add", the PUT command tries to create the new resource with the same name (if the parent node allows same-name siblings).-->
<value-param>
<name>update-policy</name>
@@ -106,8 +127,8 @@
<!--
This parameter determines how service responds to a method that attempts to modify file content.
- In case of "checkout-checkin" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout and followed by a checkin operation.
- In case of "checkout" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout operation.
+ In case of "checkout-checkin" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout and followed by a checkin operation.
+ In case of "checkout" value, when a modification request is applied to a checked-in version-controlled resource, the request is automatically preceded by a checkout operation.
-->
<value-param>
<name>auto-version</name>
@@ -117,7 +138,7 @@
<!--
This parameter is responsible for managing Cache-Control header value which will be returned to the client.
- You can use patterns like "text/*", "image/*" or wildcard to define the type of content.
+ You can use patterns like "text/*", "image/*" or wildcard to define the type of content.
-->
<value-param>
<name>cache-control</name>
@@ -133,209 +154,313 @@
<value>/absolute/path/to/file</value>
</value-param>
- </init-params
+ <!--
+ This parameter is responsible for untrusted user agents definition.
+ Content-type headers of listed here user agents should be
+ ignored and MimeTypeResolver should be explicitly used instead
+ -->
+ <values-param>
+ <name>untrusted-user-agents</name>
+ <value>Microsoft Office Core Storage Infrastructure/1.0</value>
+ </values-param>
+
+ </init-params>
</component></programlisting>
</section>
+
<section>
<title>Screenshots</title>
- <para>At present, eXo JCR WebDav server is tested by using MS Internet
- Explorer, <ulink url="http://www.ics.uci.edu/~webdav">Dav Explorer</ulink>, <ulink url="http://www.xythos.com/home/xythos/products/xythos_drive.html">Xythos Drive</ulink>, Microsoft Office 2003 (as client), and Ubuntu Linux.</para>
+
+ <para>At present, eXo JCR WebDav server is tested by using MS Internet
+ Explorer, <ulink url="http://www.ics.uci.edu/~webdav">Dav
+ Explorer</ulink>, <ulink
+ url="http://www.xythos.com/home/xythos/products/xythos_drive.html">Xythos
+ Drive</ulink>, Microsoft Office 2003 (as client), and Ubuntu Linux.</para>
+
<section>
<title>MS Internet Explorer</title>
+
<para>(File -> Open as Web Folder)</para>
+
<mediaobject>
<imageobject>
- <imagedata fileref="images/protocols/webdav_explorer.jpg"/>
+ <imagedata fileref="images/protocols/webdav_explorer.jpg" />
</imageobject>
</mediaobject>
</section>
+
<section>
<title>Dav Explorer</title>
+
<mediaobject>
<imageobject>
- <imagedata fileref="images/protocols/webdav_davexplorer.jpg"/>
+ <imagedata fileref="images/protocols/webdav_davexplorer.jpg" />
</imageobject>
</mediaobject>
</section>
+
<section>
<title>Xythos Drive</title>
+
<mediaobject>
<imageobject>
- <imagedata fileref="images/protocols/webdav_xythosdrive.jpg"/>
+ <imagedata fileref="images/protocols/webdav_xythosdrive.jpg" />
</imageobject>
</mediaobject>
</section>
+
<section>
<title>Microsoft Office 2003</title>
+
<para>(as client) (File->Open with typing http://... href in the file
name box)</para>
+
<mediaobject>
<imageobject>
- <imagedata fileref="images/protocols/webdav_msoffice2003.jpg"/>
+ <imagedata fileref="images/protocols/webdav_msoffice2003.jpg" />
</imageobject>
</mediaobject>
</section>
+
<section>
<title>Ubuntu Linux</title>
+
<mediaobject>
<imageobject>
- <imagedata fileref="images/protocols/webdav_ubuntulinux.jpg"/>
+ <imagedata fileref="images/protocols/webdav_ubuntulinux.jpg" />
</imageobject>
</mediaobject>
</section>
</section>
+
<section>
<title>Comparison table of WebDav and JCR commands</title>
+
<table>
- <title/>
+ <title></title>
+
<tgroup cols="2">
<thead>
<row>
<entry>WebDav</entry>
+
<entry>JCR</entry>
</row>
</thead>
+
<tbody>
<row>
<entry>COPY</entry>
+
<entry>Workspace.copy(...)</entry>
</row>
+
<row>
<entry>DELETE</entry>
+
<entry>Node.remove()</entry>
</row>
+
<row>
<entry>GET</entry>
+
<entry>Node.getProperty(...); Property.getValue()</entry>
</row>
+
<row>
<entry>HEAD</entry>
+
<entry>Node.getProperty(...); Property.getLength()</entry>
</row>
+
<row>
<entry>MKCOL</entry>
+
<entry>Node.addNode(...)</entry>
</row>
+
<row>
<entry>MOVE</entry>
+
<entry>Session.move(...) or Workspace.move(...)</entry>
</row>
+
<row>
<entry>PROPFIND</entry>
- <entry>Session.getNode(...); Node.getNode(...); Node.getNodes(...); Node.getProperties()</entry>
+
+ <entry>Session.getNode(...); Node.getNode(...);
+ Node.getNodes(...); Node.getProperties()</entry>
</row>
+
<row>
<entry>PROPPATCH</entry>
- <entry>Node.setProperty(...); Node.getProperty(...).remove()</entry>
+
+ <entry>Node.setProperty(...);
+ Node.getProperty(...).remove()</entry>
</row>
+
<row>
<entry>PUT</entry>
- <entry>Node.addNode("node","nt:file"); Node.setProperty("jcr:data", "data")</entry>
+
+ <entry>Node.addNode("node","nt:file");
+ Node.setProperty("jcr:data", "data")</entry>
</row>
+
<row>
<entry>CHECKIN</entry>
+
<entry>Node.checkin()</entry>
</row>
+
<row>
<entry>CHECKOUT</entry>
+
<entry>Node.checkout()</entry>
</row>
+
<row>
<entry>REPORT</entry>
- <entry>Node.getVersionHistory(); VersionHistory.getAllVersions(); Version.getProperties()</entry>
+
+ <entry>Node.getVersionHistory(); VersionHistory.getAllVersions();
+ Version.getProperties()</entry>
</row>
+
<row>
<entry>RESTORE</entry>
+
<entry>Node.restore(...)</entry>
</row>
+
<row>
<entry>UNCHECKOUT</entry>
+
<entry>Node.restore(...)</entry>
</row>
+
<row>
<entry>VERSION-CONTROL</entry>
- <entry>Node.addMixin("mix:versionable")</entry>
+
+ <entry>Node.addMixin("mix:versionable")</entry>
</row>
+
<row>
<entry>LOCK</entry>
+
<entry>Node.lock(...)</entry>
</row>
+
<row>
<entry>UNLOCK</entry>
+
<entry>Node.unlock()</entry>
</row>
+
<row>
<entry>ORDERPATCH</entry>
+
<entry>Node.orderBefore(...)</entry>
</row>
+
<row>
<entry>SEARCH</entry>
- <entry>Workspace.getQueryManager(); QueryManager.createQuery(); Query.execute()</entry>
+
+ <entry>Workspace.getQueryManager(); QueryManager.createQuery();
+ Query.execute()</entry>
</row>
</tbody>
</tgroup>
</table>
</section>
+
<section>
<title>Restrictions</title>
+
<para>There are some restrictions for WebDAV in different Operating
systems.</para>
+
<section>
<title>Windows 7</title>
+
<para>When you try to set up a web folder by “adding a network location”
or “map a network drive” through My Computer, you can get an error
- message saying that either “The folder you entered does not appear to be valid.
- Please choose another” or “Windows cannot access… Check the spelling of
- the name. Otherwise, there might be…”. These errors may appear when you are
- using SSL or non-SSL.</para>
- <para>To fix this, do as follows:</para>
+ message saying that either “The folder you entered does not appear to be
+ valid. Please choose another” or “Windows cannot access… Check the
+ spelling of the name. Otherwise, there might be…”. These errors may
+ appear when you are using SSL or non-SSL.</para>
+
+ <para>To fix this, do as follows:</para>
+
<orderedlist>
<listitem>
<para>Go to Windows Registry Editor.</para>
</listitem>
+
<listitem>
<para>Find a key:
\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlset\services\WebClient\Parameters\BasicAuthLevel
.</para>
</listitem>
+
<listitem>
<para>Change the value to 2.</para>
</listitem>
</orderedlist>
</section>
- <section>
+
+ <section>
<title>Microsoft Office 2010</title>
- <para>If you have Microsoft Office 2010 applications or Microsoft Office 2007 applications installed on a client computer. From that client computer, you try to access an Office file that is stored on a web server that is configured for Basic authentication. The connection between your computer and the web server does not use Secure Sockets Layer (SSL). When you try to open or to download the file, you experience the following symptoms:
- <itemizedlist>
+
+ <para>If you have Microsoft Office 2010 applications or Microsoft Office
+ 2007 applications installed on a client computer. From that client
+ computer, you try to access an Office file that is stored on a web
+ server that is configured for Basic authentication. The connection
+ between your computer and the web server does not use Secure Sockets
+ Layer (SSL). When you try to open or to download the file, you
+ experience the following symptoms: <itemizedlist>
<listitem>
<para>The Office file does not open or download.</para>
- </listitem>
+ </listitem>
+
<listitem>
- <para>You do not receive a Basic authentication password prompt when you try to open or to download the file.</para>
+ <para>You do not receive a Basic authentication password prompt
+ when you try to open or to download the file.</para>
</listitem>
+
<listitem>
- <para>You do not receive an error message when you try to open the file. The associated Office application starts. However, the selected file does not open.</para>
+ <para>You do not receive an error message when you try to open the
+ file. The associated Office application starts. However, the
+ selected file does not open.</para>
</listitem>
- </itemizedlist>
- </para>
- <para>To enable Basic authentication on the client computer, follow these steps:</para>
+ </itemizedlist></para>
+
+ <para>To enable Basic authentication on the client computer, follow
+ these steps:</para>
+
<orderedlist>
<listitem>
- <para>Click Start, type regedit in the Start Search box, and then press Enter.</para>
+ <para>Click Start, type regedit in the Start Search box, and then
+ press Enter.</para>
</listitem>
+
<listitem>
- <para>Locate and then click the following registry subkey: </para>
+ <para>Locate and then click the following registry subkey:</para>
+
<para>HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\Internet</para>
</listitem>
+
<listitem>
- <para>On the Edit menu, point to New, and then click DWORD Value.</para>
+ <para>On the Edit menu, point to New, and then click DWORD
+ Value.</para>
</listitem>
+
<listitem>
<para>Type BasicAuthLevel, and then press Enter.</para>
</listitem>
+
<listitem>
<para>Right-click BasicAuthLevel, and then click Modify.</para>
</listitem>
+
<listitem>
<para>In the Value data box, type 2, and then click OK.</para>
</listitem>
12 years, 4 months
exo-jcr SVN: r5638 - in jcr/trunk/exo.jcr.component.webdav/src: test/java/org/exoplatform/services/jcr/webdav/command and 1 other directories.
by do-not-reply@jboss.org
Author: dkuleshov
Date: 2012-02-15 05:20:35 -0500 (Wed, 15 Feb 2012)
New Revision: 5638
Modified:
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavService.java
jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java
jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java
jcr/trunk/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-configuration.xml
Log:
EXOJCR-1719: added new WebDavServiceImpl initial parameter - 'untrusted-user-agents'
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavService.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavService.java 2012-02-15 09:40:04 UTC (rev 5637)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavService.java 2012-02-15 10:20:35 UTC (rev 5638)
@@ -67,7 +67,7 @@
Response head(String repoName, String repoPath, UriInfo baseURI);
/**
- * WedDAV "HEAD" method. See <a
+ * WedDAV "PUT" method. See <a
* href='http://www.ietf.org/rfc/rfc2518.txt'>HTTP methods for distributed
* authoring sec. 8.7 "PUT"</a>.
*
@@ -82,16 +82,39 @@
* @param inputStream stream that contain incoming data
* @return the instance of javax.ws.rs.core.Response
*/
+ @Deprecated
Response put(String repoName, String repoPath, String lockTokenHeader, String ifHeader, String fileNodeTypeHeader,
String contentNodeTypeHeader, String mixinTypes, MediaType mediatype, InputStream inputStream);
/**
+ * WedDAV "PUT" method. See <a
+ * href='http://www.ietf.org/rfc/rfc2518.txt'>HTTP methods for distributed
+ * authoring sec. 8.7 "PUT"</a>.
+ *
* @param repoName repository name
* @param repoPath path in repository
* @param lockTokenHeader Lock-Token HTTP header
* @param ifHeader If HTTP Header
+ * @param fileNodeTypeHeader JCR NodeType header
+ * @param contentNodeTypeHeader JCR Content-NodeType header
+ * @param mixinTypes JCR Mixin types header
+ * @param mimeType Content-Type HTTP header
+ * @param userAgent User-Agent HTTP header
+ * @param inputStream stream that contain incoming data
+ * @param UriInfo URI info
* @return the instance of javax.ws.rs.core.Response
*/
+ Response put(String repoName, String repoPath, String lockTokenHeader, String ifHeader, String fileNodeTypeHeader,
+ String contentNodeTypeHeader, String mixinTypes, MediaType mediatype, String userAgent, InputStream inputStream,
+ UriInfo uriInfo);
+
+ /**
+ * @param repoName repository name
+ * @param repoPath path in repository
+ * @param lockTokenHeader Lock-Token HTTP header
+ * @param ifHeader If HTTP Header
+ * @return the instance of javax.ws.rs.core.Response
+ */
Response delete(String repoName, String repoPath, String lockTokenHeader, String ifHeader);
/**
Modified: jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java 2012-02-15 09:40:04 UTC (rev 5637)
+++ jcr/trunk/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/WebDavServiceImpl.java 2012-02-15 10:20:35 UTC (rev 5638)
@@ -23,6 +23,7 @@
import org.exoplatform.commons.utils.MimeTypeResolver;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.container.xml.ValueParam;
+import org.exoplatform.container.xml.ValuesParam;
import org.exoplatform.services.jcr.RepositoryService;
import org.exoplatform.services.jcr.core.ManageableRepository;
import org.exoplatform.services.jcr.ext.app.ThreadLocalSessionProviderService;
@@ -78,8 +79,10 @@
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import javax.jcr.NoSuchWorkspaceException;
import javax.jcr.PathNotFoundException;
@@ -143,6 +146,8 @@
public static final String FOLDER_ICON_PATH = "folder-icon-path";
+ public static final String UNTRUSTED_USER_AGENTS = "untrusted-user-agents";
+
/**
* Logger.
*/
@@ -194,6 +199,11 @@
private Map<String, String> xsltParams = new HashMap<String, String>();
/**
+ * Set of untrusted user agents. Special rules are applied for listed agents.
+ */
+ private Set<String> untrustedUserAgents = new HashSet<String>();
+
+ /**
* The list of allowed methods.
*/
private static final String ALLOW;
@@ -303,6 +313,13 @@
}
}
+
+ ValuesParam pUntrustedUserAgents = params.getValuesParam(UNTRUSTED_USER_AGENTS);
+ if (pUntrustedUserAgents != null)
+ {
+ untrustedUserAgents.addAll((List<String>)pUntrustedUserAgents.getValues());
+ }
+
this.mimeTypeResolver = new MimeTypeResolver();
this.mimeTypeResolver.setDefaultMimeType(defaultFileMimeType);
}
@@ -386,6 +403,24 @@
}
}
+
+ /*
+ * As this constructor receives Map<String, String> instead of InitParams
+ * we cannot pass multi-valued parameters in the form of
+ * String -> Collection
+ * We pass a set of 'untrusted-user-agents' as a single String
+ * with mime types separated by comma (",")
+ * i.e. "agent1, agent2, agent3"
+ */
+ paramValue = params.get(UNTRUSTED_USER_AGENTS);
+ if (paramValue != null)
+ {
+ for (String mimeType : paramValue.split(","))
+ {
+ untrustedUserAgents.add(mimeType.trim());
+ }
+ }
+
this.mimeTypeResolver = new MimeTypeResolver();
this.mimeTypeResolver.setDefaultMimeType(defaultFileMimeType);
}
@@ -1129,6 +1164,21 @@
/**
* {@inheritDoc}
*/
+ @Deprecated
+ public Response put(@PathParam("repoName") String repoName, @PathParam("repoPath") String repoPath,
+ @HeaderParam(ExtHttpHeaders.LOCKTOKEN) String lockTokenHeader, @HeaderParam(ExtHttpHeaders.IF) String ifHeader,
+ @HeaderParam(ExtHttpHeaders.FILE_NODETYPE) String fileNodeTypeHeader,
+ @HeaderParam(ExtHttpHeaders.CONTENT_NODETYPE) String contentNodeTypeHeader,
+ @HeaderParam(ExtHttpHeaders.CONTENT_MIXINTYPES) String mixinTypes,
+ @HeaderParam(ExtHttpHeaders.CONTENT_TYPE) MediaType mediatype, InputStream inputStream, @Context UriInfo uriInfo)
+ {
+ return put(repoName, repoPath, lockTokenHeader, ifHeader, fileNodeTypeHeader, contentNodeTypeHeader, mixinTypes,
+ mediatype, null, inputStream, uriInfo);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
@PUT
@Path("/{repoName}/{repoPath:.*}/")
public Response put(@PathParam("repoName") String repoName, @PathParam("repoPath") String repoPath,
@@ -1136,7 +1186,8 @@
@HeaderParam(ExtHttpHeaders.FILE_NODETYPE) String fileNodeTypeHeader,
@HeaderParam(ExtHttpHeaders.CONTENT_NODETYPE) String contentNodeTypeHeader,
@HeaderParam(ExtHttpHeaders.CONTENT_MIXINTYPES) String mixinTypes,
- @HeaderParam(ExtHttpHeaders.CONTENT_TYPE) MediaType mediatype, InputStream inputStream, @Context UriInfo uriInfo)
+ @HeaderParam(ExtHttpHeaders.CONTENT_TYPE) MediaType mediatype,
+ @HeaderParam(ExtHttpHeaders.USER_AGENT) String userAgent, InputStream inputStream, @Context UriInfo uriInfo)
{
if (log.isDebugEnabled())
{
@@ -1150,7 +1201,7 @@
String mimeType = null;
String encoding = null;
- if (mediatype == null)
+ if (mediatype == null || untrustedUserAgents.contains(userAgent))
{
mimeType = mimeTypeResolver.getMimeType(TextUtil.nameOnly(repoPath));
}
@@ -1528,4 +1579,5 @@
return new URI(TextUtil.escape(path, '%', true));
}
}
+
}
Modified: jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java 2012-02-15 09:40:04 UTC (rev 5637)
+++ jcr/trunk/exo.jcr.component.webdav/src/test/java/org/exoplatform/services/jcr/webdav/command/TestPut.java 2012-02-15 10:20:35 UTC (rev 5638)
@@ -184,6 +184,85 @@
.toString());
}
+ /**
+ * Testing if we use MimeTypeResolver to define jcr:mimeType property
+ * for untrusted user agents during resource creation.
+ */
+ public void testUntrustedUserAgentResourceCreation() throws Exception
+ {
+ String content = TestUtils.getFileContent();
+ String path = TestUtils.getFileName();
+
+ // create User-Agent header indicating that the resource we create
+ // has application/octet-stream type
+ // though it's extension is .txt
+ MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
+ headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM);
+ headers.add(HttpHeaders.USER_AGENT, "test-user-agent");
+
+ // fullfiling the request
+ service(WebDAVMethods.PUT, getPathWS() + path, "", headers, content.getBytes());
+
+ Node node = session.getRootNode().getNode(TextUtil.relativizePath(path)).getNode("jcr:content");
+ // though that we passed application/octet-stream mime type
+ // the user agent is within untrusted user agents set
+ // so we use MimeTypeResolver to define the mimeType and
+ // ignore Content-Type header
+ assertEquals(MediaType.TEXT_PLAIN, node.getProperty("jcr:mimeType").getString());
+ }
+
+ /**
+ * Testing if we use MimeTypeResolver to define jcr:mimeType property
+ * for untrusted user agents during resource modification.
+ */
+ public void testUntrustedUserAgentResourceModification() throws Exception
+ {
+ String content = TestUtils.getFileContent();
+ String path = TestUtils.getFileName();
+
+ // create data with 'trusted' user agent
+ // (all user agents are considered to be trusted
+ // if they are not listed as untrusted)
+ MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
+ headers.add(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_PLAIN);
+
+ service(WebDAVMethods.PUT, getPathWS() + path, "", headers, content.getBytes());
+
+ headers.clear();
+ content = TestUtils.getFileContent();
+ // define user agent to be among untrusted user agents
+ headers.add(HttpHeaders.USER_AGENT, "test-user-agent");
+ // define incorrect mime-type via seting Content-Type header
+ headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM);
+
+ service(WebDAVMethods.PUT, getPathWS() + path, "", headers, content.getBytes());
+
+ Node node = session.getRootNode().getNode(TextUtil.relativizePath(path)).getNode("jcr:content");
+ // mime-type should still be correct
+ assertEquals(MediaType.TEXT_PLAIN, node.getProperty("jcr:mimeType").getString());
+ }
+
+ /**
+ * Testing if we can modify mime-type of previously defined resource
+ * via trusted user agent
+ */
+ public void testTrustedUserAgentResourceModification() throws Exception
+ {
+ String content = TestUtils.getFileContent();
+ String path = TestUtils.getFileName() + ".html";
+
+ service(WebDAVMethods.PUT, getPathWS() + path, "", null, content.getBytes());
+ Node node = session.getRootNode().getNode(TextUtil.relativizePath(path));
+ // mime-type is defined according to resource's extension
+ assertEquals(MediaType.TEXT_HTML, node.getNode("jcr:content").getProperty("jcr:mimeType").getString());
+
+ MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
+ headers.add(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_XML);
+ service(WebDAVMethods.PUT, getPathWS() + path, "", headers, content.getBytes());
+ // mime-type modified according to Content-Type header content
+ assertEquals(MediaType.TEXT_XML, node.getNode("jcr:content").getProperty("jcr:mimeType").getString());
+ }
+
@Override
protected String getRepositoryName()
{
Modified: jcr/trunk/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-configuration.xml 2012-02-15 09:40:04 UTC (rev 5637)
+++ jcr/trunk/exo.jcr.component.webdav/src/test/resources/conf/standalone/test-configuration.xml 2012-02-15 10:20:35 UTC (rev 5638)
@@ -209,6 +209,16 @@
<name>folder-icon-path</name>
<value>/absolute/path/to/file</value>
</value-param>
+
+ <!--
+ For testing untrusted-user-agents proper treatment.
+ Content-type headers of listed here user agents should be
+ ignored and MimeTypeResolver should be explicitly used instead
+ -->
+ <values-param>
+ <name>untrusted-user-agents</name>
+ <value>test-user-agent</value>
+ </values-param>
</init-params>
</component>
12 years, 4 months