You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Peter Hawkins <pe...@globalvision.com.au> on 2001/05/14 15:48:34 UTC

patch

This should make building slide just a little easier....

It provides a simple configuration parameter in build.properties that (if
uncommented) causes the WAR to be built with a web.xml that has
authentication on by default. If we centralise such things in the config
file it will make life easier for developers (who won't have to reconfig
after each build) and also simplify the instructions to new users. I think
it wouldn't hurt to have something like "usehsql" and "usemysql" too for
rapid and simple deployment and to kick start a user with a broadly
localised domain conf.

Peter







--- build.properties.sample.bak Mon May 14 23:25:06 2001
+++ build.properties.sample     Mon May 14 23:26:36 2001
@@ -11,6 +11,15 @@


 # -------------------------------------------------------------------
+# CONFIGURATION OPTIONS
+# -------------------------------------------------------------------
+
+# Uncomment the following line to set user authentication on by default
+#authenticate
+
+
+
+# -------------------------------------------------------------------
 # EXTERNAL DEPENDENCIES
 # -------------------------------------------------------------------



--- build.xml.bak       Mon May 14 23:29:12 2001
+++ build.xml   Mon May 14 23:35:34 2001
@@ -60,6 +60,10 @@
   <property name="webdavclient.build"    value="${slide.build}/client" />
   <property name="webdavclient.dist"     value="${slide.dist}/client" />

+  <!--
=================================================================== -->
+  <!-- Overridden when authentication is
         -->
+  <!--
=================================================================== -->
+  <property name="authenticate"          value="!--" />

   <!--
=================================================================== -->
   <!--
         -->
@@ -738,8 +742,15 @@
   <!--
=================================================================== -->
   <target name="webapp-dist" depends="dist" >

+    <filter token="AUTH" value="${authenticate}"/>
+    <copy todir="${slide.dist}/conf" filtering="true" overwrite="yes" >
+      <fileset dir="src/conf/webapp">
+        <include name="web.xml"/>
+      </fileset>
+    </copy>
+
     <war warfile="${webapp.dist}/slide.war"
-     webxml="src/conf/webapp/web.xml">
+     webxml="${slide.dist}/conf/web.xml">
       <fileset dir="src/conf/webapp">
         <include name="**/Domain.xml" />
       </fileset>

--- src/conf/webapp/web.xml.bak Mon May 14 23:36:36 2001
+++ src/conf/webapp/web.xml     Mon May 14 23:37:14 2001
@@ -392,7 +392,7 @@

   <!-- Uncomment this to get authentication -->

-  <!--security-constraint>
+  <@A...@security-constraint>
     <web-resource-collection>
       <web-resource-name>DAV resource</web-resource-name>
       <url-pattern>/*</url-pattern>
@@ -431,6 +431,6 @@
   <login-config>
     <auth-method>BASIC</auth-method>
     <realm-name>Slide DAV Server</realm-name>
-  </login-config-->
+  </login-config@AUTH@>

 </web-app>


Re: patch

Posted by Remy Maucherat <re...@betaversion.org>.
Quoting Peter Hawkins <pe...@globalvision.com.au>:

> This should make building slide just a little easier....
> 
> It provides a simple configuration parameter in build.properties that
> (if
> uncommented) causes the WAR to be built with a web.xml that has
> authentication on by default. If we centralise such things in the
> config
> file it will make life easier for developers (who won't have to
> reconfig
> after each build) and also simplify the instructions to new users. I
> think
> it wouldn't hurt to have something like "usehsql" and "usemysql" too
> for
> rapid and simple deployment and to kick start a user with a broadly
> localised domain conf.

I never thought about doing that kind of thing there, but it's a very good idea.

Remy