Index: .checkstyle
===================================================================
RCS file: .checkstyle
diff -N .checkstyle
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ .checkstyle	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true">
+  <fileset name="all" enabled="true" check-config-name="OpenCms" local="false">
+    <file-match-pattern match-pattern="." include-pattern="true"/>
+  </fileset>
+</fileset-config>
Index: .classpath
===================================================================
RCS file: .classpath
diff -N .classpath
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ .classpath	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="src-modules"/>
+	<classpathentry kind="src" path="src-components"/>
+	<classpathentry kind="src" path="src-setup"/>
+	<classpathentry excluding="data/**|org/opencms/util/ant/" kind="src" path="test"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="lib" path="modules/org.opencms.frontend.layoutpage/resources/system/modules/org.opencms.frontend.layoutpage/lib/freemarker-2.3.6.jar"/>
+	<classpathentry kind="lib" path="lib/compile/ant.jar"/>
+	<classpathentry kind="lib" path="lib/compile/ant-contrib-1.0b1.jar"/>
+	<classpathentry kind="lib" path="lib/compile/ant-opencms-1.1.jar"/>
+	<classpathentry kind="lib" path="lib/compile/jsp-api.jar"/>
+	<classpathentry kind="lib" path="lib/compile/junit-3-8-1.jar"/>
+	<classpathentry kind="lib" path="lib/compile/servlet-api.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/alkacon-diff-0.9.2.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/commons-codec-1.3.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/commons-dbcp-1.2.2.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/commons-digester-1.8.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/dom4j-1.6.1.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/htmlparser-1.6-20060610.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/jakarta-oro-2.0.8.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/jstl-1.1.2.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/jug-lgpl-2.0.0.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/PDFBox-0.7.2.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/poi-2.5.1-final-20040804.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/quartz-1.5.2.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/standard-1.1.2.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/tm-extractors-0.4.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/jtidy-8-svn-2006-05-21b.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/activation-1.1.1.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/alkacon-simapi-0.9.8.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/commons-beanutils-1.8.0.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/commons-collections-3.2.1.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/commons-fileupload-1.2.1.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/commons-httpclient-3.1.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/commons-io-1.4.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/commons-logging-1.1.1.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/jaxen-1.1.1.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/log4j-1.2.15.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/mail-1.4.1.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/xercesImpl-2.9.1.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/xml-apis-2.9.1.jar"/>
+	<classpathentry kind="lib" path="lib/compile/dumbster-1.6.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/lucene-analyzers-2.4.1.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/lucene-core-2.4.1.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/lucene-highlighter-2.4.1.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/lucene-queries-2.4.1.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/lucene-snowball-2.4.1.jar"/>
+	<classpathentry kind="lib" path="modules/org.opencms.frontend.templateone.form/resources/system/modules/org.opencms.frontend.templateone.form/lib/jcaptcha-1.0-all.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/commons-pool-1.5.4.jar"/>
+	<classpathentry kind="lib" path="webapp/setup/database/as400/jt400.jar"/>
+	<classpathentry kind="lib" path="webapp/setup/database/db2/db2jcc_v9.jar"/>
+	<classpathentry kind="lib" path="webapp/setup/database/hsqldb/hsqldb-1.8.0.8.jar"/>
+	<classpathentry kind="lib" path="webapp/setup/database/mssql/mssql-jtds-1.2.jar"/>
+	<classpathentry kind="lib" path="webapp/setup/database/mysql_41/mysql-connector-java-5.0.7-bin.jar"/>
+	<classpathentry kind="lib" path="webapp/setup/database/oracle/ojdbc14-10.2.0.3.jar"/>
+	<classpathentry kind="lib" path="webapp/setup/database/postgresql/postgresql-8.3-603.jdbc3.jar"/>
+	<classpathentry kind="lib" path="lib/runtime/commons-email-1.2.jar"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
Index: .project
===================================================================
RCS file: .project
diff -N .project
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ .project	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>opencms-7.5.3</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
+		<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
+	</natures>
+</projectDescription>
Index: .settings/org.eclipse.jdt.core.prefs
===================================================================
RCS file: .settings/org.eclipse.jdt.core.prefs
diff -N .settings/org.eclipse.jdt.core.prefs
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ .settings/org.eclipse.jdt.core.prefs	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,70 @@
+#Thu Jan 07 19:55:34 CET 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
Index: .settings/org.eclipse.jdt.ui.prefs
===================================================================
RCS file: .settings/org.eclipse.jdt.ui.prefs
diff -N .settings/org.eclipse.jdt.ui.prefs
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ .settings/org.eclipse.jdt.ui.prefs	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,9 @@
+#Thu Jan 07 19:56:06 CET 2010
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_settings_version=11
+internal.default.compliance=default
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=com.alkacon;de.alkacon;org.opencms;com.opencms;java;javax;org.apache;org;com;
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
Index: build.xml
===================================================================
RCS file: /usr/local/cvs/opencms/build.xml,v
retrieving revision 1.228
diff -u -r1.228 build.xml
--- build.xml	18 Aug 2010 11:08:29 -0000	1.228
+++ build.xml	24 Aug 2010 16:43:26 -0000
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<project name="OpenCms" default="bindist" basedir=".">
+<project name="OpenCms" default="bindist" basedir="." xmlns:artifact="urn:maven-artifact-ant">
 
-    <property name="version.number"             		value="7.5.3" />
+    <property name="version.number"             		value="7.5.3.1" />
     <property name="java.target.version"                value="1.5" />
     
 	<property name="app.name" 							value="opencms" />
@@ -54,6 +54,8 @@
 	  </classpath>
 	</taskdef>
 	
+
+	
 	<taskdef resource="org/opencms/util/ant/taskdefs.properties" loaderref="opencms">
 		<classpath>
 			<pathelement location="${opencms.input.libs.compile}/ant-opencms-1.1.jar" />
@@ -67,6 +69,13 @@
 		</classpath>
 	</taskdef>
 
+	<!-- ==================== Maven typedef ================================== -->
+    <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant">
+        <classpath>
+            <pathelement location="${opencms.input.libs.compile}/maven-ant-tasks-2.0.10.jar" />
+        </classpath>
+    </typedef>
+            	
 	<!-- 
 	  -	Checks if all required libraries are available
 	  -->
@@ -215,6 +224,13 @@
             includes="org/opencms/**" >      
             <metainf dir="${opencms.input.warfiles}/WEB-INF" includes="opencms.tld"/>
         </jar>        	     
+
+    	<!-- create Source-Archive to include it into the Eclipse-Configuration. -->
+    	<delete file="${opencms.output.jars}/opencms_${version.number}_sources.jar" failonerror="no"/>
+        <jar destfile="${opencms.output.jars}/opencms_${version.number}_sources.jar">
+        	<zipfileset dir="${opencms.input}/src" excludes="${excludes}" />
+            <zipfileset dir="${opencms.input}" includes="license.txt" prefix="META-INF"/>
+        </jar>
     	
     </target>
 
@@ -345,7 +361,17 @@
   			<zipfileset dir="${opencms.output.classes}" prefix="setup" includes="versions.txt" />
 			<zipfileset dir="${opencms.output.classes}" prefix="setup" includes="license.html" />
 			<zipfileset dir="${opencms.output.classes}" prefix="setup" includes="license.html" />
-        </war>        
+        </war>
+    	
+		<!--
+			copy War-Skeleton without Modules to opencms-webapp-${version.number}.war
+			This War-Skeleton will be deployed to the Maven Repository as groupId=org.opencms and artifactId=opencms-webapp
+		 -->
+    	<delete failonerror="no" file="${opencms.build}/${app.name}-webapp-${version.number}.war" />
+    	<copy
+    		file="${opencms.build}/${app.name}.war"
+    		tofile="${opencms.build}/${app.name}-webapp-${version.number}.war" />
+    	
     </target>
     
 
@@ -439,7 +465,7 @@
             <zipfileset dir="${opencms.input}" includes="install.html,license.txt,history.txt"/>
         </zip>
 
-    </target>    
+    </target>
     
     <target name="srcdist" 
     	description="Creates a source distribution ZIP">
@@ -526,7 +552,6 @@
             <fileset dir="${opencms.input}/test/data" />
         </copy>       	    	       
     </target>
-	
 
     <target name="setup-jar" depends="jar" description="Compile the OpenCms setup/updater classes">
     	
@@ -564,7 +589,14 @@
             jarfile="${opencms.output.jars}/opencms-setup.jar"
             basedir="${opencms.output}/build/setup"
             includes="org/opencms/**" />
-
+        
+    	<!-- create Source-Archive to include it into the Eclipse-Configuration. -->
+    	<delete file="${opencms.output.jars}/opencms-setup_${version.number}_sources.jar" failonerror="no"/>
+        <jar destfile="${opencms.output.jars}/opencms-setup_${version.number}_sources.jar">
+        	<zipfileset dir="${opencms.input}/src-setup" excludes="${excludes}" />
+            <zipfileset dir="${opencms.input}" includes="license.txt" prefix="META-INF"/>
+        </jar>
+    	
     </target>
 	
 
@@ -661,6 +693,184 @@
         <copy 
             todir="${opencms.input}/modules/org.opencms.workplace.explorer/resources/system/workplace/resources/components/upload_applet/"
             file="${opencms.output}/upload/upload.jar" />
-    </target>    
+    </target>
+	
+    <target name="maven-install-core" description="install the ${opencms.output.jars}/opencms.jar into the locale Maven Repository">
+
+    	<artifact:pom id="pom-opencms-core" file="pom-opencms-core.xml" />
+		<artifact:install file="${opencms.output.jars}/opencms.jar">
+			<pom refid="pom-opencms-core"/>
+			<attach file="${opencms.output.jars}/opencms_${version.number}_sources.jar" type="jar" classifier="sources" />
+	    	<attach file="${opencms.output.jars}/opencms_${version.number}_tests.jar" type="test-jar" />
+	    	<attach file="${opencms.output.jars}/opencms_${version.number}_test_sources.jar" type="test-jar" classifier="test-sources" />
+    	</artifact:install>
+    	
+    </target>
+	
+    <target name="maven-install-setup" description="install the OpenCms-Artifacts into the locale Maven Repository">
+    	
+    	<artifact:pom id="pom-opencms-setup" file="pom-opencms-setup.xml" />
+		<artifact:install file="${opencms.output.jars}/opencms-setup.jar">
+			<pom refid="pom-opencms-setup"/>
+			<attach file="${opencms.output.jars}/opencms-setup_${version.number}_sources.jar" type="jar" classifier="sources" />
+		</artifact:install>
+    	
+    </target>
+	
+    <target name="maven-install-webapp" description="install the WebApp-Skeleton (without modules) into the locale Maven Repository">
+
+    	<artifact:pom id="pom-opencms-webapp" file="pom-opencms-webapp.xml" />
+		<artifact:install file="${opencms.build}/${app.name}-webapp-${version.number}.war">
+			<pom refid="pom-opencms-webapp"/>
+		</artifact:install>
+    	
+    </target>
+	
+    <target name="maven-install-new-modules">
+		<!-- read list of all available modules -->
+    	<property file="${opencms.input}/modules/all-modules.properties" />
+
+    	<ant antfile="${opencms.input}/modules/build.xml" target="maven-install" inheritAll="false" >
+	  		<property name="version.number" value="${version.number}" />
+	  		<property name="modules.common.selection" value="${modules.common.all}" />
+	  		<property name="modules.selection.mode" value="selection" />
+	  		<property name="app.name" value="${app.name}" />
+	  	</ant>
+    </target>
+	
+    <target name="maven-install-all-modules">
+		<!-- read list of all available modules -->
+    	<property file="${opencms.input}/modules/all-modules.properties" />
+
+    	<ant antfile="${opencms.input}/modules/build.xml" target="maven-install-all" inheritAll="false" >
+	  		<property name="modules.common.selection" value="${modules.common.all}" />
+	  		<property name="modules.selection.mode" value="selection" />
+	  		<property name="app.name" value="${app.name}" />
+	  	</ant>
+    </target>
+	
+    <target name="maven-deploy-core" description="install the ${opencms.output.jars}/opencms.jar into the locale Maven Repository">
+		<!-- required for Transport-protocol (beta-6 doesn't work...) -->
+		<artifact:install-provider artifactId="wagon-ssh" version="1.0-beta-2"/>
+
+    	<artifact:pom id="pom-opencms-core" file="pom-opencms-core.xml" />
+		<artifact:deploy file="${opencms.output.jars}/opencms.jar">
+			<pom refid="pom-opencms-core"/>
+			<attach file="${opencms.output.jars}/opencms_${version.number}_sources.jar" type="jar" classifier="sources" />
+	    	<attach file="${opencms.output.jars}/opencms_${version.number}_tests.jar" type="test-jar" />
+	    	<attach file="${opencms.output.jars}/opencms_${version.number}_test_sources.jar" type="test-jar" classifier="test-sources" />
+    	</artifact:deploy>
+    	
+    </target>
+	
+    <target name="maven-deploy-setup" description="install the OpenCms-Artifacts into the locale Maven Repository">
+		<!-- required for Transport-protocol (beta-6 doesn't work...) -->
+		<artifact:install-provider artifactId="wagon-ssh" version="1.0-beta-2"/>
+    	
+    	<artifact:pom id="pom-opencms-setup" file="pom-opencms-setup.xml" />
+		<artifact:deploy file="${opencms.output.jars}/opencms-setup.jar">
+			<pom refid="pom-opencms-setup"/>
+			<attach file="${opencms.output.jars}/opencms-setup_${version.number}_sources.jar" type="jar" classifier="sources" />
+		</artifact:deploy>
+    	
+    </target>
+	
+    <target name="maven-deploy-webapp" description="install the WebApp-Skeleton (without modules) into the locale Maven Repository">
+		<!-- required for Transport-protocol (beta-6 doesn't work...) -->
+		<artifact:install-provider artifactId="wagon-ssh" version="1.0-beta-2"/>
+
+    	<artifact:pom id="pom-opencms-webapp" file="pom-opencms-webapp.xml" />
+		<artifact:deploy file="${opencms.build}/${app.name}-webapp-${version.number}.war">
+			<pom refid="pom-opencms-webapp"/>
+		</artifact:deploy>
+    	
+    </target>
+	
+    <target name="maven-deploy-new-modules">
+		<!-- read list of all available modules -->
+    	<property file="${opencms.input}/modules/all-modules.properties" />
+    	
+    	<ant antfile="${opencms.input}/modules/build.xml" target="maven-deploy" inheritAll="false" >
+	  		<property name="version.number" value="${version.number}" />
+	  		<property name="modules.common.selection" value="${modules.common.all}" />
+	  		<property name="modules.selection.mode" value="selection" />
+	  		<property name="app.name" value="${app.name}" />
+	  	</ant>
+    </target>
+	
+    <target name="maven-deploy-all-modules">
+		<!-- read list of all available modules -->
+    	<property file="${opencms.input}/modules/all-modules.properties" />
+    	
+    	<ant antfile="${opencms.input}/modules/build.xml" target="maven-deploy-all" inheritAll="false" >
+	  		<property name="modules.common.selection" value="${modules.common.all}" />
+	  		<property name="modules.selection.mode" value="selection" />
+	  		<property name="app.name" value="${app.name}" />
+	  	</ant>
+    </target>
+	
+    <target name="maven-dependencies-test" description="copy dependencies configured in pom-opencms-core.xml to ${opencms.build}/dependencies">
+
+    	<artifact:pom id="pom-opencms-core" file="pom-opencms-core.xml" />
+    
+    	<artifact:dependencies filesetId="dependency.fileset" useScope="runtime">
+			<pom refid="pom-opencms-core"/>
+    	</artifact:dependencies>
+    	
+    	<copy todir="${opencms.build}/dependencies">
+    	  <fileset refid="dependency.fileset" />
+    	  <!-- This mapper strips off all leading directory information -->
+    	  <mapper type="flatten" />
+    	</copy>
+    	
+    	
+    </target>
+
+    <target name="maven-build-all-artifacts" description="Create all Artifacts (opencms-core and Modules) with /modules/build.xml => target 'war'">
+		<!-- read list of all available modules -->
+    	<property file="${opencms.input}/modules/all-modules.properties" />
+    	<!-- build war with all modules -->
+	  	<ant antfile="${opencms.input}/modules/build.xml" target="war" inheritAll="false" >
+	  		<property name="modules.common.selection" value="${modules.common.all}" />
+	  		<property name="modules.selection.mode" value="selection" />
+	  		<property name="app.name" value="${app.name}" />
+	  	</ant>
+    	
+    </target>
+
+	<target name="maven-build-test-jar" depends="compile-tests"
+		description="Create UnitTest-Jar of the Test-Classes (Helper-Classes to create UnitTests in OpenCms-Modules)">
+		
+        <jar jarfile="${opencms.output.jars}/opencms_${version.number}_tests.jar"
+            basedir="${opencms.output.tests}" excludes="**/data/**" />
+
+    	<!-- create Source-Archive to include it into the Eclipse-Configuration. -->
+    	<delete file="${opencms.output.jars}/opencms_${version.number}_test_sources.jar" failonerror="no"/>
+        <jar destfile="${opencms.output.jars}/opencms_${version.number}_test_sources.jar">
+        	<zipfileset dir="${opencms.input}/test" excludes="**/data/**" />
+            <zipfileset dir="${opencms.input}" includes="license.txt" prefix="META-INF"/>
+        </jar>
+		
+	</target>
+	
+    <target name="maven-install-init-all"
+    	depends="maven-build-all-artifacts, maven-build-test-jar, maven-install-core, maven-install-setup, maven-install-webapp, maven-install-all-modules"
+    	description="initial install of all current OpenCms-Artifacts into the locale Maven Repository">
+    </target>
+	
+    <target name="maven-install-with-new-modules"
+    	depends="maven-build-all-artifacts, maven-build-test-jar, maven-install-core, maven-install-setup, maven-install-webapp, maven-install-new-modules"
+    	description="install only new opencms-modules, who matches the opencms-core version.number">
+    </target>
+	
+    <target name="maven-deploy-init-all"
+    	depends="maven-build-all-artifacts, maven-build-test-jar, maven-deploy-core, maven-deploy-setup, maven-deploy-webapp, maven-deploy-all-modules"
+    	description="initial deploy of all current OpenCms-Artifacts into the global Maven Repository">
+    </target>
+	
+    <target name="maven-deploy-with-new-modules"
+    	depends="maven-build-all-artifacts, maven-build-test-jar, maven-deploy-core, maven-deploy-setup, maven-deploy-webapp, maven-deploy-new-modules"
+    	description="deploy only new opencms-modules, who matches the opencms-core version.number">
+    </target>
 
 </project>
\ No newline at end of file
Index: install-nonpublic-libs.bat
===================================================================
RCS file: install-nonpublic-libs.bat
diff -N install-nonpublic-libs.bat
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ install-nonpublic-libs.bat	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,17 @@
+echo off
+echo Installing Non-Puplic Libraries to the local Maven-Repository....
+call mvn install:install-file -DgroupId=com.alkacon -DartifactId=alkacon-diff -Dversion=0.9.2 -Dpackaging=jar -Dfile=lib/runtime/alkacon-diff-0.9.2.jar
+call mvn install:install-file -DgroupId=com.alkacon -DartifactId=alkacon-simapi -Dversion=0.9.8 -Dpackaging=jar -Dfile=lib/runtime/alkacon-simapi-0.9.8.jar
+
+
+echo Installing ibm.as400-Driver to the local Maven-Repository....
+call mvn install:install-file -DgroupId=com.ibm.as400 -DartifactId=jt400 -Dversion=6.0 -Dpackaging=jar -Dfile=webapp/setup/database/as400/jt400.jar
+
+echo Installing ibm.db2-Driver to the local Maven-Repository....
+call mvn install:install-file -DgroupId=com.ibm.db2.jcc -DartifactId=db2jcc -Dversion=V9 -Dpackaging=jar -Dfile=webapp/setup/database/db2/db2jcc_v9.jar
+call mvn install:install-file -DgroupId=com.ibm.db2.jcc -DartifactId=db2jcc_license_cu -Dversion=V9 -Dpackaging=jar -Dfile=webapp/setup/database/db2/db2jcc_license_cu.jar
+
+echo Installing oracle-Driver to the local Maven-Repository....
+call mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.3 -Dpackaging=jar -Dfile=webapp/setup/database/oracle/ojdbc14-10.2.0.3.jar
+
+pause
Index: maven-deploy-init-all.bat
===================================================================
RCS file: maven-deploy-init-all.bat
diff -N maven-deploy-init-all.bat
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ maven-deploy-init-all.bat	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,7 @@
+echo off
+call set ANT_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m
+call echo ANT_OPTS: %ANT_OPTS%
+call set MAVEN_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m
+call echo MAVEN_OPTS: %MAVEN_OPTS%
+call ant maven-deploy-init-all
+pause
Index: maven-deploy-with-new-modules.bat
===================================================================
RCS file: maven-deploy-with-new-modules.bat
diff -N maven-deploy-with-new-modules.bat
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ maven-deploy-with-new-modules.bat	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,7 @@
+echo off
+call set ANT_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m
+call echo ANT_OPTS: %ANT_OPTS%
+call set MAVEN_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m
+call echo MAVEN_OPTS: %MAVEN_OPTS%
+call ant clean maven-deploy-with-new-modules
+pause
Index: maven-install-init-all.bat
===================================================================
RCS file: maven-install-init-all.bat
diff -N maven-install-init-all.bat
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ maven-install-init-all.bat	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,7 @@
+echo off
+call set ANT_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m
+call echo ANT_OPTS: %ANT_OPTS%
+call set MAVEN_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m
+call echo MAVEN_OPTS: %MAVEN_OPTS%
+call ant maven-install-init-all
+pause
Index: maven-install-with-new-modules.bat
===================================================================
RCS file: maven-install-with-new-modules.bat
diff -N maven-install-with-new-modules.bat
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ maven-install-with-new-modules.bat	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,7 @@
+echo off
+call set ANT_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m
+call echo ANT_OPTS: %ANT_OPTS%
+call set MAVEN_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m
+call echo MAVEN_OPTS: %MAVEN_OPTS%
+call ant maven-install-with-new-modules
+pause
Index: modules/build-single.xml
===================================================================
RCS file: /usr/local/cvs/opencms/modules/build-single.xml,v
retrieving revision 1.37
diff -u -r1.37 build-single.xml
--- modules/build-single.xml	28 Sep 2009 15:34:29 -0000	1.37
+++ modules/build-single.xml	24 Aug 2010 16:43:26 -0000
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<project name="OpenCms Common Module" default="dist" basedir=".">
+<project name="OpenCms Common Module" default="dist" basedir="." xmlns:artifact="urn:maven-artifact-ant">
 
 	<property name="opencms.input" 						location="${basedir}/.." />
 	<property name="opencms.output" 					location="${opencms.input}/../BuildCms" />
@@ -30,6 +30,13 @@
 		</classpath>
 	</taskdef>
 
+	<!-- ==================== Maven typedef ================================== -->
+    <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant">
+        <classpath>
+            <pathelement location="${opencms.input.libs.compile}/maven-ant-tasks-2.0.10.jar" />
+        </classpath>
+    </typedef>
+
 	<property name="module.input" 				location="${basedir}/${module.name}" />
 	<property name="module.input.res" 			location="${module.input}/resources" />
 	<property name="module.input.lib" 			location="${module.input.res}/system/modules/${module.name}/lib" />
@@ -306,14 +313,29 @@
 								<pathelement path="${module.libs.path}" />
 							</classpath>
 						</javac>
+						
 						<copy todir="${module.output.classes}/${module.package}">
 							<fileset dir="${module.input.src}" includes="${jar.includes.shared}" excludes="${jar.excludes}" />
 						</copy>
+
+				    	<!-- create Source-Archive to include it into the Eclipse-Configuration. -->
+				    	<delete file="${module.output.jar}/${module.name}_${module.version}_sources.jar" failonerror="no"/>
+						<mkdir dir="${module.output.jar}" />
+				        <jar destfile="${module.output.jar}/${module.name}_${module.version}_sources.jar">
+				        	<zipfileset dir="${module.input.src.shared}" includes="${module.package}/*.*" />
+				        </jar>
+						
 					</then>
 					<else>
 						<if>
 							<equals arg1="${src.mode}" arg2="multishared" />
 							<then>
+								<!-- create Source-Archive to include it into the Eclipse-Configuration. -->
+								<!-- in multishared mode create an empty Source-Archive and update it for each package. -->
+						    	<delete file="${module.output.jar}/${module.name}_${module.version}_sources.jar" failonerror="no"/>
+								<copy file="${opencms.input.warfiles}/update/empty.jar" tofile="${module.output.jar}/${module.name}_${module.version}_sources.jar" />
+								
+								
 								<for list="${module.packages}" param="mpackage" trim="true">
 									<sequential>
 										<var name="package.dir" value="" />
@@ -350,6 +372,15 @@
 										<copy todir="${module.output.classes}/${package.dir}">
 											<fileset dir="${module.input.src.shared}/${package.dir}" includes="${jar.includes.shared}" excludes="${jar.excludes}" />
 										</copy>
+
+										
+								    	<!-- create Source-Archive to include it into the Eclipse-Configuration. -->
+										<!-- in multishared mode update the Source-Archive with this package. -->
+										<mkdir dir="${module.output.jar}" />
+								        <jar destfile="${module.output.jar}/${module.name}_${module.version}_sources.jar" update="true" >
+								        	<zipfileset dir="${module.input.src.shared}" includes="${package.dir}/*.*" />
+								        </jar>
+										
 									</sequential>
 								</for>
 							</then>
@@ -383,6 +414,13 @@
 										<exclude name="**/test/**" />
 									</fileset>
 								</copy>
+
+						    	<!-- create Source-Archive to include it into the Eclipse-Configuration. -->
+						    	<delete file="${module.output.jar}/${module.name}_${module.version}_sources.jar" failonerror="no"/>
+								<mkdir dir="${module.output.jar}" />
+						        <jar destfile="${module.output.jar}/${module.name}_${module.version}_sources.jar">
+						        	<zipfileset dir="${module.input.src.single}" />
+						        </jar>
 							</else>
 						</if>
 					</else>
@@ -400,7 +438,7 @@
 			<then>
 				<mkdir dir="${module.output.jar}" />
 				<jar jarfile="${module.output.jar}/${module.name}.jar" basedir="${module.output.classes}" />
-
+				
 				<for list="${module.dependencies}" param="dependency" trim="true">
 					<sequential>
 						<if>
@@ -469,4 +507,152 @@
 
 	<target name="jboss.update" depends="jboss.copy" description="Recompile changes and installs them in JBoss deploy directory" />
 
+	<target name="maven-read-manifest" description="read manifest to module.version, module.dependencies, module.description">
+
+		<property name="module.input" 				value="${basedir}/${module.name}" />
+		<property name="module.input.res" 			value="${module.input}/resources" />
+
+		<if>
+			<available file="${module.input.res}/manifest.xml" />
+			<then>
+				<readxmlproperty property="module.version" xmlfile="${module.input.res}/manifest.xml" element="export/module/version" />
+				<readxmlproperty property="module.dependencies" xmlfile="${module.input.res}/manifest.xml" element="export/module/dependencies/dependency" attribute="name" />
+				<readxmlproperty property="module.description" xmlfile="${module.input.res}/manifest.xml" element="export/module/description" />
+			</then>
+			<else>
+	    	  	<echo message="WARNING: Not found: ${module.input.res}/manifest.xml"/>
+			</else>
+		</if>
+		
+	</target>
+	
+	<target name="maven-create-or-replace-module-pom" depends="maven-read-manifest" description="create or replace poms for each module">
+
+		<var name="deps" value="" />
+		
+		<for list="${module.dependencies}" param="dependency" trim="true">
+			<sequential>
+				<property name="@{dependency}.input" value="${basedir}/@{dependency}" />
+				<if>
+	    			<available file="${@{dependency}.input}/resources/manifest.xml" />
+	    			<then>
+	    				<readxmlproperty property="@{dependency}.module.version" xmlfile="${@{dependency}.input}/resources/manifest.xml" element="export/module/version" />
+
+						<var name="deps" value="${deps}${line.separator}  &lt;dependency&gt;" />
+						<var name="deps" value="${deps}${line.separator}    &lt;groupId&gt;org.opencms.modules&lt;/groupId&gt;" />
+						<var name="deps" value="${deps}${line.separator}    &lt;artifactId&gt;@{dependency}&lt;/artifactId&gt;" />
+	    				<var name="deps" value="${deps}${line.separator}    &lt;version&gt;${@{dependency}.module.version}&lt;/version&gt;" />
+	    				<var name="deps" value="${deps}${line.separator}    &lt;scope&gt;provided&lt;/scope&gt;" />
+	    				<var name="deps" value="${deps}${line.separator}  &lt;/dependency&gt;" />
+	    			</then>
+	    		</if>
+				
+			</sequential>
+		</for>
+		
+		<echo message="copy file='${basedir}/pom-template.xml' tofile='${module.input}/pom.xml'"/>
+		<echo message="${module.name} - ${module.version}"/>
+		<copy file="${basedir}/pom-template.xml" tofile="${module.input}/pom.xml" overwrite="true">   
+	    	<filterset>
+	    		<filter token="OPENCMS_MODULE_NAME" value="${module.name}" />
+	    		<filter token="OPENCMS_MODULE_VERSION" value="${module.version}" />
+	    		<filter token="OPENCMS_MODULE_DESCRIPTION" value="${module.description}" />
+	    		<filter token="OPENCMS_MODULE_DEPENDENCIES" value="${deps}" />
+        	</filterset>
+        </copy>
+		
+	</target>
+	
+	<target name="maven-remove-module-pom" description="create or replace poms for each module">
+		
+		<property name="module.input" value="${basedir}/${module.name}" />
+		
+		<delete file="${module.input}/pom.xml" failonerror="false" />
+		
+	</target>
+	
+    <target name="maven-install" depends="maven-read-manifest, maven-create-or-replace-module-pom" description="install the OpenCms-Artifacts into the locale Maven Repository">
+		
+    	<if>
+			<and>
+				<available file="${module.output.jar}/${module.name}.jar" />
+				<available file="${module.output.jar}/${module.name}_${module.version}_sources.jar" />
+			</and>
+			<then>
+				<!-- Jar and Java-Sources are available -->
+				<echo message="install module '${module.name}-${module.version}' (Module-zip, Classes-Jar, Sources-Jar)" />
+				<artifact:pom id="pom-module" file="${module.input}/pom.xml" />
+				<artifact:install file="${module.output.jar}/${module.name}.jar">
+					<pom refid="pom-module"/>
+					<attach file="${module.output.jar}/${module.name}_${module.version}_sources.jar" type="jar" classifier="sources" />
+					<attach file="${module.output.zip}/${module.name}_${module.version}.zip" type="zip" classifier="opencms-module" />
+				</artifact:install>
+			</then>
+			<else>
+				<!-- Install OpenCms-Module ZIP Without JAR and Java-Sources -->
+				<echo message="install module '${module.name}-${module.version}' (Module-zip)" />
+				<artifact:pom id="pom-module" file="${module.input}/pom.xml" />
+				<artifact:install file="${opencms.input.warfiles}/update/empty.jar">
+					<pom refid="pom-module"/>
+					<attach file="${module.output.zip}/${module.name}_${module.version}.zip" type="zip" classifier="opencms-module" />
+				</artifact:install>
+			</else>
+		</if>
+    	
+    	<ant antfile="build-single.xml" target="maven-remove-module-pom" />
+    </target>
+
+    <target name="maven-install-version" depends="maven-read-manifest" description="install only if Parameter 'version.number' is the current module.version">
+		<if>
+			<equals arg1="${module.version}" arg2="${version.number}" />
+			<then>
+				<antcall target="maven-install" />
+			</then>
+		</if>
+    	<ant antfile="build-single.xml" target="maven-remove-module-pom" />
+    </target>
+	
+    <target name="maven-deploy" depends="maven-read-manifest, maven-create-or-replace-module-pom" description="deploy the OpenCms-Artifacts into the global Maven Repository">
+		<!-- required for Transport-protocol (beta-6 doesn't work...) -->
+		<artifact:install-provider artifactId="wagon-ssh" version="1.0-beta-2"/>
+
+		<if>
+			<and>
+				<available file="${module.output.jar}/${module.name}.jar" />
+				<available file="${module.output.jar}/${module.name}_${module.version}_sources.jar" />
+			</and>
+			<then>
+				<!-- Jar and Java-Sources are available -->
+				<echo message="deploy module '${module.name}-${module.version}' (Module-zip, Classes-Jar, Sources-Jar)" />
+		    	<artifact:pom id="pom-module" file="${module.input}/pom.xml" />
+				<artifact:deploy file="${module.output.jar}/${module.name}.jar">
+					<pom refid="pom-module"/>
+					<attach file="${module.output.jar}/${module.name}_${module.version}_sources.jar" type="jar" classifier="sources" />
+					<attach file="${module.output.zip}/${module.name}_${module.version}.zip" type="zip" classifier="opencms-module" />
+				</artifact:deploy>
+			</then>
+			<else>
+				<!-- Install OpenCms-Module ZIP Without JAR and Java-Sources -->
+				<echo message="deploy module '${module.name}-${module.version}' (Module-zip)" />
+		    	<artifact:pom id="pom-module" file="${module.input}/pom.xml" />
+				<artifact:deploy file="${opencms.input.warfiles}/update/empty.jar">
+					<pom refid="pom-module"/>
+					<attach file="${module.output.zip}/${module.name}_${module.version}.zip" type="zip" classifier="opencms-module" />
+				</artifact:deploy>
+			</else>
+		</if>
+    	
+    	
+    	<ant antfile="build-single.xml" target="maven-remove-module-pom" />
+    </target>
+
+    <target name="maven-deploy-version" depends="maven-read-manifest" description="deploy only if Parameter 'version.number' is the current module.version">
+		<if>
+			<equals arg1="${module.version}" arg2="${version.number}" />
+			<then>
+				<antcall target="maven-deploy" />
+			</then>
+		</if>
+    	<ant antfile="build-single.xml" target="maven-remove-module-pom" />
+    </target>
 </project>
Index: modules/build.xml
===================================================================
RCS file: /usr/local/cvs/opencms/modules/build.xml,v
retrieving revision 1.21
diff -u -r1.21 build.xml
--- modules/build.xml	13 Aug 2010 07:47:30 -0000	1.21
+++ modules/build.xml	24 Aug 2010 16:43:26 -0000
@@ -276,5 +276,93 @@
 		<delete dir="${opencms.output}/build/zips-modules" />		
 		
 	</target>
+	
+	<target name="maven-create-or-replace-module-poms" depends="init" description="create or replace poms for each module">
+		<for list="${modules.var}" param="module" trim="yes">
+    	  <sequential>
+    	  	<ant antfile="${basedir}/build-single.xml" target="maven-create-or-replace-module-pom" inheritAll="false" >
+    	  		<property name="module.name" value="@{module}" />
+    	  	</ant>
+    	  </sequential>
+    	</for>
+	</target>
+	
+	<target name="maven-remove-module-poms" depends="init" description="remove poms for each module">
+		<for list="${modules.var}" param="module" trim="yes">
+    	  <sequential>
+    	  	<ant antfile="${basedir}/build-single.xml" target="maven-remove-module-pom" inheritAll="false" >
+    	  		<property name="module.name" value="@{module}" />
+    	  	</ant>
+    	  </sequential>
+    	</for>
+	</target>
 
+    <target name="maven-install" depends="init" description="install new OpenCms-Module-Artifacts into the locale Maven Repository">
+		<for list="${modules.var}" param="module" trim="yes">
+    	  <sequential>
+    	  	<ant antfile="${basedir}/build-single.xml" target="maven-install-version" inheritAll="false" >
+    	  		<property name="version.number" value="${version.number}" />
+    	  		<property name="module.name" value="@{module}" />
+    	  	</ant>
+    	  </sequential>
+    	</for>
+    </target>
+
+    <target name="maven-install-all" depends="init" description="install the OpenCms-Module-Artifacts into the locale Maven Repository">
+		<for list="${modules.var}" param="module" trim="yes">
+    	  <sequential>
+    	  	<ant antfile="${basedir}/build-single.xml" target="maven-install" inheritAll="false" >
+    	  		<property name="module.name" value="@{module}" />
+    	  	</ant>
+    	  </sequential>
+    	</for>
+    </target>
+
+    <target name="maven-deploy" depends="init" description="deploy new OpenCms-Module-Artifacts into the global Maven Repository">
+		<for list="${modules.var}" param="module" trim="yes">
+    	  <sequential>
+    	  	<ant antfile="${basedir}/build-single.xml" target="maven-deploy-version" inheritAll="false" >
+    	  		<property name="version.number" value="${version.number}" />
+    	  		<property name="module.name" value="@{module}" />
+    	  	</ant>
+    	  </sequential>
+    	</for>
+    </target>
+
+    <target name="maven-deploy-all" depends="init" description="deploy the OpenCms-Module-Artifacts into the global Maven Repository">
+		<for list="${modules.var}" param="module" trim="yes">
+    	  <sequential>
+    	  	<ant antfile="${basedir}/build-single.xml" target="maven-deploy" inheritAll="false" >
+    	  		<property name="module.name" value="@{module}" />
+    	  	</ant>
+    	  </sequential>
+    	</for>
+    </target>
+	
+	<target name="maven-print-selected-dependecies-xml" depends="init"
+		description="print the selected Modules as Maven-dependencies to the console.
+		You can copy and past it to your Customer-Specific pom.xml">
+
+		<var name="deps" value="" />
+		
+		<for list="${modules.var}" param="module" trim="yes">
+    	  <sequential>
+			<property name="@{module}.input" value="${basedir}/@{module}" />
+			<if>
+    			<available file="${@{module}.input}/resources/manifest.xml" />
+    			<then>
+    				<readxmlproperty property="@{module}.module.version" xmlfile="${@{module}.input}/resources/manifest.xml" element="export/module/version" />
+
+					<var name="deps" value="${deps}${line.separator}  &lt;dependency&gt;" />
+					<var name="deps" value="${deps}${line.separator}    &lt;groupId&gt;org.opencms.modules&lt;/groupId&gt;" />
+					<var name="deps" value="${deps}${line.separator}    &lt;artifactId&gt;@{module}&lt;/artifactId&gt;" />
+					<var name="deps" value="${deps}${line.separator}    &lt;version&gt;${@{module}.module.version}&lt;/version&gt;" />
+					<var name="deps" value="${deps}${line.separator}  &lt;/dependency&gt;" />
+    			</then>
+    		</if>
+    	  </sequential>
+    	</for>
+		
+		<echo message="Maven dependencies: ${deps}" />
+	</target>
 </project>
Index: modules/maven-install.bat
===================================================================
RCS file: modules/maven-install.bat
diff -N modules/maven-install.bat
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ modules/maven-install.bat	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,5 @@
+echo off
+call set ANT_OPTS=-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m
+call echo ANT_OPTS: %ANT_OPTS%
+call ant maven-install
+pause
Index: modules/org.opencms.editors/resources/manifest.xml
===================================================================
RCS file: /usr/local/cvs/opencms/modules/org.opencms.editors/resources/manifest.xml,v
retrieving revision 1.44
diff -u -r1.44 manifest.xml
--- modules/org.opencms.editors/resources/manifest.xml	3 Jul 2009 10:36:01 -0000	1.44
+++ modules/org.opencms.editors/resources/manifest.xml	24 Aug 2010 16:43:27 -0000
@@ -16,7 +16,7 @@
 		<description><![CDATA[<p>This module contains the OpenCms Common Editing tools.</p>
 <p>This module is needed to be able to edit files in the OpenCms Workplace.</p>
 <p><i>(c) 2007 by Alkacon Software GmbH (http://www.alkacon.com).</i></p>]]></description>
-		<version>7.5.1</version>
+		<version>7.5.3.1</version>
 		<authorname><![CDATA[Alkacon Software GmbH]]></authorname>
 		<authoremail><![CDATA[info@alkacon.com]]></authoremail>
 		<datecreated>Mon, 27 Jun 2005 08:00:00 GMT</datecreated>
Index: modules/org.opencms.editors/resources/system/workplace/editors/xmlcontent/edit.js
===================================================================
RCS file: /usr/local/cvs/opencms/modules/org.opencms.editors/resources/system/workplace/editors/xmlcontent/edit.js,v
retrieving revision 1.16
diff -u -r1.16 edit.js
--- modules/org.opencms.editors/resources/system/workplace/editors/xmlcontent/edit.js	18 Jan 2010 10:04:29 -0000	1.16
+++ modules/org.opencms.editors/resources/system/workplace/editors/xmlcontent/edit.js	24 Aug 2010 16:43:27 -0000
@@ -190,14 +190,88 @@
 }
 
 // add an optional element to the currently edited content
-function addElement(elemName, insertAfter) {
+function addElement(elemName, insertAfter, choiceList) {
 	setLastPosition();
 	var _form = document.EDITOR;
 	_form.elementname.value = elemName;
 	_form.elementindex.value = insertAfter;
+	if (choiceList.length == 0){
+		buttonAction(5);
+	} else if (choiceList.length == 1){
+		addChoiceElement(choiceList[0].Name);
+	} else {
+		// more than one element
+		showChoiceSelection(choiceList);
+	}
+}
+
+function addChoiceElement(elemName) {
+	var _form = document.EDITOR;
+	_form.choiceelementname.value = elemName;
 	buttonAction(5);
 }
 
+// shows the possible SubElements for a Choice-NestedContentType
+function showChoiceSelection(choiceList) {
+
+    // get Choice element
+    var choiceOverlay = document.getElementById("CHOICE_OVERLAY");
+    var choiceSelectElem = document.getElementById("CHOICE_SELECT");
+    var choiceSelectLinksElem = document.getElementById("CHOICE_SELECT_LINKS");
+
+    // create the button row HTML
+    var i = 0;
+    var linkList ="";
+    for (i=0; i < choiceList.length; i++){
+        if (i > 0){
+            linkList += "<br />";
+        }
+        linkList += "<a href=\"javascript:addChoiceElement(&quot;" + choiceList[i].Name + "&quot;);\" >";
+        linkList += choiceList[i].Label;
+        linkList += "</a>";
+        if (choiceList[i].Help){
+	        linkList += " (";
+	        linkList += choiceList[i].Help;
+	        linkList += ")";
+        }
+    }
+
+
+    // set the created HTML into the ModalBox
+    choiceSelectLinksElem.innerHTML = linkList;
+
+    // arrange the Modal-Box
+    var height = document.body.clientHeight/2;
+    var width = document.body.clientWidth/2;
+    choiceSelectElem.style.height = height + 'px';
+    choiceSelectElem.style.width = width + 'px';
+    choiceSelectLinksElem.style.height = height + 'px';
+    choiceSelectLinksElem.style.width = width + 'px';
+	choiceSelectElem.style.top  = document.body.scrollTop+(document.body.clientHeight - height)/2;
+	choiceSelectElem.style.left  = document.body.scrollLeft+(document.body.clientWidth - width)/2;
+
+    // show the Modal-Box
+    choiceSelectElem.style.display = "block";
+
+    // show the Gay Background
+	choiceOverlay.style.height = document.body.scrollHeight + 'px';
+	choiceOverlay.style.width = document.body.scrollWidth + 'px';
+    choiceOverlay.style.display = "block";
+
+}
+
+
+function closeChoiceSelection() {
+	var _form = document.EDITOR;
+	// reset the Data
+	_form.elementname.value = "";
+	_form.elementindex.value = "";
+	_form.choiceelementname.value = "";
+	// close the Modal-Box
+    document.getElementById('CHOICE_SELECT').style.display ='none';
+    document.getElementById('CHOICE_OVERLAY').style.display = 'none';
+}
+
 // move an element in currently edited content
 function moveElement(elemName, index, direction) {
 	setLastPosition();
@@ -307,7 +381,7 @@
 }
 
 // shows the element operation buttons
-function showElementButtons(elementName, elementIndex, showRemove, showUp, showDown, showAdd) {
+function showElementButtons(elementName, elementIndex, showRemove, showUp, showDown, showAdd, choiceList) {
 	var elemId = elementName + "." + elementIndex;
 	if (oldEditorButtons != null && oldEditorButtons != elemId) {
 		// close eventually open element buttons
@@ -342,7 +416,7 @@
 
 	// add element button
 	if (showAdd) {
-		buttons += button("javascript:addElement('" + elementName + "', " + elementIndex + ")", null, "new", LANG_BT_ADD, buttonStyle);
+		buttons += button("javascript:addElement('" + elementName + "', " + elementIndex + ", " + choiceList + ")", null, "new", LANG_BT_ADD, buttonStyle);
 	} else {
 		buttons += button(null, null, "new_in", LANG_BT_ADD, buttonStyle);
 	}
Index: modules/org.opencms.editors/resources/system/workplace/editors/xmlcontent/editor_form.jsp
===================================================================
RCS file: /usr/local/cvs/opencms/modules/org.opencms.editors/resources/system/workplace/editors/xmlcontent/editor_form.jsp,v
retrieving revision 1.15
diff -u -r1.15 editor_form.jsp
--- modules/org.opencms.editors/resources/system/workplace/editors/xmlcontent/editor_form.jsp	9 Jun 2009 12:21:36 -0000	1.15
+++ modules/org.opencms.editors/resources/system/workplace/editors/xmlcontent/editor_form.jsp	24 Aug 2010 16:43:27 -0000
@@ -298,9 +298,80 @@
 //-->
 </script>
 
+<style>
+#CHOICE_OVERLAY
+{
+    display:none;
+    position:absolute;
+    top:0;
+    left:0;
+    z-index:5000;   
+    background-color:#000;
+    -moz-opacity: 0.5;
+    opacity:.50;
+    filter: alpha(opacity=50);
+}
+
+#CHOICE_SELECT{
+    display:none;
+    position: absolute;
+    z-index:9999;
+    background-color:#d6d3ce;
+    border-color:white #848484 #848484 white;
+    border-style:solid;
+    border-width:2px;
+  
+}
+#CHOICE_HEADER
+{
+	background-color:#08246b;
+	width:100%;
+	float:left;
+}
+
+#CHOICE_HEADER_L
+{
+float:left;
+color:white;
+font-weight:bold;
+font-size:12px;
+padding:2px 0 0 4px;
+
+}
+#CHOICE_HEADER_R
+{
+float:right;
+background-color:#d6d3ce;
+}
+
+#CHOICE_SELECT_LINKS
+
+{
+background-color:#d6d3ce;
+overflow:auto;
+float:left;
+border-color:white #848484 #848484 white;
+border-style:solid;
+border-width:1px;
+margin:20px 0 0 20px;
+padding:20px 0 0 20px;
+width:90% !important;
+height:80% !important;
+}
+</style>
+
 </head>
 <body class="buttons-head" unselectable="on" onload="init();" onunload="exitEditor();">
 
+<div id="CHOICE_OVERLAY" name="CHOICE_OVERLAY"></div>
+<div id="CHOICE_SELECT" name="CHOICE_SELECT" >
+<div id="CHOICE_HEADER" style="">
+<div id="CHOICE_HEADER_L">Modal Window</div>
+<div id="CHOICE_HEADER_R"><a href="javascript:;" onClick="closeChoiceSelection();"><img src="<%=wp.getSkinUri()%>buttons/exit.png" alt="close" width="20" height="20" border="0"/></a></div>
+</div>
+<div id="CHOICE_SELECT_LINKS" name="CHOICE_SELECT_LINKS" ></div>
+</div>
+
 <form name="EDITOR" id="EDITOR" method="post" action="<%= wp.getJsp().link(CmsEditor.PATH_EDITORS + "xmlcontent/editor_form.jsp") %>">
 <input type="hidden" name="<%= CmsDialog.PARAM_ACTION %>" value="<%= wp.getParamAction() %>">
 <input type="hidden" name="<%= CmsDialog.PARAM_RESOURCE %>" value="<%= wp.getParamResource() %>">
@@ -314,6 +385,7 @@
 <input type="hidden" name="<%= CmsEditor.PARAM_MODIFIED %>" value="<%= wp.getParamModified() %>">
 <input type="hidden" name="<%= CmsXmlContentEditor.PARAM_ELEMENTINDEX %>" value="">
 <input type="hidden" name="<%= CmsXmlContentEditor.PARAM_ELEMENTNAME %>" value="">
+<input type="hidden" name="<%= CmsXmlContentEditor.PARAM_CHOICEELEMENTNAME %>" value="">
  
 <%= wp.getXmlEditorForm() %>
 
Index: modules/org.opencms.editors/resources/system/workplace/resources/editors/directedit/jq_edit.js
===================================================================
RCS file: /usr/local/cvs/opencms/modules/org.opencms.editors/resources/system/workplace/resources/editors/directedit/jq_edit.js,v
retrieving revision 1.2
diff -u -r1.2 jq_edit.js
--- modules/org.opencms.editors/resources/system/workplace/resources/editors/directedit/jq_edit.js	25 Mar 2008 09:12:44 -0000	1.2
+++ modules/org.opencms.editors/resources/system/workplace/resources/editors/directedit/jq_edit.js	24 Aug 2010 16:43:27 -0000
@@ -161,6 +161,7 @@
 
 /** Function to set the position of the buttons to the correct position. **/
 var func_ocms_de_reposition = function() {
+  if(this.offsetParent) {
 	var offset = $(this).calcOcmsDeOffset();
     offset.left = offset.left + $(this).width() - $('#buttons_'+this.id).width();
     $('#buttons_'+this.id).css(offset);
@@ -169,6 +170,7 @@
      } else {
        $('#buttons_'+this.id).css('visibility', "hidden");
      }
+  }
 };
 
 /** Function submit the form after clicking the direct edit button. **/
Index: modules/org.opencms.workplace.explorer/resources/manifest.xml
===================================================================
RCS file: /usr/local/cvs/opencms/modules/org.opencms.workplace.explorer/resources/manifest.xml,v
retrieving revision 1.57
diff -u -r1.57 manifest.xml
--- modules/org.opencms.workplace.explorer/resources/manifest.xml	13 Aug 2010 09:07:45 -0000	1.57
+++ modules/org.opencms.workplace.explorer/resources/manifest.xml	24 Aug 2010 16:43:27 -0000
@@ -16,7 +16,7 @@
 		<description><![CDATA[<p>This module contains the OpenCms Workplace Explorer.</p>
 <p>Install this module if you want a GUI to work on the OpenCms VFS.</p>
 <p><i>(c) 2008 by Alkacon Software GmbH (http://www.alkacon.com).</i></p>]]></description>
-		<version>7.5.3</version>
+		<version>7.5.3.1</version>
 		<authorname><![CDATA[Alkacon Software GmbH]]></authorname>
 		<authoremail><![CDATA[info@alkacon.com]]></authoremail>
 		<datecreated>Mon, 27 Jun 2005 08:00:00 GMT</datecreated>
Index: modules/org.opencms.workplace.explorer/resources/system/workplace/resources/commons/tree.js
===================================================================
RCS file: /usr/local/cvs/opencms/modules/org.opencms.workplace.explorer/resources/system/workplace/resources/commons/tree.js,v
retrieving revision 1.15
diff -u -r1.15 tree.js
--- modules/org.opencms.workplace.explorer/resources/system/workplace/resources/commons/tree.js	28 May 2010 10:55:27 -0000	1.15
+++ modules/org.opencms.workplace.explorer/resources/system/workplace/resources/commons/tree.js	24 Aug 2010 16:43:27 -0000
@@ -88,6 +88,7 @@
 var m_rootFolder = null;
 var m_sitePrefix = null;
 var m_treeType = null;
+var m_resourcetypeIds = null;
 
 function treeObject(){
     this.dfsToggleFound = false;
@@ -547,6 +548,14 @@
     }
 }
 
+function getResourcetypeIds() {
+    return m_resourcetypeIds;
+}
+
+function setResourcetypeIds(resourcetypeIds) {
+	m_resourcetypeIds = resourcetypeIds;
+}
+
 function setRootFolder(value) {
     m_rootFolder = value;
 }
@@ -574,6 +583,9 @@
     if (getTreeType()) {
         params += "&type=" + getTreeType();
     }
+    if (getResourcetypeIds()) {
+        params += "&resourcetypeIds=" + getResourcetypeIds();
+	}
     if (m_rootFolder) {
         nodeName = m_rootFolder + nodeName.substring(1);        
     }
@@ -638,9 +650,13 @@
     if (!isProjectAware()) {
         params += "&projectaware=false";
     }
-      if (getTreeType()) {
-            params += "&type=" + getTreeType();
-        }        
+    if (getTreeType()) {
+        params += "&type=" + getTreeType();
+    }
+    if (getResourcetypeIds()) {
+        params += "&resourcetypeIds=" + getResourcetypeIds();
+    }
+	
     var nodeNames = "";
     for (var i=0; i < nodeListToLoad.length; i++) {
         var node = nodeListToLoad[i];
Index: modules/org.opencms.workplace.explorer/resources/system/workplace/views/explorer/tree_fs.jsp
===================================================================
RCS file: /usr/local/cvs/opencms/modules/org.opencms.workplace.explorer/resources/system/workplace/views/explorer/tree_fs.jsp,v
retrieving revision 1.5
diff -u -r1.5 tree_fs.jsp
--- modules/org.opencms.workplace.explorer/resources/system/workplace/views/explorer/tree_fs.jsp	6 Jul 2007 09:52:13 -0000	1.5
+++ modules/org.opencms.workplace.explorer/resources/system/workplace/views/explorer/tree_fs.jsp	24 Aug 2010 16:43:27 -0000
@@ -30,6 +30,13 @@
 		params.append("=true");
 	}
 	
+	if (wp.getResourcetypeIds() != null) {
+		params.append("&");
+		params.append(CmsTree.PARAM_RESOURCETYPE_IDS);
+		params.append("=");
+		params.append(wp.getResourcetypeIds());
+	}
+	
 	String frameRows = "*,0";
 	String frameSiteSelector = "";
 	if (wp.showSiteSelector()) {
Index: modules/org.opencms.workplace.explorer/resources/system/workplace/views/explorer/tree_siteselector.jsp
===================================================================
RCS file: /usr/local/cvs/opencms/modules/org.opencms.workplace.explorer/resources/system/workplace/views/explorer/tree_siteselector.jsp,v
retrieving revision 1.5
diff -u -r1.5 tree_siteselector.jsp
--- modules/org.opencms.workplace.explorer/resources/system/workplace/views/explorer/tree_siteselector.jsp	9 Jun 2008 13:41:54 -0000	1.5
+++ modules/org.opencms.workplace.explorer/resources/system/workplace/views/explorer/tree_siteselector.jsp	24 Aug 2010 16:43:27 -0000
@@ -32,8 +32,9 @@
 <td>
 <form name="siteselect" method="post" action="tree_fs.jsp" target="_top">
 <input type="hidden" name="<%= CmsTree.PARAM_INCLUDEFILES %>" value="<%= wp.includeFiles() %>">
-<input type="hidden" name="<%= CmsTree.PARAM_TYPE %>" value="<%= wp.getTreeType() %>">
-<input type="hidden" name="<%= CmsTree.PARAM_SHOWSITESELECTOR %>" value="<%= wp.showSiteSelector() %>">
+<input type="hidden" name="<%= CmsTree.PARAM_TYPE %>" value="<%= wp.getTreeType() %>">
+<input type="hidden" name="<%= CmsTree.PARAM_SHOWSITESELECTOR %>" value="<%= wp.showSiteSelector() %>">
+<input type="hidden" name="<%= CmsTree.PARAM_RESOURCETYPE_IDS %>" value="<%= wp.getResourcetypeIds() %>">
 <input type="hidden" name="<%= CmsTree.PARAM_RESOURCE %>" value="/">
 <%= wp.getSiteSelector("name=\"treesite\" onchange=\"changeSite();\" style=\"width:250px;\"") %>
 </form>
Index: modules/org.opencms.workplace/resources/manifest.xml
===================================================================
RCS file: /usr/local/cvs/opencms/modules/org.opencms.workplace/resources/manifest.xml,v
retrieving revision 1.71
diff -u -r1.71 manifest.xml
--- modules/org.opencms.workplace/resources/manifest.xml	6 Jul 2010 08:20:11 -0000	1.71
+++ modules/org.opencms.workplace/resources/manifest.xml	24 Aug 2010 16:43:27 -0000
@@ -16,7 +16,7 @@
 		<description><![CDATA[<p>This module contains the OpenCms Workplace base files.</p>
 <p>It includes common used dialogs and style sheets, that are needed by any workplace module.</p>
 <p><i>(c) 2010 by Alkacon Software GmbH (http://www.alkacon.com).</i></p>]]></description>
-		<version>7.5.3</version>
+		<version>7.5.3.1</version>
 		<authorname><![CDATA[Alkacon Software GmbH]]></authorname>
 		<authoremail><![CDATA[info@alkacon.com]]></authoremail>
 		<datecreated>Mon, 27 Jun 2005 08:00:00 GMT</datecreated>
Index: modules/org.opencms.workplace/resources/system/workplace/resources/components/widgets/fileselector.js
===================================================================
RCS file: /usr/local/cvs/opencms/modules/org.opencms.workplace/resources/system/workplace/resources/components/widgets/fileselector.js,v
retrieving revision 1.12
diff -u -r1.12 fileselector.js
--- modules/org.opencms.workplace/resources/system/workplace/resources/components/widgets/fileselector.js	5 Jun 2009 13:31:35 -0000	1.12
+++ modules/org.opencms.workplace/resources/system/workplace/resources/components/widgets/fileselector.js	24 Aug 2010 16:43:27 -0000
@@ -43,7 +43,7 @@
 var treeField = null;
 var treeDoc = null;
 
-function openTreeWin(formName, fieldName, curDoc, showSiteSelector, startSite, includeFiles, projectAware) {
+function openTreeWin(formName, fieldName, curDoc, showSiteSelector, startSite, includeFiles, projectAware, resourcetypeIds) {
 
 	if (includeFiles == null) {
 		includeFiles = true;
@@ -65,6 +65,10 @@
 		paramString += "&treesite=";
 		paramString += startSite;
 	}
+	
+	if (resourcetypeIds != null) {
+		paramString += "&resourcetypeIds="+ resourcetypeIds;
+	}
 
 	treewin = openWin(vr.contextPath + vr.workplacePath + "views/explorer/tree_fs.jsp" + paramString, "opencms", 300, 450);
 	treeForm = formName;
Index: modules/pom-template.xml
===================================================================
RCS file: modules/pom-template.xml
diff -N modules/pom-template.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ modules/pom-template.xml	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,142 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.opencms.modules</groupId>
+	<artifactId>@OPENCMS_MODULE_NAME@</artifactId>
+	<packaging>jar</packaging>
+	<version>@OPENCMS_MODULE_VERSION@</version>
+	<name>@OPENCMS_MODULE_NAME@</name>
+	<url>http://opencms.org</url>
+
+	<description><![CDATA[
+		OpenCms-Module '@OPENCMS_MODULE_NAME@'.
+		
+		@OPENCMS_MODULE_DESCRIPTION@
+		
+		OpenCms is a Content Management System that is based on Open
+		Source Software. Complex Intranet and Internet websites can be
+		quickly and cost-effectively created, maintained and managed.
+		
+		
+	]]></description>
+	
+	<inceptionYear>2008</inceptionYear>
+
+	<mailingLists>
+		<!-- Example:
+		<mailingList>
+			<name>OpenCms library User Mailing list - How To, FAQ, etc</name>
+			<subscribe>
+				http://lists.sourceforge.net/lists/listinfo/opencms-user
+			</subscribe>
+			<unsubscribe>
+				http://lists.sourceforge.net/lists/listinfo/opencms-user
+			</unsubscribe>
+			<post />
+			<archive>
+				http://sourceforge.net/mailarchive/forum.php?forum=opencms-user
+			</archive>
+		</mailingList>
+		-->
+	</mailingLists>
+
+	<developers>
+		<!-- Example:
+		<developer>
+			<name>Harald Brabenetz</name>
+			<id>brabenetz</id>
+			<email>brabenetz(at)users.sourceforge.net</email>
+			<roles>
+				<role>Developer</role>
+			</roles>
+			<timezone>+1</timezone>
+		</developer>
+		 -->
+	</developers>
+	
+	<contributors>
+	</contributors>
+	
+	<licenses>
+		<license>
+			<name>GNU LESSER GENERAL PUBLIC LICENSE 2.1</name>
+			<url>http://www.gnu.org/licenses/lgpl-2.1.txt</url>
+			<distribution>repo</distribution>
+		</license>
+	</licenses>
+	
+	<build>
+		<defaultGoal>install</defaultGoal>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.0.2</version>
+				<configuration>
+					<source>1.5</source>
+					<target>1.5</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<!-- ########################### -->
+		<!-- Place here the Library-dependencies for OpenCms -->
+		<!-- Possible Scopes: compile, provided, runtime, test -->
+		<!-- see http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope -->
+		<!-- ########################### -->
+
+		<!-- ########################### -->
+		<!--      SCOPE Provided          -->
+		<!-- ########################### -->
+		
+		<!-- All Modules depends on opencms-core -->
+		<!-- Already provided in OpenCms-Webapp -->
+		<dependency>
+			<groupId>org.opencms</groupId>
+			<artifactId>opencms-core</artifactId>
+			<version>7.5.3.1</version>
+			<scope>provided</scope>
+		</dependency>
+		
+		<!-- OpenCms-Module-Dependencies of Module '@OPENCMS_MODULE_NAME@' -->
+		
+		@OPENCMS_MODULE_DEPENDENCIES@
+		
+	</dependencies>
+
+	<properties>
+		<distribution.htdocs>scp://grzmvn01.infonova.at/srv/maven/repos/content/sourceforge</distribution.htdocs>
+	</properties>
+
+	<repositories>
+		<repository>
+			<id>infonova-opencms-repo</id>
+			<url>http://bp-cms-commons.sourceforge.net/m2repo</url>
+		</repository>
+	</repositories>
+
+
+	<!-- Example (required for Maven-Release-Plugin)
+	<scm>
+		<connection>scm:svn:http://opencms.svn.sourceforge.net/svnroot/opencms/${project.artifactId}/trunk</connection>
+		<developerConnection>scm:svn:https://opencms.svn.sourceforge.net/svnroot/opencms/${project.artifactId}/trunk</developerConnection>
+		<url>http://opencms.svn.sourceforge.net/viewcvs.cgi/opencms/${project.artifactId}/trunk</url>
+	</scm>
+	 -->
+	<!--
+		Example (required for deploy the artifact to the repository, or the generated Site to the www) -->
+	<distributionManagement>
+		<repository>
+			<id>scp-grzmvn01-content-repository</id>
+			<url>${distribution.htdocs}/m2repo</url>
+		</repository>
+		<snapshotRepository>
+			<id>scp-grzmvn01-content-snapshot-repository</id>
+			<url>${distribution.htdocs}/m2snapshot</url>
+		</snapshotRepository>
+		<site>
+			<id>scp-grzmvn01-content-site</id>
+			<url>${distribution.htdocs}/m2site/opencms/${project.artifactId}/${project.version}/</url>
+		</site>
+	</distributionManagement>
+</project>
Index: pom-opencms-core.xml
===================================================================
RCS file: pom-opencms-core.xml
diff -N pom-opencms-core.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ pom-opencms-core.xml	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,393 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.opencms</groupId>
+	<artifactId>opencms-core</artifactId>
+	<packaging>jar</packaging>
+	<version>7.5.3.1</version>
+	<name>opencms-core</name>
+	<url>http://opencms.org</url>
+
+	<description>
+		Opencms-core is the JAR-Library for OpenCms.
+	
+		OpenCms is a Content Management System that is based on Open
+		Source Software. Complex Intranet and Internet websites can be
+		quickly and cost-effectively created, maintained and managed.
+	</description>
+
+	<inceptionYear>2008</inceptionYear>
+
+	<mailingLists>
+		<!-- Example:-->
+		<!--
+			<mailingList> <name>OpenCms library User Mailing list - How To, FAQ, etc</name>
+			<subscribe>http://lists.sourceforge.net/lists/listinfo/opencms-user</subscribe>
+			<unsubscribe>http://lists.sourceforge.net/lists/listinfo/opencms-user</unsubscribe>
+			<archive>http://sourceforge.net/mailarchive/forum.php?forum=opencms-user</archive> </mailingList>
+		-->
+	</mailingLists>
+
+	<developers>
+		<!-- Example: -->
+		<!--
+			<developer> <name>Harald Brabenetz</name> <id>brabenetz</id> <email>brabenetz(at)users.sourceforge.net</email>
+			<roles> <role>Developer</role> </roles> <timezone>+1</timezone> </developer>
+		-->
+	</developers>
+
+	<contributors>
+	</contributors>
+
+	<licenses>
+		<license>
+			<name>GNU LESSER GENERAL PUBLIC LICENSE 2.1</name>
+			<url>http://www.gnu.org/licenses/lgpl-2.1.txt</url>
+			<distribution>repo</distribution>
+		</license>
+	</licenses>
+
+	<build>
+		<defaultGoal>install</defaultGoal>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-jar-plugin</artifactId>
+				<version>2.2</version>
+				<executions>
+					<!-- Build test-jars, so it can be reused in other Projects like OpenCms-Modules -->
+					<execution>
+						<goals>
+							<goal>test-jar</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.0.2</version>
+				<configuration>
+					<source>1.5</source>
+					<target>1.5</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+
+	<dependencies>
+		<!-- ########################### -->
+		<!-- Place here the Library-dependencies for OpenCms -->
+		<!-- Possible Scopes: compile, provided, runtime, test -->
+		<!-- see http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope -->
+		<!-- ########################### -->
+
+		<!-- ########################### -->
+		<!--      SCOPE Provided         -->
+		<!-- ########################### -->
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>jsp-api</artifactId>
+			<version>2.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.4</version>
+			<scope>provided</scope>
+		</dependency>
+
+		<!-- ########################### -->
+		<!--      SCOPE Compile          -->
+		<!-- ########################### -->
+		<dependency>
+			<groupId>javax.activation</groupId>
+			<artifactId>activation</artifactId>
+			<version>1.1.1</version>
+		</dependency>
+		<dependency>
+			<groupId>com.alkacon</groupId>
+			<artifactId>alkacon-diff</artifactId>
+			<version>0.9.2</version>
+		</dependency>
+		<dependency>
+			<groupId>com.alkacon</groupId>
+			<artifactId>alkacon-simapi</artifactId>
+			<version>0.9.8</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-beanutils</groupId>
+			<artifactId>commons-beanutils</artifactId>
+			<version>1.8.0</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-codec</groupId>
+			<artifactId>commons-codec</artifactId>
+			<version>1.3</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-collections</groupId>
+			<artifactId>commons-collections</artifactId>
+			<version>3.2.1</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-dbcp</groupId>
+			<artifactId>commons-dbcp</artifactId>
+			<version>1.2.2</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-digester</groupId>
+			<artifactId>commons-digester</artifactId>
+			<version>1.8</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-email</artifactId>
+			<version>1.2</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-fileupload</groupId>
+			<artifactId>commons-fileupload</artifactId>
+			<version>1.2.1</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-httpclient</groupId>
+			<artifactId>commons-httpclient</artifactId>
+			<version>3.1</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-io</groupId>
+			<artifactId>commons-io</artifactId>
+			<version>1.4</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-logging</groupId>
+			<artifactId>commons-logging</artifactId>
+			<version>1.1.1</version>
+		</dependency>
+
+		<dependency>
+			<groupId>commons-pool</groupId>
+			<artifactId>commons-pool</artifactId>
+			<version>1.5.4</version>
+		</dependency>
+		<dependency>
+			<groupId>dom4j</groupId>
+			<artifactId>dom4j</artifactId>
+			<version>1.6.1</version>
+			<exclusions>
+				<exclusion>
+					<groupId>xml-apis</groupId>
+					<artifactId>xml-apis</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.htmlparser</groupId>
+			<artifactId>htmlparser</artifactId>
+			<version>1.6</version>
+		</dependency>
+		<dependency>
+			<groupId>oro</groupId>
+			<artifactId>oro</artifactId>
+			<version>2.0.8</version>
+		</dependency>
+		<dependency>
+			<groupId>jaxen</groupId>
+			<artifactId>jaxen</artifactId>
+			<version>1.1.1</version>
+			<exclusions>
+				<exclusion>
+					<groupId>xom</groupId>
+					<artifactId>xom</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>jdom</groupId>
+					<artifactId>jdom</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>xml-apis</groupId>
+					<artifactId>xml-apis</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>jstl</artifactId>
+			<version>1.1.2</version>
+		</dependency>
+		<dependency>
+			<!-- This is not 100% the same as the OpenCms Library "jtidy-8-svn-2006-05-21b.jar" -->
+			<!-- But the OpenCms jtidy-Library contains java-sources and svn-folders => it seems not a correct release... -->
+			<groupId>org.hibernate</groupId>
+			<artifactId>jtidy</artifactId>
+			<version>r8-20060801</version>
+		</dependency>
+		<dependency>
+			<groupId>org.safehaus.jug</groupId>
+			<artifactId>jug</artifactId>
+			<version>2.0.0</version>
+			<classifier>lgpl</classifier>
+		</dependency>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<version>1.2.15</version>
+			<exclusions>
+				<!-- Exclude optional libs. see http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html -->
+				<exclusion>
+					<groupId>javax.mail</groupId>
+					<artifactId>mail</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>javax.jms</groupId>
+					<artifactId>jms</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>com.sun.jdmk</groupId>
+					<artifactId>jmxtools</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>com.sun.jmx</groupId>
+					<artifactId>jmxri</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.lucene</groupId>
+			<artifactId>lucene-analyzers</artifactId>
+			<version>2.4.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.lucene</groupId>
+			<artifactId>lucene-core</artifactId>
+			<version>2.4.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.lucene</groupId>
+			<artifactId>lucene-highlighter</artifactId>
+			<version>2.4.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.lucene</groupId>
+			<artifactId>lucene-queries</artifactId>
+			<version>2.4.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.lucene</groupId>
+			<artifactId>lucene-snowball</artifactId>
+			<version>2.4.1</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.mail</groupId>
+			<artifactId>mail</artifactId>
+			<version>1.4.1</version>
+		</dependency>
+		<dependency>
+			<!-- This is not 100% the same Version as the OpenCms Library "PDFBox-0.7.2.jar" -->
+			<!-- But Version 0.7.2 is not in the public repository: http://repo2.maven.org/maven2/pdfbox/pdfbox/ -->
+			<groupId>pdfbox</groupId>
+			<artifactId>pdfbox</artifactId>
+			<version>0.7.3</version>
+			<exclusions>
+				<exclusion>
+					<groupId>bouncycastle</groupId>
+					<artifactId>bcmail-jdk14</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>bouncycastle</groupId>
+					<artifactId>bcprov-jdk14</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>poi</groupId>
+			<artifactId>poi</artifactId>
+			<version>2.5.1-final-20040804</version>
+		</dependency>
+		<dependency>
+			<groupId>quartz</groupId>
+			<artifactId>quartz</artifactId>
+			<version>1.5.2</version>
+		</dependency>
+		<dependency>
+			<groupId>taglibs</groupId>
+			<artifactId>standard</artifactId>
+			<version>1.1.2</version>
+		</dependency>
+		<dependency>
+			<groupId>org.textmining</groupId>
+			<artifactId>tm-extractors</artifactId>
+			<version>0.4</version>
+		</dependency>
+		<dependency>
+			<groupId>xml-apis</groupId>
+			<artifactId>xml-apis</artifactId>
+			<version>1.3.04</version>
+		</dependency>
+		<dependency>
+			<groupId>xerces</groupId>
+			<artifactId>xercesImpl</artifactId>
+			<version>2.9.1</version>
+			<exclusions>
+				<exclusion>
+					<groupId>xml-apis</groupId>
+					<artifactId>xml-apis</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+
+		<!-- ########################### -->
+		<!--      SCOPE Test             -->
+		<!-- ########################### -->
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.1</version>
+			<scope>test</scope>
+		</dependency>
+
+
+
+
+
+	</dependencies>
+
+	<properties>
+		<distribution.htdocs>scp://grzmvn01.infonova.at/srv/maven/repos/content/sourceforge</distribution.htdocs>
+	</properties>
+
+	<repositories>
+		<repository>
+			<id>infonova-opencms-repo</id>
+			<url>http://bp-cms-commons.sourceforge.net/m2repo</url>
+		</repository>
+	</repositories>
+
+
+	<!--
+		Example (required for Maven-Release-Plugin) <scm>
+		<connection>scm:svn:http://opencms.svn.sourceforge.net/svnroot/opencms/${project.artifactId}/trunk</connection>
+		<developerConnection>scm:svn:https://opencms.svn.sourceforge.net/svnroot/opencms/${project.artifactId}/trunk</developerConnection>
+		<url>http://opencms.svn.sourceforge.net/viewcvs.cgi/opencms/${project.artifactId}/trunk</url> </scm>
+	-->
+	<!--
+		Example (required for deploy the artifact to the repository, or the generated Site to the www) -->
+	<distributionManagement>
+		<repository>
+			<id>scp-grzmvn01-content-repository</id>
+			<url>${distribution.htdocs}/m2repo</url>
+		</repository>
+		<snapshotRepository>
+			<id>scp-grzmvn01-content-snapshot-repository</id>
+			<url>${distribution.htdocs}/m2snapshot</url>
+		</snapshotRepository>
+		<site>
+			<id>scp-grzmvn01-content-site</id>
+			<url>${distribution.htdocs}/m2site/opencms/${project.artifactId}/${project.version}/</url>
+		</site>
+	</distributionManagement>
+	
+</project>
Index: pom-opencms-setup.xml
===================================================================
RCS file: pom-opencms-setup.xml
diff -N pom-opencms-setup.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ pom-opencms-setup.xml	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,122 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.opencms</groupId>
+	<artifactId>opencms-setup</artifactId>
+	<packaging>jar</packaging>
+	<version>7.5.3.1</version>
+	<name>opencms-setup</name>
+	<url>http://opencms.org</url>
+
+	<description>
+		opencms-setup is the JAR-Library for OpenCms to make a initial setup or an update.
+	
+		OpenCms is a Content Management System that is based on Open
+		Source Software. Complex Intranet and Internet websites can be
+		quickly and cost-effectively created, maintained and managed.
+	</description>
+	
+	<inceptionYear>2008</inceptionYear>
+
+	<mailingLists>
+		<!-- Example:
+		<mailingList>
+			<name>OpenCms library User Mailing list - How To, FAQ, etc</name>
+			<subscribe>
+				http://lists.sourceforge.net/lists/listinfo/opencms-user
+			</subscribe>
+			<unsubscribe>
+				http://lists.sourceforge.net/lists/listinfo/opencms-user
+			</unsubscribe>
+			<post />
+			<archive>
+				http://sourceforge.net/mailarchive/forum.php?forum=opencms-user
+			</archive>
+		</mailingList>
+		-->
+	</mailingLists>
+
+	<developers>
+		<!-- Example:
+		<developer>
+			<name>Harald Brabenetz</name>
+			<id>brabenetz</id>
+			<email>brabenetz(at)users.sourceforge.net</email>
+			<roles>
+				<role>Developer</role>
+			</roles>
+			<timezone>+1</timezone>
+		</developer>
+		 -->
+	</developers>
+	
+	<contributors>
+	</contributors>
+	
+	<licenses>
+		<license>
+			<name>GNU LESSER GENERAL PUBLIC LICENSE 2.1</name>
+			<url>http://www.gnu.org/licenses/lgpl-2.1.txt</url>
+			<distribution>repo</distribution>
+		</license>
+	</licenses>
+	
+	<build>
+		<defaultGoal>install</defaultGoal>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.0.2</version>
+				<configuration>
+					<source>1.5</source>
+					<target>1.5</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<!--###########################
+			#
+			#   Place here the Library-dependencies for OpenCms
+			#	Possible Scopes: compile, provided, runtime, test
+			#   see http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope
+			#
+			########################### -->
+	</dependencies>
+
+	<properties>
+		<distribution.htdocs>scp://grzmvn01.infonova.at/srv/maven/repos/content/sourceforge</distribution.htdocs>
+	</properties>
+
+	<repositories>
+		<repository>
+			<id>infonova-opencms-repo</id>
+			<url>http://bp-cms-commons.sourceforge.net/m2repo</url>
+		</repository>
+	</repositories>
+
+
+	<!-- Example (required for Maven-Release-Plugin)
+	<scm>
+		<connection>scm:svn:http://opencms.svn.sourceforge.net/svnroot/opencms/${project.artifactId}/trunk</connection>
+		<developerConnection>scm:svn:https://opencms.svn.sourceforge.net/svnroot/opencms/${project.artifactId}/trunk</developerConnection>
+		<url>http://opencms.svn.sourceforge.net/viewcvs.cgi/opencms/${project.artifactId}/trunk</url>
+	</scm>
+	 -->
+	<!--
+		Example (required for deploy the artifact to the repository, or the generated Site to the www) -->
+	<distributionManagement>
+		<repository>
+			<id>scp-grzmvn01-content-repository</id>
+			<url>${distribution.htdocs}/m2repo</url>
+		</repository>
+		<snapshotRepository>
+			<id>scp-grzmvn01-content-snapshot-repository</id>
+			<url>${distribution.htdocs}/m2snapshot</url>
+		</snapshotRepository>
+		<site>
+			<id>scp-grzmvn01-content-site</id>
+			<url>${distribution.htdocs}/m2site/opencms/${project.artifactId}/${project.version}/</url>
+		</site>
+	</distributionManagement>
+</project>
Index: pom-opencms-webapp.xml
===================================================================
RCS file: pom-opencms-webapp.xml
diff -N pom-opencms-webapp.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ pom-opencms-webapp.xml	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,158 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.opencms</groupId>
+	<artifactId>opencms-webapp</artifactId>
+	<packaging>war</packaging>
+	<version>7.5.3.1</version>
+	<name>opencms-webapp</name>
+	<url>http://opencms.org</url>
+
+	<description>
+		Opencms-webapp is the Skeleton WAR-File for OpenCms without Modules.
+		It only contains the JSPs, Configs, opencms-core and so on.
+	
+		OpenCms is a Content Management System that is based on Open
+		Source Software. Complex Intranet and Internet websites can be
+		quickly and cost-effectively created, maintained and managed.
+	</description>
+	
+	<inceptionYear>2008</inceptionYear>
+
+	<mailingLists>
+		<!-- Example:
+		<mailingList>
+			<name>OpenCms library User Mailing list - How To, FAQ, etc</name>
+			<subscribe>
+				http://lists.sourceforge.net/lists/listinfo/opencms-user
+			</subscribe>
+			<unsubscribe>
+				http://lists.sourceforge.net/lists/listinfo/opencms-user
+			</unsubscribe>
+			<post />
+			<archive>
+				http://sourceforge.net/mailarchive/forum.php?forum=opencms-user
+			</archive>
+		</mailingList>
+		-->
+	</mailingLists>
+
+	<developers>
+		<!-- Example:
+		<developer>
+			<name>Harald Brabenetz</name>
+			<id>brabenetz</id>
+			<email>brabenetz(at)users.sourceforge.net</email>
+			<roles>
+				<role>Developer</role>
+			</roles>
+			<timezone>+1</timezone>
+		</developer>
+		 -->
+	</developers>
+	
+	<contributors>
+	</contributors>
+	
+	<licenses>
+		<license>
+			<name>GNU LESSER GENERAL PUBLIC LICENSE 2.1</name>
+			<url>http://www.gnu.org/licenses/lgpl-2.1.txt</url>
+			<distribution>repo</distribution>
+		</license>
+	</licenses>
+	
+	<build>
+		<defaultGoal>install</defaultGoal>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>2.0.2</version>
+			</plugin>
+		
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.0.2</version>
+				<configuration>
+					<source>1.5</source>
+					<target>1.5</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		
+		<!-- ########################### -->
+		<!-- Place here the Library-dependencies for OpenCms -->
+		<!-- Possible Scopes: compile, provided, runtime, test -->
+		<!-- see http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope -->
+		<!-- ########################### -->
+
+		<!-- ########################### -->
+		<!--      SCOPE Provided         -->
+		<!-- ########################### -->
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>jsp-api</artifactId>
+			<version>2.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.4</version>
+			<scope>provided</scope>
+		</dependency>
+
+		<!-- ########################### -->
+		<!--      SCOPE Compile          -->
+		<!-- ########################### -->
+		<dependency>
+			<groupId>org.opencms</groupId>
+			<artifactId>opencms-core</artifactId>
+			<version>7.5.3.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.opencms</groupId>
+			<artifactId>opencms-setup</artifactId>
+			<version>7.5.3.1</version>
+		</dependency>
+	</dependencies>
+
+	<properties>
+		<distribution.htdocs>scp://grzmvn01.infonova.at/srv/maven/repos/content/sourceforge</distribution.htdocs>
+	</properties>
+
+	<repositories>
+		<repository>
+			<id>infonova-opencms-repo</id>
+			<url>http://bp-cms-commons.sourceforge.net/m2repo</url>
+		</repository>
+	</repositories>
+
+
+	<!-- Example (required for Maven-Release-Plugin)
+	<scm>
+		<connection>scm:svn:http://opencms.svn.sourceforge.net/svnroot/opencms/${project.artifactId}/trunk</connection>
+		<developerConnection>scm:svn:https://opencms.svn.sourceforge.net/svnroot/opencms/${project.artifactId}/trunk</developerConnection>
+		<url>http://opencms.svn.sourceforge.net/viewcvs.cgi/opencms/${project.artifactId}/trunk</url>
+	</scm>
+	 -->
+	<!--
+		Example (required for deploy the artifact to the repository, or the generated Site to the www) -->
+	<distributionManagement>
+		<repository>
+			<id>scp-grzmvn01-content-repository</id>
+			<url>${distribution.htdocs}/m2repo</url>
+		</repository>
+		<snapshotRepository>
+			<id>scp-grzmvn01-content-snapshot-repository</id>
+			<url>${distribution.htdocs}/m2snapshot</url>
+		</snapshotRepository>
+		<site>
+			<id>scp-grzmvn01-content-site</id>
+			<url>${distribution.htdocs}/m2site/opencms/${project.artifactId}/${project.version}/</url>
+		</site>
+	</distributionManagement>
+</project>
Index: src-setup/org/opencms/setup/CmsSetupBean.java
===================================================================
RCS file: /usr/local/cvs/opencms/src-setup/org/opencms/setup/CmsSetupBean.java,v
retrieving revision 1.13
diff -u -r1.13 CmsSetupBean.java
--- src-setup/org/opencms/setup/CmsSetupBean.java	18 Jan 2010 10:02:59 -0000	1.13
+++ src-setup/org/opencms/setup/CmsSetupBean.java	24 Aug 2010 16:43:28 -0000
@@ -1909,6 +1909,11 @@
                 // initialize the database name with the app name
                 if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(request.getContextPath())) {
                     dbName = request.getContextPath().substring(1);
+                    // transform Maven default finalName "${artifactId}-${version}.war"
+                    // e.g.: "opencms-demo-7.5.2" -> "opencms_demo_7_5_2"
+                    // reason: e.g.: MySql cannot have '-', '.' in Database-Name.
+                    dbName = dbName.replace('-', '_');
+                    dbName = dbName.replace('.', '_');
                 }
                 if (provider.equals(ORACLE_PROVIDER)
                     || provider.equals(POSTGRESQL_PROVIDER)
Index: src/org/opencms/widgets/CmsVfsFileWidget.java
===================================================================
RCS file: /usr/local/cvs/opencms/src/org/opencms/widgets/CmsVfsFileWidget.java,v
retrieving revision 1.24
diff -u -r1.24 CmsVfsFileWidget.java
--- src/org/opencms/widgets/CmsVfsFileWidget.java	18 Jan 2010 10:01:01 -0000	1.24
+++ src/org/opencms/widgets/CmsVfsFileWidget.java	24 Aug 2010 16:43:28 -0000
@@ -32,10 +32,16 @@
 package org.opencms.widgets;
 
 import org.opencms.file.CmsObject;
+import org.opencms.loader.CmsLoaderException;
+import org.opencms.main.CmsLog;
 import org.opencms.main.OpenCms;
 import org.opencms.util.CmsStringUtil;
 import org.opencms.workplace.CmsWorkplace;
 
+import java.util.Arrays;
+
+import org.apache.commons.logging.Log;
+
 /**
  * Provides a OpenCms VFS file selection widget, for use on a widget dialog.<p>
  *
@@ -47,6 +53,9 @@
  */
 public class CmsVfsFileWidget extends A_CmsWidget {
 
+    /** The static log object for this class. */
+    private static final Log LOG = CmsLog.getLog(CmsVfsFileWidget.class);
+    
     /** Configuration parameter to set the flag to include files in popup resource tree. */
     public static final String CONFIGURATION_EXCLUDEFILES = "excludefiles";
 
@@ -68,6 +77,9 @@
     /** Configuration parameter to set start site of the popup resource tree. */
     public static final String CONFIGURATION_STARTSITE = "startsite";
 
+    /** Configuration parameter to set the name of the resource types to accept. */
+    public static final String CONFIGURATION_RESOURCETYPENAMES = "resourcetypeNames";
+
     /** Flag to determine if files should be shown in popup window. */
     private boolean m_includeFiles;
 
@@ -80,6 +92,9 @@
     /** The start site used in the popup window. */
     private String m_startSite;
 
+    /** The value for the resource types to accept. */
+    private String[] m_resourcetypeNames;
+
     /**
      * Creates a new vfs file widget.<p>
      */
@@ -121,11 +136,25 @@
      * @param projectAware <code>true</code> if resources outside of the current project should be displayed as normal
      */
     public CmsVfsFileWidget(boolean showSiteSelector, String startSite, boolean includeFiles, boolean projectAware) {
+        this(showSiteSelector, startSite, includeFiles, projectAware, null);
+    }
+
+    /**
+     * Creates a new vfs file widget with the parameters to configure the popup tree window behavior.<p>
+     * 
+     * @param showSiteSelector true if the site selector should be shown in the popup window
+     * @param startSite the start site root for the popup window
+     * @param includeFiles <code>true</code> if files should be shown in the popup window
+     * @param projectAware <code>true</code> if resources outside of the current project should be displayed as normal
+     * @param resourcetypeNames the resource types to accept.
+     */
+    public CmsVfsFileWidget(boolean showSiteSelector, String startSite, boolean includeFiles, boolean projectAware, String[] resourcetypeNames) {
 
         m_showSiteSelector = showSiteSelector;
         m_startSite = startSite;
         m_includeFiles = includeFiles;
         m_projectAware = projectAware;
+        m_resourcetypeNames = resourcetypeNames;
     }
 
     /**
@@ -176,7 +205,19 @@
         } else {
             result.append(CONFIGURATION_NOTPROJECTAWARE);
         }
-
+        // S.Softic append flag for file restrictions
+        if (m_resourcetypeNames != null && m_resourcetypeNames.length > 0) {
+            result.append("|");
+            result.append(CONFIGURATION_RESOURCETYPENAMES);
+            result.append("=");
+            result.append(CmsStringUtil.arrayAsString(
+                m_resourcetypeNames,
+                ","));
+        }
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("m_resourcetypeNames: " + Arrays.toString(m_resourcetypeNames));
+            LOG.debug(result.toString());
+        }
         return result.toString();
     }
 
@@ -230,7 +271,8 @@
     public String getDialogWidget(CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) {
 
         String id = param.getId();
-        StringBuffer result = new StringBuffer(128);
+        // S.Softic adding some space to the buffer        
+        StringBuffer result = new StringBuffer(200);
 
         result.append("<td class=\"xmlTd\">");
         result.append("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"maxwidth\"><tr><td style=\"width: 100%;\">");
@@ -248,7 +290,8 @@
         result.append(widgetDialog.dialogHorizontalSpacer(10));
         result.append("<td><table class=\"editorbuttonbackground\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>");
 
-        StringBuffer buttonJs = new StringBuffer(8);
+        // S.Softic adding some space to the buffer
+        StringBuffer buttonJs = new StringBuffer(35);
         buttonJs.append("javascript:openTreeWin('EDITOR',  '");
         buttonJs.append(id);
         buttonJs.append("', document, ");
@@ -265,7 +308,10 @@
         // project awareness
         buttonJs.append(", ");
         buttonJs.append(m_projectAware);
-        buttonJs.append(");return false;");
+        // resourcetypeIds
+        buttonJs.append(", '");
+        buttonJs.append(getRestrictResTypeIdsAsString(","));
+        buttonJs.append("');return false;");
 
         result.append(widgetDialog.button(
             buttonJs.toString(),
@@ -347,7 +393,55 @@
                 // resources outside of the current project should not be disabled
                 m_projectAware = false;
             }
+          
+            //setting the configuration
+            if (configuration.indexOf(CONFIGURATION_RESOURCETYPENAMES) !=-1) {
+                   String restriction = configuration.substring(configuration.indexOf(CONFIGURATION_RESOURCETYPENAMES)+CONFIGURATION_RESOURCETYPENAMES.length() + 1);
+                if (restriction.indexOf('|') != -1) {
+                    // cut eventual following configuration values
+                    restriction = restriction.substring(0, restriction.indexOf('|'));
+                }
+                else {
+                    restriction = restriction.substring(0, restriction.length());
+                }
+
+                m_resourcetypeNames = CmsStringUtil.splitAsArray(
+                    restriction,
+                    ",");
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("m_restrictResTypes.length: " + m_resourcetypeNames.length);
+                    LOG.debug("m_restrictResTypes: " + Arrays.toString(m_resourcetypeNames));
+                }
+            }
         }
         super.setConfiguration(configuration);
     }
+    
+    /**
+     * Get The restricted ResourceType Ids as String with the given delimiter.
+     * 
+     * @param delimiter
+     * @return String of Ids
+     */
+    protected String getRestrictResTypeIdsAsString(String delimiter) {
+        if (m_resourcetypeNames == null) {
+            //TODO Harald.Brabenetz 28.01.2010 : Check if this should return null or empty String.
+            return "";
+        }
+        StringBuffer result = new StringBuffer();
+        for (int i = 0; i < m_resourcetypeNames.length; i++) {
+            String resourceTypeName = m_resourcetypeNames[i];
+            try {
+                int id = OpenCms.getResourceManager().getResourceType(resourceTypeName).getTypeId();
+                if (result.length() > 0) {
+                    result.append(delimiter);
+                }
+                LOG.info("append id: " + id);
+                result.append(id);
+            } catch (CmsLoaderException e) {
+                LOG.warn("No id found for ResourceTyp '" + resourceTypeName + "'", e);
+            }
+        }
+        return result.toString();
+    }
 }
Index: src/org/opencms/workplace/CmsWidgetDialog.java
===================================================================
RCS file: /usr/local/cvs/opencms/src/org/opencms/workplace/CmsWidgetDialog.java,v
retrieving revision 1.73
diff -u -r1.73 CmsWidgetDialog.java
--- src/org/opencms/workplace/CmsWidgetDialog.java	18 Jan 2010 10:03:37 -0000	1.73
+++ src/org/opencms/workplace/CmsWidgetDialog.java	24 Aug 2010 16:43:28 -0000
@@ -238,7 +238,7 @@
             href.append(elementName);
             href.append("', ");
             href.append(insertAfter);
-            href.append(");");
+            href.append(",[]);");
             return button(href.toString(), null, "new.png", Messages.GUI_DIALOG_BUTTON_ADDNEW_0, 0);
         } else {
             return "";
Index: src/org/opencms/workplace/CmsWorkplace.java
===================================================================
RCS file: /usr/local/cvs/opencms/src/org/opencms/workplace/CmsWorkplace.java,v
retrieving revision 1.180
diff -u -r1.180 CmsWorkplace.java
--- src/org/opencms/workplace/CmsWorkplace.java	18 Jan 2010 10:03:36 -0000	1.180
+++ src/org/opencms/workplace/CmsWorkplace.java	24 Aug 2010 16:43:28 -0000
@@ -748,7 +748,7 @@
 
         String anchorStart = "<a href=\"";
         if ((href != null) && href.toLowerCase().startsWith("javascript:")) {
-            anchorStart = "<a href=\"#\" onclick=\"";
+            anchorStart = "<a href=\"javascript:;\" onclick=\""; //use "javascript:;" instead of "#" => don't jump to the Top of the page.
         }
 
         result.append("<td style=\"vertical-align: top;\">");
Index: src/org/opencms/workplace/editors/CmsXmlContentEditor.java
===================================================================
RCS file: /usr/local/cvs/opencms/src/org/opencms/workplace/editors/CmsXmlContentEditor.java,v
retrieving revision 1.91
diff -u -r1.91 CmsXmlContentEditor.java
--- src/org/opencms/workplace/editors/CmsXmlContentEditor.java	2 Jul 2010 14:15:59 -0000	1.91
+++ src/org/opencms/workplace/editors/CmsXmlContentEditor.java	24 Aug 2010 16:43:28 -0000
@@ -39,6 +39,9 @@
 import org.opencms.file.collectors.I_CmsResourceCollector;
 import org.opencms.i18n.CmsEncoder;
 import org.opencms.i18n.CmsLocaleManager;
+import org.opencms.json.JSONArray;
+import org.opencms.json.JSONException;
+import org.opencms.json.JSONObject;
 import org.opencms.jsp.CmsJspActionElement;
 import org.opencms.lock.CmsLockType;
 import org.opencms.main.CmsException;
@@ -75,6 +78,7 @@
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
+import java.util.StringTokenizer;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
@@ -154,6 +158,9 @@
     /** Parameter name for the request parameter "elementname". */
     public static final String PARAM_ELEMENTNAME = "elementname";
 
+    /** Parameter name for the request parameter "elementname". */
+    public static final String PARAM_CHOICEELEMENTNAME = "choiceelementname";
+
     /** Parameter name for the request parameter "newlink". */
     public static final String PARAM_NEWLINK = "newlink";
 
@@ -193,6 +200,9 @@
     /** Parameter stores the name of the element to add or remove. */
     private String m_paramElementName;
 
+    /** Parameter stores the name of the Choice-element to add. */
+    private String m_paramChoiceElementName;
+
     /** The selected model file for the new resource. */
     private String m_paramModelFile;
 
@@ -653,7 +663,20 @@
                 // when other values are present, increase index to use right position
                 index += 1;
             }
-            m_content.addValue(getCms(), getParamElementName(), getElementLocale(), index);
+
+            if (CmsStringUtil.isEmpty(getParamChoiceElementName())) {
+                m_content.addValue(getCms(), getParamElementName(), getElementLocale(), index);
+            } else {
+                I_CmsXmlContentValue value = m_content.addValue(getCms(), getParamElementName(), getElementLocale(), index);
+                
+                //The tokenizer is necessary if a ChoiceContentDefinition contents Elements who are also a ChoiceContentDefinition
+                StringTokenizer tok = new StringTokenizer(getParamChoiceElementName(), "/");
+                while (tok.hasMoreElements()) {
+                    String choiceElement = tok.nextToken();
+                    LOG.info("choiceElement: " + choiceElement);
+                    value = m_content.addValue(getCms(), value.getPath() + "/" + choiceElement, getElementLocale(), 0);
+                }
+            }
         }
 
         if (getValidationHandler().hasWarnings(getElementLocale())) {
@@ -752,6 +775,17 @@
     }
 
     /**
+     * Returns the name of the Choice element to add.<p>
+     * This Parameter can also be seperated by "/" if a ChoiceContentDefinition has Elements who are also ChoiceContentDefinitions.
+     *
+     * @return the name of the Choice element to add
+     */
+    public String getParamChoiceElementName() {
+
+        return m_paramChoiceElementName;
+    }
+
+    /**
      * Returns the parameter that specifies the model file name.<p>
      * 
      * @return the parameter that specifies the model file name
@@ -1036,6 +1070,17 @@
     }
 
     /**
+     * Sets the name of the Choice-Element to add.<p>
+     * This Parameter can also be seperated by "/" if a ChoiceContentDefinition has Elements who are also ChoiceContentDefinitions.
+     *
+     * @param elementName the name of the Choice-Element to add
+     */
+    public void setParamChoiceElementName(String elementName) {
+
+        m_paramChoiceElementName = elementName;
+    }
+
+    /**
      * Sets the parameter that specifies the model file name.<p>
      * 
      * @param paramMasterFile the parameter that specifies the model file name
@@ -1317,9 +1362,12 @@
      * @param index the index of the element
      * @param addElement if true, the button to add an element is shown
      * @param removeElement if true, the button to remove an element is shown
+     * @param choiceListJson List of Choices if a ChoiceContentDefinition should be added.<br />
+     *        This must be a valid Javascript-JSON-String<br />
+     *        Example value for choiceListJson: [{Label:"first test", Name:"test1", Help:"The ElementType can be a Simple or Complex Type"},{Label:"second test", Name:"test2"}]
      * @return the html for the element operation buttons
      */
-    private String buildElementButtons(String elementName, int index, boolean addElement, boolean removeElement) {
+    private String buildElementButtons(String elementName, int index, boolean addElement, boolean removeElement, String choiceListJson) {
 
         StringBuffer jsCall = new StringBuffer(512);
 
@@ -1365,9 +1413,13 @@
         // build the add element button if required
         if (addElement) {
             jsCall.append(Boolean.TRUE);
+            // This param must be Javascript & HTML escaped.
+            // It is the Parameter of the showElementButtons()-function who create a HTML-link with href="javascript:addElement(... choiceListJson ...)"
+            jsCall.append(", \"" + CmsStringUtil.escapeJavaScript(CmsStringUtil.escapeHtml(choiceListJson)) + "\"");
             buttonPresent = true;
         } else {
             jsCall.append(Boolean.FALSE);
+            jsCall.append(", \"[]\"");
         }
         jsCall.append(");");
 
@@ -1387,6 +1439,7 @@
                 action.append(elementName);
                 action.append("', ");
                 action.append(index);
+                action.append(", " + choiceListJson + "");
                 action.append(");");
                 btAction = action.toString();
             } else if (removeElement) {
@@ -1402,9 +1455,9 @@
             }
             StringBuffer href = new StringBuffer(512);
             href.append("javascript:");
-            href.append(btAction);
+            href.append(CmsStringUtil.escapeHtml(btAction)); //escape quotes in HTML-Attribute
             href.append("\" onmouseover=\"");
-            href.append(jsCall);
+            href.append(CmsStringUtil.escapeHtml(jsCall.toString())); //escape quotes in HTML-Attribute
             href.append("checkElementButtons(true);\" onmouseout=\"checkElementButtons(false);\" id=\"btimg.");
             href.append(elementName).append(".").append(index);
             result = button(href.toString(), null, btIcon, Messages.GUI_EDITOR_XMLCONTENT_ELEMENT_BUTTONS_0, 0);
@@ -1669,11 +1722,28 @@
                     firstElement = false;
                 }
 
+                
+                // get nestedContent Infos (also Choice-Content)
                 CmsXmlContentDefinition nestedContentDefinition = contentDefinition;
+                List choiceList = new ArrayList(); //needed for Javascript-ADD-Button
+                
                 if (!type.isSimpleType()) {
                     // get nested content definition for nested types
                     CmsXmlNestedContentDefinition nestedSchema = (CmsXmlNestedContentDefinition)type;
-                    nestedContentDefinition = nestedSchema.getNestedContentDefinition();
+                    nestedContentDefinition = getNestedContentDefinition(nestedSchema);
+                    
+                    // get Choice-Elements to Choice-List (needed for Javascript-ADD-Button)
+                    if (nestedContentDefinition.isChoiceType()) {
+                        
+                        Iterator choiceSubElementTypeIterator = nestedContentDefinition.getTypeSequence().iterator();
+                        while (choiceSubElementTypeIterator.hasNext()) {
+                            // get the type of possible SubElements
+                            I_CmsXmlSchemaType choiceSubElementType = (I_CmsXmlSchemaType)choiceSubElementTypeIterator.next();
+
+                            // add Choice-Element to Choice-List recursively
+                            addChoiceElementToChoiceList(choiceList, nestedContentDefinition, choiceSubElementType);
+                        }
+                    }
                 }
                 // create xpath to the current element
                 String name = pathPrefix + type.getName();
@@ -1707,8 +1777,47 @@
                     // get value and corresponding widget
                     I_CmsXmlContentValue value = elementSequence.getValue(j);
                     I_CmsWidget widget = null;
-                    if (type.isSimpleType()) {
-                        widget = contentDefinition.getContentHandler().getWidget(value);
+                    
+                    // the value will be replaced by the SubElement if it is a ChoiceElement.
+                    // so get the Index now bevor it is to late.
+                    int valueIndex = value.getIndex();
+                    
+                    // Get ChoiceSubElementsVariables
+                    String choiceSubElementPathPrefix = null; // only necessary if the Choice-SubElement is a NestedContent (recursive-Call of this function)
+                    CmsXmlContentDefinition choiceSubElementNestedContentDefinition = null; //only used if widget==null
+                    
+                    String label;
+                    
+                    // if this elments has a Value and it is a Choice-Element, than get the chosen ChoiceSubElement
+                    if (!disabledElement && !type.isSimpleType() && nestedContentDefinition.isChoiceType()) {
+                        ChoiceSubElementValueHolder valueHolder = new ChoiceSubElementValueHolder(nestedContentDefinition, pathPrefix, value, widget);
+
+                        // get Lable
+                        label = keyDefault(A_CmsWidget.getLabelKey((I_CmsWidgetParameter)value), value.getName());
+                        valueHolder.setLabel(label);
+                        
+                        valueHolder = getChoiceSubElement(valueHolder);
+
+                        // The new ChoiceSubElementPathPrefix
+                        choiceSubElementPathPrefix = valueHolder.getPathPrefix();
+                        // The new ChoiceSubElement Value
+                        value = valueHolder.getValue();
+                        // The Label for this ChoiceSubElement Value (Wihtout Counter. Maybe separate by "/" if it is a recusrsive Choice SubSubElement )
+                        label = valueHolder.getLabel();
+                        // The new ChoiceSubElement Widget Or NestedContentDefinition (who is certainly no choice nestedContentDefinition.)
+                        widget = valueHolder.getWidget();
+                        choiceSubElementNestedContentDefinition = valueHolder.getNestedContentDefinition();
+                        
+                    } else {
+                        label = keyDefault(A_CmsWidget.getLabelKey((I_CmsWidgetParameter)value), value.getName());
+                        if (type.isSimpleType()) {
+                            widget = contentDefinition.getContentHandler().getWidget(value);
+                        }
+                    }
+
+                    // Befor an empty Lable exists show the element-Name
+                    if (CmsStringUtil.isEmpty(label)) {
+                        label = value.getName();
                     }
 
                     String key = value.getPath();
@@ -1780,6 +1889,7 @@
                             m_warningTabs.add(m_currentTab);
                         }
                     }
+                    
                     // create label and help bubble cells
                     result.append("<tr>");
                     if (!collapseLabel) {
@@ -1789,13 +1899,13 @@
                             result.append("Disabled");
                         }
                         result.append("\">");
-                        result.append(keyDefault(A_CmsWidget.getLabelKey((I_CmsWidgetParameter)value), value.getName()));
+                        result.append(label);
                         if (elementCount > 1) {
-                            result.append(" [").append(value.getIndex() + 1).append("]");
+                            result.append(" [").append(valueIndex + 1).append("]");
                         }
                         result.append(": </td>");
                         if (showHelpBubble && (widget != null) && (value.getIndex() == 0)) {
-                            // show help bubble only on first element of each content definition 
+                            // show help bubble only on first element of each content definition (if it is a Choice-Value than value.getIndex() is always 0)
                             result.append(widget.getHelpBubble(getCms(), this, (I_CmsWidgetParameter)value));
                         } else {
                             // create empty cell for all following elements 
@@ -1806,17 +1916,31 @@
                     // append individual widget html cell if element is enabled
                     if (!disabledElement) {
                         if (widget == null) {
-                            // recurse into nested type sequence
-                            String newPath = CmsXmlUtils.createXpathElement(value.getName(), value.getIndex() + 1);
-                            result.append("<td class=\"maxwidth\">");
-                            boolean showHelp = (j == 0);
                             superTabOpened = !nested && tabOpened && collapseLabel;
-                            result.append(getXmlEditorForm(
-                                nestedContentDefinition,
-                                pathPrefix + newPath + "/",
-                                showHelp,
-                                superTabOpened));
-                            result.append("</td>");
+                            
+                            if (nestedContentDefinition.isChoiceType()) {
+                                //include subelement
+                                String newPath = CmsXmlUtils.createXpathElement(value.getName(), value.getIndex() + 1); // if it is a Choice-Value than value.getIndex() is always 0
+                                result.append("<td class=\"maxwidth\">");
+                                boolean showHelp = true;
+                                result.append(getXmlEditorForm(
+                                    choiceSubElementNestedContentDefinition,
+                                    choiceSubElementPathPrefix + newPath + "/",
+                                    showHelp,
+                                    superTabOpened));
+                                result.append("</td>");
+                            } else {
+                                String newPath = CmsXmlUtils.createXpathElement(value.getName(), value.getIndex() + 1);
+                                result.append("<td class=\"maxwidth\">");
+                                boolean showHelp = (j == 0);
+                                result.append(getXmlEditorForm(
+                                    nestedContentDefinition,
+                                    pathPrefix + newPath + "/",
+                                    showHelp,
+                                    superTabOpened));
+                                result.append("</td>");
+                            }
+                            
                         } else {
                             // this is a simple type, display widget
                             result.append(widget.getDialogWidget(getCms(), this, (I_CmsWidgetParameter)value));
@@ -1829,7 +1953,7 @@
                     }
 
                     // append element operation (add, remove, move) buttons if required
-                    result.append(buildElementButtons(name, value.getIndex(), addValue, removeValue));
+                    result.append(buildElementButtons(name, valueIndex, addValue, removeValue, new JSONArray(choiceList).toString()));
 
                     // close row
                     result.append("</tr>\n");
@@ -1871,6 +1995,211 @@
     }
 
     /**
+     * Get some infos of The SubElement of this ChoiceElements:<br />
+     * (a Choice-Element can only have one Subelement.)<br />
+     * - pathPrefix: only necessary if the Choice-SubElement is a NestedContent (for recursive-Call of this function)<br />
+     * - I_CmsXmlContentValue value: <br />
+     * - Widget or NestedContentDefinition)<br />
+     * <br />
+     * return the ValueHolder With the nestedContentDefinition, pathprefix and value of the single SubElement<br />
+     * Or recursively the SubSubElement who is not a Choice NestedContentDefinition.<br />
+     * 
+     * @param valueHolder Contains the nestedContentDefinition, pathprefix and value of the parentElement.
+     * @return the ValueHolder With the (nestedContentDefinition or widget), pathprefix and value of the single SubElement (or recursively the SubSubElement who is not a Choice NestedContentDefinition.).
+     * @throws CmsXmlException
+     */
+    private ChoiceSubElementValueHolder getChoiceSubElement(ChoiceSubElementValueHolder valueHolder) throws CmsXmlException {
+        
+        String newPath = CmsXmlUtils.createXpathElement(valueHolder.getValue().getName(), valueHolder.getValue().getIndex() + 1);
+
+        // GET new PathPrefix
+        valueHolder.setPathPrefix(valueHolder.getPathPrefix() + newPath + "/");
+        
+        // iterate the type sequence and search a value with this type
+        Iterator choiceSubElementTypeIterator = valueHolder.getNestedContentDefinition().getTypeSequence().iterator();
+        while (choiceSubElementTypeIterator.hasNext()) {
+
+            // get the type of possible SubElements
+            I_CmsXmlSchemaType choiceSubElementType = (I_CmsXmlSchemaType)choiceSubElementTypeIterator.next();
+            
+            
+            // create xpath to the Sub element of this Choice-Element
+            String choiceSubElementName = valueHolder.getPathPrefix() + choiceSubElementType.getName();
+            
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("choiceSubElementName: " + choiceSubElementName);
+            }
+            
+            // get the element sequence of the current type
+            CmsXmlContentValueSequence choiceSubElementSequence = m_content.getValueSequence(choiceSubElementName, getElementLocale());
+            if (choiceSubElementSequence == null) {
+                // No choiceSubElementType found, goto next choiceSubElementType
+                LOG.error("should not occured");
+                continue;
+            }
+            
+            int choiceSubElementCount = choiceSubElementSequence.getElementCount();
+            if (choiceSubElementCount < 1) {
+                // No element found for this choiceSubElementType, goto next choiceSubElementType
+                continue;
+            }
+            
+            if (choiceSubElementCount > 1) { // Choice-Sub-Elements can only occurede one time.
+                LOG.warn("choiceSubElementCount > 1: '" + m_content.getFile().getRootPath() + "'; '" + valueHolder.getPathPrefix() + "'");
+            }
+            
+            // get the first choiceSubElementValue
+            valueHolder.setValue(choiceSubElementSequence.getValue(0));
+            
+            // get Lable
+            String label = keyDefault(A_CmsWidget.getLabelKey((I_CmsWidgetParameter)valueHolder.getValue()), valueHolder.getValue().getName());
+            if (!CmsStringUtil.isEmpty(valueHolder.getLabel())) {
+                if (!CmsStringUtil.isEmpty(label)) {
+                    label = valueHolder.getLabel().concat("/").concat(label);
+                }
+            }
+            valueHolder.setLabel(label);
+            
+            // get Widget or NestedContentDefinition or recursivly the result of the Choice-NestedContentDefinition 
+            if (choiceSubElementType.isSimpleType()) {
+                valueHolder.setWidget(valueHolder.getNestedContentDefinition().getContentHandler().getWidget(valueHolder.getValue()));
+            } else {
+                // get nested content definition for nested types
+                CmsXmlNestedContentDefinition choiceSubElementNestedSchema = (CmsXmlNestedContentDefinition)choiceSubElementType;
+                valueHolder.setNestedContentDefinition(choiceSubElementNestedSchema.getNestedContentDefinition());
+                if (valueHolder.getNestedContentDefinition().isChoiceType()) {
+                    LOG.info("Nested ChoiceContentDefinition found: " + valueHolder.getPathPrefix());
+                    valueHolder = getChoiceSubElement(valueHolder);
+                }
+            }
+            
+            // found one Sub-Element found in Choice-Element
+            return valueHolder; // exit loop
+        }
+        
+        LOG.warn("NO nestedContent- Choice-Value found: " + valueHolder.getPathPrefix());
+        return valueHolder;
+    }
+
+    /**
+     * add Choice-Element to Choice-List (needed for Javascript-ADD-Button).
+     * 
+     * @param choiceList The ChoiceList where The Choice-Element should be added
+     * @param contentDefinition The contentDefinition who contents this choiceSubElementType
+     * @param choiceSubElementType The element type of the Choice-Element who should be added
+     * @throws JSONException  
+     */
+    private void addChoiceElementToChoiceList(List choiceList, CmsXmlContentDefinition contentDefinition, I_CmsXmlSchemaType choiceSubElementType) throws JSONException {
+        addChoiceElementToChoiceList(choiceList, contentDefinition, choiceSubElementType, "", "");
+    }
+
+    /**
+     * add Choice-Element to Choice-List recursively (needed for Javascript-ADD-Button).
+     * 
+     * @param choiceList The ChoiceList where The Choice-Element should be added
+     * @param contentDefinition The contentDefinition who contents this choiceSubElementType
+     * @param choiceSubElementType The element type of the Choice-Element who should be added
+     * @param labelPrefix the Labelprefix of the previously called {@link #addChoiceElementToChoiceList(List, CmsXmlContentDefinition, I_CmsXmlSchemaType, String, String)}
+     * @param namePrefix the Nameprefix of the previously called {@link #addChoiceElementToChoiceList(List, CmsXmlContentDefinition, I_CmsXmlSchemaType, String, String)}
+     * @throws JSONException 
+     */
+    private void addChoiceElementToChoiceList(List choiceList, CmsXmlContentDefinition contentDefinition, I_CmsXmlSchemaType choiceElementType, String labelPrefix, String namePrefix) throws JSONException {
+        StringBuffer labelKey = new StringBuffer(128);
+        String helpKey;
+        // The following code is not used in XmlContentEditor (Only used in Administration-View etc....)
+//        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(pathPrefix)) {
+//            labelKey.append(pathPrefix);
+//            labelKey.append('.');
+//        }
+        labelKey.append(A_CmsWidget.LABEL_PREFIX);
+        labelKey.append(contentDefinition.getInnerName());
+        labelKey.append('.');
+        labelKey.append(choiceElementType.getName());
+        
+        helpKey = labelKey.toString().concat(A_CmsWidget.HELP_POSTFIX);
+        
+        
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("labelKey: " + labelKey.toString());
+            LOG.debug("helpKey: " + helpKey);
+        }
+
+        String label = keyDefault(labelKey.toString(), choiceElementType.getName());
+        String help = keyDefault(helpKey, "");
+        String name = choiceElementType.getName();
+        
+        // append Prefixes to Name & Label
+        if (!CmsStringUtil.isEmpty(namePrefix)) {
+            name = namePrefix.concat("/").concat(name);
+        }
+        if (!CmsStringUtil.isEmpty(labelPrefix)) {
+            if (!CmsStringUtil.isEmpty(label)) {
+                label = labelPrefix.concat("/").concat(label);
+            }
+        }
+        
+
+        // add Choice-Element to Choice-List
+        if (isChoiceType(choiceElementType)) {
+            CmsXmlContentDefinition nestedContentDefinition = getNestedContentDefinition(choiceElementType);
+            
+            // recursive call if this is a Choice-NestedContentDefinition
+            Iterator choiceSubElementTypeIterator = nestedContentDefinition.getTypeSequence().iterator();
+            while (choiceSubElementTypeIterator.hasNext()) {
+                // get the type of possible SubElements
+                I_CmsXmlSchemaType choiceSubElementType = (I_CmsXmlSchemaType)choiceSubElementTypeIterator.next();
+
+                // add Choice-Element to Choice-List
+                addChoiceElementToChoiceList(choiceList, nestedContentDefinition, choiceSubElementType, label, name);
+            }
+        } else {
+            JSONObject jsonObj = new JSONObject();
+            jsonObj.put("Label", label);
+            jsonObj.put("Name", name);
+            if (!CmsStringUtil.isEmpty(help)) {
+                jsonObj.put("Help", help);
+            }
+            choiceList.add(jsonObj);
+        }
+    }
+
+    /**
+     * check if this choiceElementType is a Choice-NestedContentDefinition.
+     * 
+     * @param choiceElementType true if this element is a choice-element
+     * 
+     * @return
+     */
+    private boolean isChoiceType(I_CmsXmlSchemaType choiceElementType) {
+        
+        boolean isChoiceType;
+        CmsXmlContentDefinition nestedContentDefinition = null;
+        if (choiceElementType.isSimpleType()) {
+            isChoiceType = false;
+        } else {
+            nestedContentDefinition = getNestedContentDefinition(choiceElementType);
+            
+            // get Choice-Elements to Choice-List (needed for Javascript-ADD-Button)
+            if (nestedContentDefinition.isChoiceType()) {
+                isChoiceType = true;
+            } else {
+                isChoiceType = false;
+            }
+        }
+        return isChoiceType;
+    }
+
+    private CmsXmlContentDefinition getNestedContentDefinition(I_CmsXmlSchemaType nestedSchema) {
+
+        if (nestedSchema instanceof CmsXmlNestedContentDefinition) {
+            CmsXmlContentDefinition nestedContentDefinition = ((CmsXmlNestedContentDefinition)nestedSchema).getNestedContentDefinition();
+            return nestedContentDefinition;
+        } else {
+            throw new IllegalArgumentException("The nestedSchema must be an Inxtance of CmsXmlNestedContentDefinition.");
+        }
+    }
+    
+    /**
      * Resets the error handler member variable to reinitialize the error messages.<p>
      */
     private void resetErrorHandler() {
@@ -1905,4 +2234,57 @@
         m_file = getCloneCms().writeFile(m_file);
         m_content = CmsXmlContentFactory.unmarshal(getCloneCms(), m_file);
     }
+    
+    /**
+     * The recursive function {@link CmsXmlContentEditor#getChoiceSubElement(ChoiceSubElementValueHolder)}<br />
+     * Returns more then one Value: A ValueHolder is needed.<br />
+     * 
+     * @author harald brabenetz
+     */
+    private class ChoiceSubElementValueHolder {
+        private String m_pathPrefix; // only necessary if the Choice-SubElement is a NestedContent (recursive-Calls)
+        private CmsXmlContentDefinition m_nestedContentDefinition; //only used if widget==null
+        private I_CmsXmlContentValue m_value;
+        private I_CmsWidget m_widget;
+        private String m_label;
+        
+        public ChoiceSubElementValueHolder(CmsXmlContentDefinition nestedContentDefinition, String pathPrefix, I_CmsXmlContentValue value, I_CmsWidget widget) {
+            super();
+            this.m_nestedContentDefinition = nestedContentDefinition;
+            this.m_pathPrefix = pathPrefix;
+            this.m_value = value;
+            this.m_widget = widget;
+        }
+        
+        public CmsXmlContentDefinition getNestedContentDefinition() {
+            return m_nestedContentDefinition;
+        }
+        public void setNestedContentDefinition(CmsXmlContentDefinition nestedContentDefinition) {
+            this.m_nestedContentDefinition = nestedContentDefinition;
+        }
+        public String getPathPrefix() {
+            return m_pathPrefix;
+        }
+        public void setPathPrefix(String pathPrefix) {
+            this.m_pathPrefix = pathPrefix;
+        }
+        public I_CmsXmlContentValue getValue() {
+            return m_value;
+        }
+        public void setValue(I_CmsXmlContentValue value) {
+            this.m_value = value;
+        }
+        public I_CmsWidget getWidget() {
+            return m_widget;
+        }
+        public void setWidget(I_CmsWidget widget) {
+            this.m_widget = widget;
+        }
+        public String getLabel() {
+            return m_label;
+        }
+        public void setLabel(String label) {
+            this.m_label = label;
+        }
+    }
 }
\ No newline at end of file
Index: src/org/opencms/workplace/explorer/CmsTree.java
===================================================================
RCS file: /usr/local/cvs/opencms/src/org/opencms/workplace/explorer/CmsTree.java,v
retrieving revision 1.34
diff -u -r1.34 CmsTree.java
--- src/org/opencms/workplace/explorer/CmsTree.java	18 Jan 2010 10:03:13 -0000	1.34
+++ src/org/opencms/workplace/explorer/CmsTree.java	24 Aug 2010 16:43:28 -0000
@@ -122,6 +122,12 @@
     /** Type name for showing the tree in a widget dialog. */
     private static final String TYPE_VFSWIDGET = "vfswidget";
 
+    /** Request parameter name for the resourcetype-ids parameter. */
+    public static final String PARAM_RESOURCETYPE_IDS = "resourcetypeIds";
+
+    /** delimiter for ResourcetypeIds. */
+    public static final String PARAM_RESOURCETYPE_IDS_DELIMITER = ",";
+
     /** Indicates if only folders or files and folders should be included in the tree. */
     private boolean m_includeFiles;
 
@@ -146,6 +152,9 @@
     /** The type of the tree (e.g. "copy", "project" etc.). */
     private String m_treeType;
 
+    /** The delimited list of resource type ids. */
+    private String m_resourcetypeIds;
+
     /**
      * Public constructor.<p>
      * 
@@ -432,7 +441,11 @@
                     }
                 }
             }
-
+            
+            if (getResourcetypeIds() != null) {
+                resources = filterResourceTypes(resources);
+            }
+            
             // now output all the tree nodes
             Iterator i = resources.iterator();
             while (i.hasNext()) {
@@ -449,7 +462,7 @@
                         grey = true;
                     }
                 }
-
+                
                 result.append(getNode(
                     resource.getRootPath(),
                     resource.getName(),
@@ -501,6 +514,10 @@
                 }
             }
 
+            if (getResourcetypeIds() != null) {
+                result.append("parent.setResourcetypeIds('").append(getResourcetypeIds()).append("');\n");
+            }
+
             result.append("}\n");
         } finally {
             if (storedSiteRoot != null) {
@@ -582,6 +599,7 @@
         boolean rootloaded = Boolean.valueOf(request.getParameter(PARAM_ROOTLOADED)).booleanValue();
         String resource = request.getParameter(PARAM_RESOURCE);
 
+        setResourcetypeIds(request.getParameter(PARAM_RESOURCETYPE_IDS));
         setTreeType(request.getParameter(PARAM_TYPE));
         String treeSite = request.getParameter(PARAM_TREESITE);
         if ((getTreeType() != null) && (treeSite != null)) {
@@ -824,7 +842,7 @@
      * @return error information output
      */
     private String printError(Throwable t) {
-
+        LOG.error(t.getMessage(), t);
         StringBuffer result = new StringBuffer(1024);
         result.append("/*\n");
         result.append(CmsStringUtil.escapeHtml(t.getMessage()));
@@ -893,4 +911,64 @@
 
         m_treeType = type;
     }
+
+    /**
+     * Sets the resource types to accept.<p>
+     * 
+     * @param resourcetypeIds the resource types to accept (delimited list)
+     */
+    public void setResourcetypeIds(String resourcetypeIds) {
+
+        m_resourcetypeIds = resourcetypeIds;
+    }
+
+    /**
+     * Returns the resource types to accept.<p>
+     * 
+     * @return resource types to accept
+     */
+    public String getResourcetypeIds() {
+
+        return m_resourcetypeIds;
+    }
+
+
+    /**
+     * Filters the restricted resources types.
+     * @param resources All Resources
+     * @return filtered resources.
+     */
+    private List<CmsResource> filterResourceTypes(List<CmsResource> resources) {
+        List<CmsResource> result = new ArrayList<CmsResource>();
+        
+        for (CmsResource cmsResource : resources) {
+            if (getResourcetypeIdsAsList().contains(Integer.valueOf(cmsResource.getTypeId()))) {
+                result.add(cmsResource);
+            }
+        }
+        
+        return result;
+    }
+
+    /**
+     * @return
+     */
+    private List<Integer> getResourcetypeIdsAsList() {
+
+        List<Integer> result = new ArrayList<Integer>();
+        //always show folder
+        result.add(Integer.valueOf(0));
+        
+        String[] splitedIdsAsString = CmsStringUtil.splitAsArray(m_resourcetypeIds, PARAM_RESOURCETYPE_IDS_DELIMITER);
+        for (int i = 0; i < splitedIdsAsString.length; i++) {
+            String idString = splitedIdsAsString[i];
+            try {
+                result.add(Integer.valueOf(idString.trim()));
+            } catch (NumberFormatException e) {
+                LOG.error("The resourcTypeIds '" + m_resourcetypeIds + "' contains invalid characters: " + e.getMessage());
+            }
+        }
+        
+        return result;
+    }
 }
\ No newline at end of file
Index: src/org/opencms/workplace/list/CmsListResourceTypeIconAction.java
===================================================================
RCS file: /usr/local/cvs/opencms/src/org/opencms/workplace/list/CmsListResourceTypeIconAction.java,v
retrieving revision 1.8
diff -u -r1.8 CmsListResourceTypeIconAction.java
--- src/org/opencms/workplace/list/CmsListResourceTypeIconAction.java	18 Jan 2010 10:02:15 -0000	1.8
+++ src/org/opencms/workplace/list/CmsListResourceTypeIconAction.java	24 Aug 2010 16:43:28 -0000
@@ -31,7 +31,9 @@
 
 package org.opencms.workplace.list;
 
+import org.apache.commons.logging.Log;
 import org.opencms.i18n.CmsMessageContainer;
+import org.opencms.main.CmsLog;
 import org.opencms.main.OpenCms;
 import org.opencms.util.CmsStringUtil;
 import org.opencms.workplace.CmsWorkplace;
@@ -49,6 +51,9 @@
  */
 public class CmsListResourceTypeIconAction extends CmsListExplorerDirectAction {
 
+    /** The log object for this class. */
+    private static final Log LOG = CmsLog.getLog(CmsListResourceTypeIconAction.class);
+    
     /**
      * Default Constructor.<p>
      * 
@@ -148,7 +153,7 @@
         html.append(name);
         html.append("'");
         html.append(" style='display: block; width: 20px; height: 20px;'>");
-        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(iconPath)) {
+        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(iconPath) && hasFileExtension(iconPath)) {
             html.append("<img src='");
             html.append(CmsWorkplace.getSkinUri());
             if (!enabled) {
@@ -195,4 +200,12 @@
         }
         return html.toString();
     }
+
+    private boolean hasFileExtension(String iconPath) {
+        boolean hasFileExtension = iconPath.indexOf('.') != -1;
+        if (!hasFileExtension) {
+            LOG.warn("The filename seems invalid: '" + iconPath + "' (no File-Extension).");
+        }
+        return hasFileExtension;
+    }
 }
Index: src/org/opencms/xml/CmsXmlComplexTypeSequence.java
===================================================================
RCS file: /usr/local/cvs/opencms/src/org/opencms/xml/CmsXmlComplexTypeSequence.java,v
retrieving revision 1.8
diff -u -r1.8 CmsXmlComplexTypeSequence.java
--- src/org/opencms/xml/CmsXmlComplexTypeSequence.java	18 Jan 2010 10:04:10 -0000	1.8
+++ src/org/opencms/xml/CmsXmlComplexTypeSequence.java	24 Aug 2010 16:43:28 -0000
@@ -55,18 +55,23 @@
     /** The type sequence elements. */
     private List<I_CmsXmlSchemaType> m_sequence;
 
+    /** Returns true if this sequence is created from a {@link CmsXmlContentDefinition#XSD_NODE_CHOICE}-Element. */
+    protected boolean m_isChoiceSequence;
+
     /**
      * Creates a new complex type sequence data structure.<p>
      * 
      * @param name the name of the sequence
      * @param sequence the type sequence element list
      * @param hasLanguageAttribute indicates if a "language" attribute is present
+     * @param isChoiceSequence the type choice element list
      */
-    protected CmsXmlComplexTypeSequence(String name, List<I_CmsXmlSchemaType> sequence, boolean hasLanguageAttribute) {
+    protected CmsXmlComplexTypeSequence(String name, List sequence, boolean hasLanguageAttribute, boolean isChoiceSequence) {
 
         m_name = name;
         m_sequence = sequence;
         m_hasLanguageAttribute = hasLanguageAttribute;
+        m_isChoiceSequence = isChoiceSequence;
     }
 
     /**
Index: src/org/opencms/xml/CmsXmlContentDefinition.java
===================================================================
RCS file: /usr/local/cvs/opencms/src/org/opencms/xml/CmsXmlContentDefinition.java,v
retrieving revision 1.47
diff -u -r1.47 CmsXmlContentDefinition.java
--- src/org/opencms/xml/CmsXmlContentDefinition.java	18 Jan 2010 10:04:12 -0000	1.47
+++ src/org/opencms/xml/CmsXmlContentDefinition.java	24 Aug 2010 16:43:28 -0000
@@ -146,6 +146,9 @@
     /** Constant for the "sequence" node in the XML schema namespace. */
     public static final QName XSD_NODE_SEQUENCE = QName.get("sequence", XSD_NAMESPACE);
 
+    /** Constant for the "choice" node in the XML schema namespace. */
+    public static final QName XSD_NODE_CHOICE = QName.get("choice", XSD_NAMESPACE);
+    
     /** The XML content handler. */
     private I_CmsXmlContentHandler m_contentHandler;
 
@@ -158,6 +161,9 @@
     /** The outer element name of the content definition (language sequence). */
     private String m_outerName;
 
+    /** Returns true if this sequence is created from a {@link #XSD_NODE_CHOICE}-Element. */
+    private boolean m_isChoiceSequence;
+
     /** The location from which the XML schema was read (XML system id). */
     private String m_schemaLocation;
 
@@ -523,15 +529,21 @@
             // no error: then the language attribute is valid
             hasLanguageAttribute = true;
         }
-
+        
+        boolean isChoice = false;
+        
         // check the main element type sequence
         Element typeSequence = mainElements.get(0);
         if (!XSD_NODE_SEQUENCE.equals(typeSequence.getQName())) {
+            if (!XSD_NODE_CHOICE.equals(typeSequence.getQName())) {
             throw new CmsXmlException(Messages.get().container(
                 Messages.ERR_CD_ELEMENT_NAME_3,
                 typeSequence.getUniquePath(),
                 XSD_NODE_SEQUENCE.getQualifiedName(),
                 typeSequence.getQName().getQualifiedName()));
+            } else {
+                isChoice = true;
+            }
         }
 
         // check the type definition sequence
@@ -553,7 +565,7 @@
             CmsXmlContentTypeManager typeManager = OpenCms.getXmlContentTypeManager();
             Iterator<Element> i = typeSequenceElements.iterator();
             while (i.hasNext()) {
-                sequence.add(typeManager.getContentType(i.next(), includes));
+                sequence.add(typeManager.getContentType((Element)i.next(), includes, isChoice));
             }
         } else {
             // generate a nested content definition for the main type sequence
@@ -569,7 +581,7 @@
         }
 
         // return a data structure with the collected values
-        return new CmsXmlComplexTypeSequence(name, sequence, hasLanguageAttribute);
+        return new CmsXmlComplexTypeSequence(name, sequence, hasLanguageAttribute, isChoice);
     }
 
     /**
@@ -704,8 +716,8 @@
         result.setInnerName(outer.getName());
 
         // get the inner element sequence, this must be the second element 
-        CmsXmlComplexTypeSequence innerSequence = complexTypeData.get(1);
-
+        CmsXmlComplexTypeSequence innerSequence = (CmsXmlComplexTypeSequence)complexTypeData.get(1);
+        result.m_isChoiceSequence =innerSequence.m_isChoiceSequence;
         // add the types from the main sequence node
         Iterator<I_CmsXmlSchemaType> it = innerSequence.getSequence().iterator();
         while (it.hasNext()) {
@@ -852,6 +864,7 @@
         result.m_contentHandler = m_contentHandler;
         result.m_typeName = m_typeName;
         result.m_includes = m_includes;
+        result.m_isChoiceSequence = m_isChoiceSequence;
         return result;
     }
 
@@ -1174,4 +1187,16 @@
 
         m_outerName = outerName;
     }
+    
+
+    /**
+     * Returns <code>true</code> if this sequence is created from a {@link #XSD_NODE_CHOICE}-Element. 
+     * 
+     * @return <code>true</code> if this sequence is created from a {@link #XSD_NODE_CHOICE}-Element. 
+     * 
+     * @see CmsXmlNestedContentDefinition
+     */
+    public boolean isChoiceType() {
+        return m_isChoiceSequence;
+    }
 }
\ No newline at end of file
Index: src/org/opencms/xml/CmsXmlContentTypeManager.java
===================================================================
RCS file: /usr/local/cvs/opencms/src/org/opencms/xml/CmsXmlContentTypeManager.java,v
retrieving revision 1.40
diff -u -r1.40 CmsXmlContentTypeManager.java
--- src/org/opencms/xml/CmsXmlContentTypeManager.java	17 Jun 2010 13:06:37 -0000	1.40
+++ src/org/opencms/xml/CmsXmlContentTypeManager.java	24 Aug 2010 16:43:28 -0000
@@ -327,15 +327,19 @@
      * Generates an initialized instance of a XML content type definition
      * from the given XML schema element.<p>
      * 
-     * @param typeElement the element to generate the XML content type definition from
-     * @param nestedDefinitions the nested (included) XML content sub-definitions
+     * @param typeElement
+     *          The element to generate the XML content type definition from
+     * @param nestedDefinitions
+     *          The nested (included) XML content sub-definitions
+     * @param isChoice
+     *          true if this node is an element of a Choice XSD element.
+     *          In this case the maxOccurs is always handled as "1" and minOccurs is always handled as "0".
      * 
      * @return an initialized instance of a XML content type definition
      * @throws CmsXmlException in case the element does not describe a valid XML content type definition
      */
-    public I_CmsXmlSchemaType getContentType(Element typeElement, Set<CmsXmlContentDefinition> nestedDefinitions)
+    public I_CmsXmlSchemaType getContentType(Element typeElement, Set nestedDefinitions, boolean isChoice)
     throws CmsXmlException {
-
         if (!CmsXmlContentDefinition.XSD_NODE_ELEMENT.equals(typeElement.getQName())) {
             throw new CmsXmlException(Messages.get().container(Messages.ERR_INVALID_CD_SCHEMA_STRUCTURE_0));
         }
@@ -348,7 +352,12 @@
         String defaultValue = typeElement.attributeValue(CmsXmlContentDefinition.XSD_ATTRIBUTE_DEFAULT);
         String maxOccrs = typeElement.attributeValue(CmsXmlContentDefinition.XSD_ATTRIBUTE_MAX_OCCURS);
         String minOccrs = typeElement.attributeValue(CmsXmlContentDefinition.XSD_ATTRIBUTE_MIN_OCCURS);
-
+        // a schemyType inside a Choice-ContentDefinition can only occurred one time.
+        if (isChoice) {
+            minOccrs = CmsXmlContentDefinition.XSD_ATTRIBUTE_VALUE_ZERO;
+            maxOccrs = "1";
+        }
+        
         if (CmsStringUtil.isEmpty(elementName) || CmsStringUtil.isEmpty(typeName)) {
             throw new CmsXmlException(Messages.get().container(Messages.ERR_INVALID_CD_SCHEMA_STRUCTURE_0));
         }
@@ -365,7 +374,14 @@
                 if (typeName.equals(cd.getTypeName())) {
 
                     simpleType = false;
-                    return new CmsXmlNestedContentDefinition(cd, elementName, minOccrs, maxOccrs);
+                    if (cd.isChoiceType()) {
+                        // A Choice Element itself is always optional.
+                        // the initial XML content (create new resource) can not be automatically generated if minOccurs > 0
+                        // the editor must choose the sub element!
+                        return new CmsXmlNestedContentDefinition(cd, elementName, CmsXmlContentDefinition.XSD_ATTRIBUTE_VALUE_ZERO, maxOccrs);
+                    } else {
+                        return new CmsXmlNestedContentDefinition(cd, elementName, minOccrs, maxOccrs);
+                    }
                 }
             }
 
Index: src/org/opencms/xml/CmsXmlEntityResolver.java
===================================================================
RCS file: /usr/local/cvs/opencms/src/org/opencms/xml/CmsXmlEntityResolver.java,v
retrieving revision 1.35
diff -u -r1.35 CmsXmlEntityResolver.java
--- src/org/opencms/xml/CmsXmlEntityResolver.java	18 Jan 2010 10:04:11 -0000	1.35
+++ src/org/opencms/xml/CmsXmlEntityResolver.java	24 Aug 2010 16:43:28 -0000
@@ -32,15 +32,18 @@
 package org.opencms.xml;
 
 import org.opencms.configuration.CmsConfigurationManager;
+import org.opencms.db.CmsPublishedResource;
 import org.opencms.file.CmsFile;
 import org.opencms.file.CmsObject;
 import org.opencms.file.CmsResource;
 import org.opencms.file.CmsResourceFilter;
 import org.opencms.main.CmsEvent;
+import org.opencms.main.CmsException;
 import org.opencms.main.CmsLog;
 import org.opencms.main.I_CmsEventListener;
 import org.opencms.main.OpenCms;
 import org.opencms.util.CmsFileUtil;
+import org.opencms.util.CmsUUID;
 import org.opencms.xml.page.CmsXmlPage;
 
 import java.io.ByteArrayInputStream;
@@ -159,13 +162,13 @@
     private static void initCaches() {
 
         if (m_cacheTemporary == null) {
-            Map<String, byte[]> cacheTemporary = new LRUMap(128);
+            Map<String, byte[]> cacheTemporary = new LRUMap(1024);
             m_cacheTemporary = Collections.synchronizedMap(cacheTemporary);
 
             Map<String, byte[]> cachePermanent = new HashMap<String, byte[]>(32);
             m_cachePermanent = Collections.synchronizedMap(cachePermanent);
 
-            Map<String, CmsXmlContentDefinition> cacheContentDefinitions = new LRUMap(64);
+            Map<String, CmsXmlContentDefinition> cacheContentDefinitions = new LRUMap(512);
             m_cacheContentDefinitions = Collections.synchronizedMap(cacheContentDefinitions);
         }
         if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_1_CORE_OBJECT) {
@@ -223,6 +226,18 @@
         CmsResource resource;
         switch (event.getType()) {
             case I_CmsEventListener.EVENT_PUBLISH_PROJECT:
+                // only flush cache if a Schema definition where published.
+                CmsUUID publishHistoryId = new CmsUUID(
+                    (String) event.getData().get(I_CmsEventListener.KEY_PUBLISHID));
+
+                if (isSchemaDefinitionInPublishList(publishHistoryId)) {
+                    m_cacheTemporary.clear();
+                    m_cacheContentDefinitions.clear();
+                    if (LOG.isDebugEnabled()) {
+                        LOG.debug(Messages.get().getBundle().key(Messages.LOG_ER_FLUSHED_CACHES_0));
+                    }
+                }
+                break;
             case I_CmsEventListener.EVENT_CLEAR_CACHES:
                 // flush cache   
                 m_cacheTemporary.clear();
@@ -248,6 +263,25 @@
         }
     }
 
+    private boolean isSchemaDefinitionInPublishList(CmsUUID publishHistoryId) {
+        try {
+            List<CmsPublishedResource> publishedResources = m_cms.readPublishedResources(publishHistoryId);
+            for (CmsPublishedResource cmsPublishedResource : publishedResources) {
+                String resourceRootPath = cmsPublishedResource.getRootPath();
+                String resourceRootPathLowerCase = resourceRootPath.toLowerCase();
+                if (resourceRootPathLowerCase.endsWith(".xsd")
+                    || resourceRootPathLowerCase.endsWith(".dtd")
+                    || m_cacheTemporary.containsKey(getCacheKey(resourceRootPath, true))) {
+                    return true;
+                }
+            }
+        } catch (CmsException e) {
+            // error reading published Resources.
+            LOG.warn(e.getMessage(), e);
+        }
+        return false;
+    }
+
     /**
      * Looks up the given XML content definition system id in the internal content definition cache.<p> 
      * 
Index: test/org/opencms/widgets/TestVfsFileWidgetConfiguration.java
===================================================================
RCS file: test/org/opencms/widgets/TestVfsFileWidgetConfiguration.java
diff -N test/org/opencms/widgets/TestVfsFileWidgetConfiguration.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ test/org/opencms/widgets/TestVfsFileWidgetConfiguration.java	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,134 @@
+/*
+ * File   : $Source$
+ * Date   : $Date$
+ * Version: $Revision$
+ *
+ * This library is part of OpenCms -
+ * the Open Source Content Management System
+ *
+ * Copyright (C) 2002 - 2008 Alkacon Software (http://www.alkacon.com)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * For further information about Alkacon Software, please see the
+ * company website: http://www.alkacon.com
+ *
+ * For further information about OpenCms, please see the
+ * project website: http://www.opencms.org
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+ 
+package org.opencms.widgets;
+
+import org.opencms.test.OpenCmsTestCase;
+import org.opencms.test.OpenCmsTestProperties;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ *  TestCase for {@link CmsVfsFileWidget}.
+ */
+public class TestVfsFileWidgetConfiguration extends OpenCmsTestCase {
+
+    /**
+     * Default JUnit constructor.<p>
+     * 
+     * @param arg0 JUnit parameters
+     */
+    public TestVfsFileWidgetConfiguration(String arg0) {
+
+        super(arg0);
+    }
+
+    /**
+     * Test suite for this test class.<p>
+     * 
+     * @return the test suite
+     */
+    public static Test suite() {
+
+        OpenCmsTestProperties.initialize(org.opencms.test.AllTests.TEST_PROPERTIES_PATH);
+
+        TestSuite suite = new TestSuite();
+        suite.setName(TestVfsFileWidgetConfiguration.class.getName());
+
+        suite.addTest(new TestVfsFileWidgetConfiguration("testConfigurationHappyPath"));
+        suite.addTest(new TestVfsFileWidgetConfiguration("testConfigurationWrongResourceTypeName"));
+        suite.addTest(new TestVfsFileWidgetConfiguration("testConfigurationWrongParameter"));
+        suite.addTest(new TestVfsFileWidgetConfiguration("testConfigurationNull"));
+
+        TestSetup wrapper = new TestSetup(suite) {
+
+            @Override
+            protected void setUp() {
+
+                setupOpenCms("simpletest", "/sites/default/");
+            }
+
+            @Override
+            protected void tearDown() {
+
+                removeOpenCms();
+            }
+        };
+
+        return wrapper;
+    }
+    
+    /**
+     * Test HappyPath.
+     */
+    public void testConfigurationHappyPath() {
+        CmsVfsFileWidget cmsVfsFileWidget = new CmsVfsFileWidget("hidesiteselector|excludefiles|notprojectaware|resourcetypeNames=jsp,image,xmlpage");
+
+        assertEquals("hidesiteselector|excludefiles|notprojectaware|resourcetypeNames=jsp,image,xmlpage", cmsVfsFileWidget.getConfiguration());
+        // The Ids should be: jsp=4, image=3, xmlpage=6
+        assertEquals("4,3,6", cmsVfsFileWidget.getRestrictResTypeIdsAsString(","));
+    }
+    
+    /**
+     * Test wrong ResourceTypeName.
+     */
+    public void testConfigurationWrongResourceTypeName() {
+        CmsVfsFileWidget cmsVfsFileWidget = new CmsVfsFileWidget("hidesiteselector|excludefiles|notprojectaware|resourcetypeNames=jsp,image,unbekannt");
+
+        assertEquals("hidesiteselector|excludefiles|notprojectaware|resourcetypeNames=jsp,image,unbekannt", cmsVfsFileWidget.getConfiguration());
+        // The Ids should be: jsp=4, image=3 ("unbekannt" is not found and not listed.)
+        assertEquals("4,3", cmsVfsFileWidget.getRestrictResTypeIdsAsString(","));
+    }
+    
+    /**
+     * Test wrong ResourceTypeName.
+     */
+    public void testConfigurationWrongParameter() {
+        CmsVfsFileWidget cmsVfsFileWidget = new CmsVfsFileWidget("hidesiteselector|excludefiles|notprojectaware|resourcetypeNames=jsp|unbekannt");
+
+        assertEquals("hidesiteselector|excludefiles|notprojectaware|resourcetypeNames=jsp", cmsVfsFileWidget.getConfiguration());
+        // The Id should be: jsp=4
+        assertEquals("4", cmsVfsFileWidget.getRestrictResTypeIdsAsString(","));
+    }
+    
+    /**
+     * Test <code>null</code> configuration.
+     */
+    public void testConfigurationNull() {
+        CmsVfsFileWidget cmsVfsFileWidget = new CmsVfsFileWidget(null);
+        
+        assertEquals("showsiteselector|includefiles|projectaware", cmsVfsFileWidget.getConfiguration());
+        // The Ids should be: jsp=4, image=3 ("unbekannt" is not found and not listed.)
+        assertEquals("", cmsVfsFileWidget.getRestrictResTypeIdsAsString(","));
+    }
+}
Index: test/org/opencms/workplace/explorer/TestCmsTree.java
===================================================================
RCS file: test/org/opencms/workplace/explorer/TestCmsTree.java
diff -N test/org/opencms/workplace/explorer/TestCmsTree.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ test/org/opencms/workplace/explorer/TestCmsTree.java	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,349 @@
+/*
+ * File   : $Source$
+ * Date   : $Date$
+ * Version: $Revision$
+ *
+ * This library is part of OpenCms -
+ * the Open Source Content Management System
+ *
+ * Copyright (C) 2002 - 2008 Alkacon Software (http://www.alkacon.com)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * For further information about Alkacon Software, please see the
+ * company website: http://www.alkacon.com
+ *
+ * For further information about OpenCms, please see the
+ * project website: http://www.opencms.org
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+ 
+package org.opencms.workplace.explorer;
+
+import org.opencms.file.CmsObject;
+import org.opencms.flex.CmsFlexController;
+import org.opencms.flex.CmsFlexDummyLoader;
+import org.opencms.flex.CmsFlexRequest;
+import org.opencms.flex.CmsFlexResponse;
+import org.opencms.flex.TestCmsFlexResponse.RecordingMock;
+import org.opencms.flex.TestCmsFlexResponse.RequestStub;
+import org.opencms.jsp.CmsJspActionElement;
+import org.opencms.main.CmsException;
+import org.opencms.main.CmsLog;
+import org.opencms.test.OpenCmsTestCase;
+import org.opencms.test.OpenCmsTestProperties;
+import org.opencms.util.CmsStringUtil;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Proxy;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.logging.Log;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * UnitTest for {@link CmsTree}.
+ */
+public class TestCmsTree extends OpenCmsTestCase {
+
+    /** The log object for this class. */
+    private static final Log LOG = CmsLog.getLog(TestCmsTree.class);
+    
+    /**
+     * Default JUnit constructor.<p>
+     * 
+     * @param arg0 JUnit parameters
+     */
+    public TestCmsTree(String arg0) {
+
+        super(arg0);
+    }
+
+    /**
+     * Test suite for this test class.<p>
+     * 
+     * @return the test suite
+     */
+    public static Test suite() {
+
+        OpenCmsTestProperties.initialize(org.opencms.test.AllTests.TEST_PROPERTIES_PATH);
+
+        TestSuite suite = new TestSuite();
+        suite.setName(TestCmsTree.class.getName());
+
+        suite.addTest(new TestCmsTree("testGetTreeHappyPath"));
+        suite.addTest(new TestCmsTree("testGetTreeHappyPath2"));
+        suite.addTest(new TestCmsTree("testGetTreeHappyPath3"));
+        suite.addTest(new TestCmsTree("testGetTreeHappyPath4"));
+
+        TestSetup wrapper = new TestSetup(suite) {
+
+            @Override
+            protected void setUp() {
+
+                setupOpenCms("simpletest", "/sites/default/");
+            }
+
+            @Override
+            protected void tearDown() {
+
+                removeOpenCms();
+            }
+        };
+
+        return wrapper;
+    }
+    
+    /**
+     * Test HappyPath.
+     * 
+     * @throws CmsException if an error occurs 
+     */
+    public void testGetTreeHappyPath() throws CmsException {
+        // prepare params
+        Map<String, String> parameter = new HashMap<String, String>();
+        parameter.put("resource", "/");
+        // The Ids should be: jsp=4, image=3, xmlpage=6
+        parameter.put("resourcetypeIds", "3,4,6");
+        parameter.put("includefiles", "true");
+        
+        // get Treelines
+        String[] treeLines = getTreeLines(parameter);
+
+        // validate Result
+        assertEquals(14, treeLines.length);
+        assertTrue(treeLines[7].startsWith("parent.aC(\"index.html\""));
+        assertEquals("parent.setResourcetypeIds('3,4,6');", treeLines[12]);
+        
+    }
+    
+    /**
+     * Test HappyPath2. getTree of subFolder.
+     * 
+     * @throws CmsException if an error occurs 
+     */
+    public void testGetTreeHappyPath2() throws CmsException {
+        // prepare params
+        Map<String, String> parameter = new HashMap<String, String>();
+        parameter.put("resource", "/folder1/");
+        // The Ids should be: jsp=4, image=3, xmlpage=6
+        parameter.put("resourcetypeIds", "3,4,6");
+        parameter.put("includefiles", "true");
+        
+        // get Treelines
+        String[] treeLines = getTreeLines(parameter);
+
+        // validate Result
+        assertEquals(16, treeLines.length);
+        assertTrue(treeLines[4].startsWith("parent.aC(\"image2.gif\""));
+        assertEquals("parent.setResourcetypeIds('3,4,6');", treeLines[14]);
+        
+    }
+    
+    /**
+     * Test HappyPath3. getTree of subFolder without xmlpages.
+     * 
+     * @throws CmsException if an error occurs 
+     */
+    public void testGetTreeHappyPath3() throws CmsException {
+        // prepare params
+        Map<String, String> parameter = new HashMap<String, String>();
+        parameter.put("resource", "/folder1/");
+        // The Ids should be: jsp=4, image=3, xmlpage=6
+        parameter.put("resourcetypeIds", "3,4");
+        parameter.put("includefiles", "true");
+        
+        // get Treelines
+        String[] treeLines = getTreeLines(parameter);
+
+        // validate Result
+        assertEquals(11, treeLines.length);
+        assertTrue(treeLines[4].startsWith("parent.aC(\"image2.gif\""));
+        assertEquals("parent.setResourcetypeIds('3,4');", treeLines[9]);
+        
+    }
+    
+    /**
+     * Test HappyPath4 getTree without resourcetypeIds.
+     * 
+     * @throws CmsException if an error occurs 
+     */
+    public void testGetTreeHappyPath4() throws CmsException {
+        // prepare params
+        Map<String, String> parameter = new HashMap<String, String>();
+        parameter.put("resource", "/");
+        parameter.put("includefiles", "true");
+        
+        // get Treelines
+        String[] treeLines = getTreeLines(parameter);
+
+        // validate Result
+        assertEquals(13, treeLines.length);
+        assertTrue(treeLines[7].startsWith("parent.aC(\"index.html\""));
+    }
+
+    private String[] getTreeLines(Map<String, String> parameter) throws CmsException {
+
+        CmsJspActionElement cms = createCmsJspActionElement("index.html", parameter);
+        CmsTree cmsTree = new CmsTree(cms);
+        LOG.info("allParamsAsRequest: " + cmsTree.allParamsAsRequest());
+        LOG.info("getResourcetypeIds: " + cmsTree.getResourcetypeIds());
+        LOG.info("initTree: " + cmsTree.initTree());
+        LOG.info("getTreeType: " + cmsTree.getTreeType());
+        LOG.info("getTree: " + cmsTree.getTree());
+        String[] treeLines = CmsStringUtil.splitAsArray(cmsTree.getTree(), "\n");
+        return treeLines;
+    }
+
+    private CmsJspActionElement createCmsJspActionElement(String xmlFilePath, Map<String, String> parameter)
+    throws CmsException {
+
+        HttpServletRequest request = createMockRequest(parameter);
+        
+        RecordingMock resMock = new RecordingMock();
+        HttpServletResponse response = createMockResponse(resMock);
+        
+        initCmsFlexController(getCmsObject(), xmlFilePath, request, response);
+        
+        CmsJspActionElement cms = new CmsJspActionElement(null, request, response);
+        return cms;
+    }
+
+    private void initCmsFlexController(CmsObject cms, String xmlFilePath, HttpServletRequest request,
+            HttpServletResponse response) throws CmsException {
+        CmsFlexController controller = new CmsFlexController(
+            cms,
+            cms.readFile(xmlFilePath),
+            CmsFlexDummyLoader.getFlexCache(),
+            request,
+            response,
+            false,
+            false);
+        CmsFlexRequest cmsFlexRequest = new CmsFlexRequest(request, controller);
+        CmsFlexResponse cmsFlexResponse = new CmsFlexResponse(response, controller, false, false);
+        
+        controller.push(cmsFlexRequest, cmsFlexResponse);
+        CmsFlexController.setController(request, controller);
+    }
+    
+    /** 
+     * Convenience method to create a mock {@link HttpServletRequest} backed by the given invocation handler.<p>
+     * 
+     * @param recorder the mock recorder
+     *  
+     * @return the new created request
+     */
+    private static HttpServletRequest createMockRequest(Map<String, String> parameter) {
+        
+        RecordingMock sessionMock = new RecordingMock(new RequestStub());
+        final HttpSession session = (HttpSession)createProxy(HttpSession.class, sessionMock);
+        
+        RecordingMock reqMock = new RecordingMock(new RequestExtendedStub(session, parameter));
+        
+        HttpServletRequest request = (HttpServletRequest)createProxy(HttpServletRequest.class, reqMock);
+
+        
+        return request;
+    }
+
+    /** 
+     * Convenience method to create a mock {@link HttpServletResponse} backed by the given invocation handler.<p>
+     * 
+     * @param recorder the mock recorder
+     *  
+     * @return the new created response
+     */
+    private static HttpServletResponse createMockResponse(RecordingMock recorder) {
+
+        return (HttpServletResponse)createProxy(HttpServletResponse.class, recorder);
+    }
+
+    private static Object createProxy(Class<?> interfaceClass, InvocationHandler handler) {
+
+        return Proxy.newProxyInstance(
+            Thread.currentThread().getContextClassLoader(),
+            new Class[] {interfaceClass},
+            handler);
+    }
+
+    /** 
+     * A partial implementation of {@link HttpServletRequest} which allows for the setting and getting of request attributes.<p>
+     */
+    public static class RequestExtendedStub extends RequestStub {
+        
+        private HttpSession m_session;
+        private Map<String, String> m_parameter;
+
+        /**
+         * Constructor to generate a RequestStub with Session-Stub and Parameters handling.
+         * 
+         * @param session
+         * @param parameter
+         */
+        public RequestExtendedStub(HttpSession session, Map<String, String> parameter) {
+
+            super();
+            this.m_session = session;
+            this.m_parameter = parameter;
+        }
+
+        public HttpSession getSession() {
+            return m_session;
+        }
+
+
+        /**
+         * @see javax.servlet.ServletRequest#getParameter(java.lang.String)
+         */
+        public String getParameter(String key) {
+            return m_parameter.get(key);
+        }
+
+        /**
+         * @see javax.servlet.ServletRequest#getParameterMap()
+         */
+        public Map getParameterMap() {
+            return m_parameter;
+        }
+
+        /**
+         * @see javax.servlet.ServletRequest#getParameterNames()
+         */
+        public Enumeration getParameterNames() {
+
+            return Collections.enumeration(m_parameter.keySet());
+        }
+
+        /**
+         * @see javax.servlet.ServletRequest#getParameterValues(java.lang.String)
+         */
+        public String[] getParameterValues(String key) {
+            if (getParameter(key) == null) {
+                return new String[0];
+            } else {
+                return new String[]{getParameter(key)};
+            }
+        }
+    }
+}
\ No newline at end of file
Index: test/test.properties
===================================================================
RCS file: /usr/local/cvs/opencms/test/test.properties,v
retrieving revision 1.35
diff -u -r1.35 test.properties
--- test/test.properties	26 Feb 2009 11:59:18 -0000	1.35
+++ test/test.properties	24 Aug 2010 16:43:28 -0000
@@ -27,5 +27,5 @@
 db.product=hsqldb
 
 # Set the path to the test resources files
-test.data.path=C:\dev\workspace\OpenCmsHead\test\data
-test.webapp.path=C:\dev\workspace\OpenCmsHead\webapp
+test.data.path=test\data
+test.webapp.path=webapp
Index: webapp/WEB-INF/cmsshell.bat
===================================================================
RCS file: /usr/local/cvs/opencms/webapp/WEB-INF/cmsshell.bat,v
retrieving revision 1.15
diff -u -r1.15 cmsshell.bat
--- webapp/WEB-INF/cmsshell.bat	29 Oct 2008 12:46:48 -0000	1.15
+++ webapp/WEB-INF/cmsshell.bat	24 Aug 2010 16:43:28 -0000
@@ -66,23 +66,15 @@
 :okTomcatHome
 
 rem Guess OPENCMS_LIB if not defined
-if not "%OPENCMS_LIB%" == "" goto gotLib
+if not "%OPENCMS_LIB%" == "" goto gotHome
 set OPENCMS_LIB=%OPENCMS_HOME%\lib
 :gotHome
 if exist "%OPENCMS_LIB%\opencms.jar" goto okLib
+if exist "%OPENCMS_LIB%\opencms-core.jar" goto okLib
 echo The OPENCMS_LIB environment variable is not defined correctly
 echo This environment variable is needed to run this program
 goto end
 :okLib
-rem Add all jars in lib dir to OPENCMS_CP variable (will include a initial semicolon ";")
-for %%i in ("%OPENCMS_LIB%\*.jar") do call "%OPENCMS_HOME%\cpappend.bat" %%i
-
-rem Check for Tomcat libs
-rem Add all jars in TOMCAT_HOME\common\lib dir to TOMCAT_LIB variable (will include a initial semicolon ";")
-for %%i in ("%TOMCAT_HOME%\common\lib\*.jar") do call "%OPENCMS_HOME%\tlappend.bat" %%i
-rem also support different tomcat folder structure
-for %%i in ("%TOMCAT_HOME%\lib\*.jar") do call "%OPENCMS_HOME%\tlappend.bat" %%i
-:okLib
 
 rem ----- Execute The Requested Command ---------------------------------------
 echo Using JAVA_HOME:       %JAVA_HOME%
@@ -95,18 +87,13 @@
 
 rem Get command line arguments and save them in 
 rem the CMD_LINE_ARGS environment variable
-set CMD_LINE_ARGS=
-:setArgs
-if ""%1""=="""" goto doneSetArgs
-set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
-shift
-goto setArgs
-:doneSetArgs
+set CMD_LINE_ARGS=%*
 
 @rem set opencms arguments
 set CMD_LINE_ARGS=%CMD_LINE_ARGS% -base="%CD%"
+echo %CMD_LINE_ARGS%
 
 rem execute OPENCMS
-%_RUNJAVA% %JAVA_OPTS% -classpath "%OPENCMS_HOME%\classes%CLASSPATH%%OPENCMS_CP%%TOMCAT_LIB%" %MAINCLASS% %CMD_LINE_ARGS%
+%_RUNJAVA% %JAVA_OPTS% -Djava.ext.dirs=%OPENCMS_LIB%;%TOMCAT_HOME%\common\lib;%TOMCAT_HOME%\lib -classpath "%OPENCMS_HOME%\classes%CLASSPATH%" %MAINCLASS% %CMD_LINE_ARGS%
 
 :end
\ No newline at end of file
Index: webapp/WEB-INF/cmsshell.sh
===================================================================
RCS file: /usr/local/cvs/opencms/webapp/WEB-INF/cmsshell.sh,v
retrieving revision 1.9
diff -u -r1.9 cmsshell.sh
--- webapp/WEB-INF/cmsshell.sh	7 Dec 2009 17:30:44 -0000	1.9
+++ webapp/WEB-INF/cmsshell.sh	24 Aug 2010 16:43:28 -0000
@@ -9,7 +9,7 @@
 OPENCMS_BASE=`dirs +0`
 popd > /dev/null
 
-# get path to tomcat home 
+# get path to tomcat home
 if [ -z "$TOMCAT_HOME" ]; then
 	[ -n "$CATALINA_HOME" ] && TOMCAT_HOME="$CATALINA_HOME"
 	[ -z "$TOMCAT_HOME" ] && TOMCAT_HOME="$OPENCMS_BASE"/../../..
Index: webapp/WEB-INF/cpappend.bat
===================================================================
RCS file: webapp/WEB-INF/cpappend.bat
diff -N webapp/WEB-INF/cpappend.bat
--- webapp/WEB-INF/cpappend.bat	12 Jan 2005 14:59:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-rem ---------------------------------------------------------------------------
-rem Append to OPENCMS_CP
-rem ---------------------------------------------------------------------------
-
-rem Process the first argument
-if ""%1"" == """" goto end
-set OPENCMS_CP=%OPENCMS_CP%;%1
-shift
-
-rem Process the remaining arguments
-:setArgs
-if ""%1"" == """" goto doneSetArgs
-set OPENCMS_CP=%OPENCMS_CP% %1
-shift
-goto setArgs
-:doneSetArgs
-:end
Index: webapp/WEB-INF/tlappend.bat
===================================================================
RCS file: webapp/WEB-INF/tlappend.bat
diff -N webapp/WEB-INF/tlappend.bat
--- webapp/WEB-INF/tlappend.bat	12 Jan 2005 14:59:30 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-rem ---------------------------------------------------------------------------
-rem Append to TOMCAT_LIB
-rem ---------------------------------------------------------------------------
-
-rem Process the first argument
-if ""%1"" == """" goto end
-set TOMCAT_LIB=%TOMCAT_LIB%;%1
-shift
-
-rem Process the remaining arguments
-:setArgs
-if ""%1"" == """" goto doneSetArgs
-set TOMCAT_LIB=%TOMCAT_LIB% %1
-shift
-goto setArgs
-:doneSetArgs
-:end
