Skip to content

Commit

Permalink
MODE-637 - creation of the JBoss svn project that will contain JBoss …
Browse files Browse the repository at this point in the history
…deployment dependencies, including building the JOPR plugin, WAR and REST artifacts.

git-svn-id: https://svn.jboss.org/repos/modeshape/trunk@1934 76366958-4244-0410-ad5e-bbfabb93f86b
  • Loading branch information
vhalbert committed Jul 1, 2010
1 parent 90dba2b commit 65c2391
Show file tree
Hide file tree
Showing 4 changed files with 173 additions and 0 deletions.
47 changes: 47 additions & 0 deletions deploy/jboss/web-rest-war/src/main/resources/configRepository.xml
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ ModeShape (http://www.modeshape.org)
~
~ See the COPYRIGHT.txt file distributed with this work for information
~ regarding copyright ownership. Some portions may be licensed
~ to Red Hat, Inc. under one or more contributor license agreements.
~ See the AUTHORS.txt file in the distribution for a full listing of
~ individual contributors.
~
~ ModeShape is free software. Unless otherwise indicated, all code in ModeShape
~ is licensed to you 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.
~
~ ModeShape 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.
~
~ You should have received a copy of the GNU Lesser General Public License
~ along with this distribution; if not, write to:
~ Free Software Foundation, Inc.
~ 51 Franklin Street, Fifth Floor
~ Boston, MA 02110-1301 USA
-->
<configuration xmlns="http://www.modeshape.org/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0">
<!-- Define the sources from which content is made available -->
<sources jcr:primaryType="nt:unstructured">
<source jcr:name="repositorySource" classname="org.modeshape.graph.connector.inmemory.InMemoryRepositorySource" retryLimit="3" defaultWorkspaceName="default"/>
</sources>
<!-- Define the JCR repositories -->
<repositories>
<!-- Specify the source that should be used for the repository -->
<repository jcr:name="repository" sourceName="repositorySource">
<source>repositorySource</source>
<!-- Define the options for the JCR repository, using camelcase version of JcrRepository.Option names-->
<options jcr:primaryType="options">
<projectNodeTypes jcr:primaryType="option" value="false"/>
</options>
<!-- Define any custom node types. Importing CND files via JcrConfiguration is equivalent to specifying here.-->
<nodeTypes jcr:primaryType="nodeTypes"/>
<!-- Define any namespaces for this repository, other than those already defined by JCR or ModeShape-->
<namespaces jcr:primaryType="namespaces" />
</repository>
</repositories>
</configuration>
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Class-Path:

@@ -0,0 +1,7 @@
<!DOCTYPE jboss-web PUBLIC
"-//JBoss//DTD Web Application 5.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">

<jboss-web>
<security-domain>java:/jaas/modeshape</security-domain>
</jboss-web>
116 changes: 116 additions & 0 deletions deploy/jboss/web-rest-war/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,116 @@
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<!--
ModeShape (http://www.modeshape.org) See the COPYRIGHT.txt file
distributed with this work for information regarding copyright
ownership. Some portions may be licensed to Red Hat, Inc. under one or
more contributor license agreements. See the AUTHORS.txt file in the
distribution for a full listing of individual contributors. ModeShape
is free software. Unless otherwise indicated, all code in ModeShape is
licensed to you 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. ModeShape
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. You should have received a copy of the GNU
Lesser General Public License along with this software; if not, write
to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Boston, MA 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<web-app>
<display-name>ModeShape JCR RESTful Interface</display-name>

<!--
This parameter provides the fully-qualified name of a class that implements
the o.m.w.jcr.spi.RepositoryProvider interface. It is required
by the ModeShapeJcrDeployer that controls the lifecycle for the ModeShape REST server.
-->
<context-param>
<param-name>org.modeshape.web.jcr.REPOSITORY_PROVIDER</param-name>
<param-value>org.modeshape.web.jcr.spi.ModeShapeJcrRepositoryProvider</param-value>
</context-param>

<!--
This parameter, specific to the ModeShapeJcrRepositoryProvider implementation, specifies
the name of the configuration file to initialize the repository or repositories.
This configuration file must be on the classpath and is given as a classpath-relative
directory.
-->
<context-param>
<param-name>org.modeshape.web.jcr.CONFIG_FILE</param-name>
<param-value>/configRepository.xml</param-value>
</context-param>

<!--
This parameter defines the JAX-RS application class, which is really just a metadata class
that lets the JAX-RS engine (RESTEasy in this case) know which classes implement pieces
of the JAX-RS specification like exception handling and resource serving.
This should not be modified.
-->
<context-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>org.modeshape.web.jcr.rest.JcrApplication</param-value>
</context-param>

<!-- Required parameter for RESTEasy - should not be modified -->
<listener>
<listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
</listener>

<!-- Required parameter for ModeShape REST - should not be modified -->
<listener>
<listener-class>org.modeshape.web.jcr.ModeShapeJcrDeployer</listener-class>
</listener>

<!-- Required parameter for RESTEasy - should not be modified -->
<servlet>
<servlet-name>Resteasy</servlet-name>
<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
</servlet>

<!-- Required parameter for ModeShape REST - should not be modified -->
<servlet-mapping>
<servlet-name>Resteasy</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>

<!--
The ModeShape REST implementation leverages the HTTP credentials to for authentication and authorization
within the JCR repository. It makes no sense to try to log into the JCR repository without credentials,
so this constraint helps lock down the repository.
This should generally not be modified.
-->
<security-constraint>
<display-name>ModeShape REST</display-name>
<web-resource-collection>
<web-resource-name>RestEasy</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<!--
A user must be assigned this role to connect to any JCR repository, in addition to needing the READONLY
or READWRITE roles to actually read or modify the data. This is not used internally, so another
role could be substituted here.
-->
<role-name>connect</role-name>
</auth-constraint>
</security-constraint>

<!--
Any auth-method will work for ModeShape. BASIC is used this example for simplicity.
-->
<login-config>
<auth-method>BASIC</auth-method>
</login-config>

<!--
This must match the role-name in the auth-constraint above.
-->
<security-role>
<role-name>connect</role-name>
</security-role>
</web-app>

0 comments on commit 65c2391

Please sign in to comment.