You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by mi...@apache.org on 2005/04/05 18:35:03 UTC
svn commit: r160198 - in lenya/sandbox/jcrsitetree: ./ lib/core/
src/data/pubs/default/repos/repo-sitetree/
src/data/pubs/default/repos/repo-sitetree/repository/
src/data/pubs/default/repos/repo-sitetree/repository/nodetypes/
Author: michi
Date: Tue Apr 5 09:35:02 2005
New Revision: 160198
URL: http://svn.apache.org/viewcvs?view=rev&rev=160198
Log:
jaas based implementation added
Added:
lenya/sandbox/jcrsitetree/lib/core/jackrabbit-0.16.2-devLCR159689.jar (with props)
lenya/sandbox/jcrsitetree/src/data/pubs/default/repos/repo-sitetree/jaas.config
lenya/sandbox/jcrsitetree/src/data/pubs/default/repos/repo-sitetree/repository/
lenya/sandbox/jcrsitetree/src/data/pubs/default/repos/repo-sitetree/repository/nodetypes/
lenya/sandbox/jcrsitetree/src/data/pubs/default/repos/repo-sitetree/repository/nodetypes/custom_nodetypes.xml
Modified:
lenya/sandbox/jcrsitetree/README.txt
lenya/sandbox/jcrsitetree/build.properties
lenya/sandbox/jcrsitetree/build.xml
lenya/sandbox/jcrsitetree/src/data/pubs/default/repos/repo-sitetree/repository.xml
Modified: lenya/sandbox/jcrsitetree/README.txt
URL: http://svn.apache.org/viewcvs/lenya/sandbox/jcrsitetree/README.txt?view=diff&r1=160197&r2=160198
==============================================================================
--- lenya/sandbox/jcrsitetree/README.txt (original)
+++ lenya/sandbox/jcrsitetree/README.txt Tue Apr 5 09:35:02 2005
@@ -13,14 +13,18 @@
After that, follow these steps:
-JCRSiteTree: ant download-libraries
+[JCRSiteTree:] ant download-libraries
-LENYA: ant
+[LENYA:] ant
-JCRSiteTree: ant
+[JCRSiteTreei:] ant
-LENYA: ant
+[LENYA:] ant
+
+[JCRSiteTree:] ant import-sitetree
+
+Run a customized jetty version (JAAS enabled):
+
+[JCRSiteTree:] ant run-lenya
-JCRSiteTree: ant import-sitetree
-LENYA: ./lenya.sh servlet
Modified: lenya/sandbox/jcrsitetree/build.properties
URL: http://svn.apache.org/viewcvs/lenya/sandbox/jcrsitetree/build.properties?view=diff&r1=160197&r2=160198
==============================================================================
--- lenya/sandbox/jcrsitetree/build.properties (original)
+++ lenya/sandbox/jcrsitetree/build.properties Tue Apr 5 09:35:02 2005
@@ -2,3 +2,8 @@
# NOTE: This patch is only working for 1_2_X and not for the trunk!
lenya.source.dir=../../branches/BRANCH_1_2_X
+
+workspace.name=authoring
+#workspace.name=live
+#workspace.name=trash
+#workspace.name=archive
Modified: lenya/sandbox/jcrsitetree/build.xml
URL: http://svn.apache.org/viewcvs/lenya/sandbox/jcrsitetree/build.xml?view=diff&r1=160197&r2=160198
==============================================================================
--- lenya/sandbox/jcrsitetree/build.xml (original)
+++ lenya/sandbox/jcrsitetree/build.xml Tue Apr 5 09:35:02 2005
@@ -12,6 +12,23 @@
<property file="local.build.properties"/>
<property file="build.properties"/>
+ <property name="default.pub.dir" value="${lenya.source.dir}/build/lenya/webapp/lenya/pubs/default"/>
+ <property name="repo.dir" value="${default.pub.dir}/repos/repo-sitetree"/>
+
+ <property name="jaas.config" value="-Djava.security.auth.login.config==${repo.dir}/jaas.config"/>
+
+ <property environment="env"/>
+
+ <path id="classpath">
+ <fileset dir="${lenya.source.dir}/build/lenya/webapp/WEB-INF/lib">
+ <include name="*.jar"/>
+ </fileset>
+
+ <pathelement path="${lenya.source.dir}/build/lenya/webapp/WEB-INF/classes"/>
+ <pathelement path="${env.JAVA_HOME}/jre/lib/rt.jar"/>
+ <pathelement path="${lenya.source.dir}/tools/loader"/>
+ </path>
+
<echo>Apache Lenya source Dir: ${lenya.source.dir}</echo>
</target>
@@ -46,22 +63,19 @@
<fileset dir="lib/extra"/>
</copy>
+ <copy todir="${lenya.source.dir}/build/lenya/webapp/WEB-INF/lib" overwrite="true">
+ <fileset dir="lib/endorsed/">
+ <include name="xalan-*.jar"/>
+ <include name="serializer.jar"/>
+ </fileset>
+ </copy>
+
<copy todir="${lenya.source.dir}/build/lenya/webapp/lenya/pubs/default">
<fileset dir="src/data/pubs/default"/>
</copy>
</target>
<target name="import-sitetree" depends="init" description="Import Authoring and Live sitetree">
- <property name="default.pub.dir" value="${lenya.source.dir}/build/lenya/webapp/lenya/pubs/default"/>
- <property name="repo.dir" value="${default.pub.dir}/repos/repo-sitetree"/>
-
- <path id="classpath">
- <fileset dir="${lenya.source.dir}/build/lenya/webapp/WEB-INF/lib">
- <include name="*.jar"/>
- </fileset>
- <pathelement path="${lenya.source.dir}/build/lenya/webapp/WEB-INF/classes"/>
- </path>
-
<echo>Import Authoring and Live Sitetree from ${default.pub.dir} into ${repo.dir}</echo>
<xslt
@@ -88,9 +102,10 @@
<outputproperty name="indent" value="yes"/>
</xslt>
- <java classname="org.apache.lenya.cms.publication.ImportSiteTree">
+ <java classname="org.apache.lenya.cms.publication.ImportSiteTree" fork="true">
<arg value="${repo.dir}"/>
<arg value="${default.pub.dir}"/>
+ <jvmarg value="${jaas.config}"/>
<classpath refid="classpath"/>
</java>
@@ -98,21 +113,39 @@
<delete file="${default.pub.dir}/content/live/sitetree.xml.import"/>
</target>
- <target name="clear-repository" depends="init" description="Clear Authoring and Live workspace">
- <property name="default.pub.dir" value="${lenya.source.dir}/build/lenya/webapp/lenya/pubs/default"/>
- <property name="repo.dir" value="${default.pub.dir}/repos/repo-sitetree"/>
+ <target name="clear-repository" depends="init" description="Clear Repository Workspaces">
+ <echo>Clearing workspaces of repository at ${repo.dir}</echo>
- <path id="classpath">
- <fileset dir="${lenya.source.dir}/build/lenya/webapp/WEB-INF/lib">
- <include name="*.jar"/>
- </fileset>
- <pathelement path="${lenya.source.dir}/build/lenya/webapp/WEB-INF/classes"/>
- </path>
+ <java classname="org.apache.lenya.cms.publication.ClearRepository" fork="true">
+ <arg value="${repo.dir}"/>
+ <jvmarg value="${jaas.config}"/>
+ <classpath refid="classpath"/>
+ </java>
+ </target>
- <echo>Clearing Authoring and Live workspaces from ${repo.dir}</echo>
+ <target name="view-workspace" depends="init" description="View Workspace">
+ <echo>Dumping workspace for repository at ${repo.dir}</echo>
- <java classname="org.apache.lenya.cms.publication.ClearRepository">
+ <java classname="org.apache.lenya.cms.publication.ViewRepository" fork="true">
<arg value="${repo.dir}"/>
+ <arg value="${workspace.name}"/>
+ <jvmarg value="${jaas.config}"/>
+ <classpath refid="classpath"/>
+ </java>
+ </target>
+
+ <target name="run-lenya" depends="init" description="Run Jetty">
+ <echo>Starting Jetty</echo>
+ <java classname="Loader" fork="true">
+ <arg value="${lenya.source.dir}/tools/jetty/conf/main.xml"/>
+ <jvmarg value="${jaas.config}"/>
+ <jvmarg value="-Djava.endorsed.dirs=${lenya.source.dir}/lib/endorsed"/>
+ <jvmarg value="-Djetty.port=8888"/>
+ <jvmarg value="-Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser"/>
+ <jvmarg value="-Dloader.jar.repositories=${lenya.source.dir}/tools/jetty/lib:${lenya.source.dir}/lib/endorsed"/>
+ <jvmarg value="-Dwebapp=${lenya.source.dir}/build/lenya/webapp"/>
+ <jvmarg value="-Dhome=${lenya.source.dir}"/>
+ <jvmarg value="-Dloader.main.class=org.mortbay.jetty.Server"/>
<classpath refid="classpath"/>
</java>
</target>
Added: lenya/sandbox/jcrsitetree/lib/core/jackrabbit-0.16.2-devLCR159689.jar
URL: http://svn.apache.org/viewcvs/lenya/sandbox/jcrsitetree/lib/core/jackrabbit-0.16.2-devLCR159689.jar?view=auto&rev=160198
==============================================================================
Binary file - no diff available.
Propchange: lenya/sandbox/jcrsitetree/lib/core/jackrabbit-0.16.2-devLCR159689.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: lenya/sandbox/jcrsitetree/src/data/pubs/default/repos/repo-sitetree/jaas.config
URL: http://svn.apache.org/viewcvs/lenya/sandbox/jcrsitetree/src/data/pubs/default/repos/repo-sitetree/jaas.config?view=auto&rev=160198
==============================================================================
--- lenya/sandbox/jcrsitetree/src/data/pubs/default/repos/repo-sitetree/jaas.config (added)
+++ lenya/sandbox/jcrsitetree/src/data/pubs/default/repos/repo-sitetree/jaas.config Tue Apr 5 09:35:02 2005
@@ -0,0 +1,3 @@
+Jackrabbit {
+ org.apache.jackrabbit.core.security.SimpleLoginModule required anonymousId="anonymous";
+};
\ No newline at end of file
Modified: lenya/sandbox/jcrsitetree/src/data/pubs/default/repos/repo-sitetree/repository.xml
URL: http://svn.apache.org/viewcvs/lenya/sandbox/jcrsitetree/src/data/pubs/default/repos/repo-sitetree/repository.xml?view=diff&r1=160197&r2=160198
==============================================================================
--- lenya/sandbox/jcrsitetree/src/data/pubs/default/repos/repo-sitetree/repository.xml (original)
+++ lenya/sandbox/jcrsitetree/src/data/pubs/default/repos/repo-sitetree/repository.xml Tue Apr 5 09:35:02 2005
@@ -14,6 +14,9 @@
used by the repository to persist global state such as
registered namespaces, custom node types, etc..
+ a Security element that specifies the name of the app-entry
+ in the JAAS config and the access manager
+
a Workspaces element that specifies to the location of
workspaces root directory and the name of default workspace
@@ -38,6 +41,24 @@
class CDATA #REQUIRED>
<!--
+ the Security element specifies the name (appName attribute)
+ of the JAAS configuration app-entry for this repository.
+ it also specifies the access manager to be used (AccessManager element).
+ -->
+ <!ELEMENT Security (AccessManager)>
+ <!ATTLIST Security
+ appName CDATA #REQUIRED>
+
+ <!--
+ the AccessManager element configures the access manager to be used by
+ this repository instance; the class attribute specifies the FQN of the
+ class implementing the AccessManager interface
+ -->
+ <!ELEMENT AccessManager (param*)>
+ <!ATTLIST AccessManager
+ class CDATA #REQUIRED>
+
+ <!--
generic parameter (name/value pair)
-->
<!ELEMENT param EMPTY>
@@ -102,6 +123,19 @@
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${rep.home}/repository"/>
</FileSystem>
+ <!--
+ security configuration
+ -->
+ <Security appName="Jackrabbit">
+ <!--
+ access manager:
+ class: FQN of class implementing the AccessManager interface
+ -->
+ <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager">
+ <!-- <param name="config" value="${rep.home}/access.xml"/> -->
+ </AccessManager>
+ </Security>
+
<!--
location of workspaces root directory and name of default workspace
-->
Added: lenya/sandbox/jcrsitetree/src/data/pubs/default/repos/repo-sitetree/repository/nodetypes/custom_nodetypes.xml
URL: http://svn.apache.org/viewcvs/lenya/sandbox/jcrsitetree/src/data/pubs/default/repos/repo-sitetree/repository/nodetypes/custom_nodetypes.xml?view=auto&rev=160198
==============================================================================
--- lenya/sandbox/jcrsitetree/src/data/pubs/default/repos/repo-sitetree/repository/nodetypes/custom_nodetypes.xml (added)
+++ lenya/sandbox/jcrsitetree/src/data/pubs/default/repos/repo-sitetree/repository/nodetypes/custom_nodetypes.xml Tue Apr 5 09:35:02 2005
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ * as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ -->
+<nodeTypes xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:lust="http://apache.org/cocoon/lenya/sitetree/1.0" xmlns:lst="http://apache.org/cocoon/lenya/sitetree/system/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:xml="http://www.w3.org/XML/1998/namespace">
+
+ <nodeType name="jcr:content" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>nt:unstructured</supertype>
+ <supertype>mix:referenceable</supertype>
+ </supertypes>
+ </nodeType>
+
+ <nodeType name="lst:document" isMixin="false" hasOrderableChildNodes="false" primaryItemName="jcr:content">
+ <supertypes>
+ <supertype>nt:file</supertype>
+ <supertype>mix:versionable</supertype>
+ </supertypes>
+ <propertyDef name="xml:lang" requiredType="String" autoCreate="false" mandatory="true" onParentVersion="COPY" protected="false"/>
+ <propertyDef name="lst:label" requiredType="String" autoCreate="false" mandatory="true" onParentVersion="COPY" protected="false"/>
+ </nodeType>
+
+ <nodeType name="lst:node" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
+ <supertypes>
+ <supertype>nt:hierarchyNode</supertype>
+ <supertype>mix:referenceable</supertype>
+ </supertypes>
+ <propertyDef name="*" requiredType="String" autoCreate="false" mandatory="false" onParentVersion="ABORT" protected="false" multiple="false"/>
+ <propertyDef name="lst:visibleinnav" requiredType="Boolean" autoCreate="false" mandatory="true" onParentVersion="ABORT" protected="false" multiple="false"/>
+ <propertyDef name="lst:href" requiredType="String" autoCreate="false" mandatory="false" onParentVersion="ABORT" protected="false" multiple="false"/>
+ <propertyDef name="lst:suffix" requiredType="String" autoCreate="false" mandatory="false" onParentVersion="ABORT" protected="false" multiple="false"/>
+ <propertyDef name="lst:link" requiredType="Boolean" autoCreate="false" mandatory="false" onParentVersion="ABORT" protected="false" multiple="false"/>
+ <childNodeDef name="lst:document" defaultPrimaryType="lst:document" autoCreate="false" mandatory="true" onParentVersion="ABORT" protected="false" sameNameSibs="true">
+ <requiredPrimaryTypes>
+ <requiredPrimaryType>lst:document</requiredPrimaryType>
+ </requiredPrimaryTypes>
+ </childNodeDef>
+ <childNodeDef name="*" defaultPrimaryType="lst:node" autoCreate="false" mandatory="false" onParentVersion="ABORT" protected="false" sameNameSibs="false">
+ <requiredPrimaryTypes>
+ <requiredPrimaryType>lst:node</requiredPrimaryType>
+ </requiredPrimaryTypes>
+ </childNodeDef>
+ </nodeType>
+
+ <nodeType name="lst:site" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
+ <supertypes>
+ <supertype>nt:hierarchyNode</supertype>
+ <supertype>mix:referenceable</supertype>
+ </supertypes>
+ <propertyDef name="lst:label" requiredType="String" autoCreate="false" mandatory="true" onParentVersion="ABORT" protected="false"/>
+ <childNodeDef name="*" defaultPrimaryType="lst:node" autoCreate="false" mandatory="false" onParentVersion="ABORT" protected="false" sameNameSibs="false">
+ <requiredPrimaryTypes>
+ <requiredPrimaryType>lst:node</requiredPrimaryType>
+ </requiredPrimaryTypes>
+ </childNodeDef>
+ </nodeType>
+</nodeTypes>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org