cziegeler    2003/01/07 05:36:57

  Modified:    .        changes.xml build.xml
               src/scratchpad/src/org/apache/cocoon/mail MailAction.java
  Added:       tools/lib ant-contrib-0.1.jar
               legal    LICENSE.ant-contrib
  Log:
      Added ant-contrib library with some optional ant tasks and started cleaning
      up the build system.
  (Ok, for now the build system looks more ugly, but you can now e.g. leave out the 
scratchpad 
  stuff by changing the properties and avoid the compilation problems -
  more will follow)
  
  Revision  Changes    Path
  1.330     +5 -1      xml-cocoon2/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/changes.xml,v
  retrieving revision 1.329
  retrieving revision 1.330
  diff -u -r1.329 -r1.330
  --- changes.xml       6 Jan 2003 15:21:24 -0000       1.329
  +++ changes.xml       7 Jan 2003 13:36:56 -0000       1.330
  @@ -40,6 +40,10 @@
    </devs>
   
    <release version="@version@" date="@date@">
  +  <action dev="CZ" type="update">
  +    Added ant-contrib library with some optional ant tasks and started cleaning
  +    up the build system.
  +  </action>
     <action dev="SW" type="update">
       ZipArchiveSerializer now accepts inline content for entries of the zip archive
       and not only source URLs.
  
  
  
  1.301     +131 -95   xml-cocoon2/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/build.xml,v
  retrieving revision 1.300
  retrieving revision 1.301
  diff -u -r1.300 -r1.301
  --- build.xml 2 Jan 2003 22:53:41 -0000       1.300
  +++ build.xml 7 Jan 2003 13:36:56 -0000       1.301
  @@ -262,6 +262,9 @@
         <classpath refid="anttasks.classpath"/>
       </taskdef>
   
  +    <!-- Add ant-contrib tasks -->
  +    <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
  + 
       <!-- compile the ant tasks -->
       <mkdir dir="${tools.dir}/anttasks"/>
       <javac srcdir="${tools.dir}/src" 
  @@ -983,36 +986,44 @@
         </fileset>
       </copy>
   
  -    <mkdir dir="${build.scratchpad.src}"/>
  -    <mkdir dir="${build.scratchpad.dest}"/>
  -    <copy todir="${build.scratchpad.src}" filtering="on">
  -      <fileset dir="${scratchpad.src}">
  -        <exclude name="**/Ifx*.java" unless="ifx.driver.present"/>
  -
  -        <exclude name="**/components/request/**"                
unless="servlet.present"/>
  -        <exclude name="**/precept/**"                           
unless="servlet.present"/>
  -        <exclude name="**/reading/ByteRangeResourceReader.java" 
unless="servlet.present"/>
  -        <exclude name="**/acting/SourceMultiAction.java"        
unless="servlet.present"/>
  -        <exclude name="**/acting/SourceUploadAction.java"       
unless="servlet.present"/>
  -        <exclude name="**/generation/RequestAttribute**.java"   
unless="servlet.present"/>
  -
  -        <exclude name="**/jxpath/**" unless="jxpath.present"/>
  -        <exclude name="**/taglib/**" unless="jxpath.present"/>
  -        <exclude name="**/transformation/TagTransformer.java" 
unless="jxpath.present"/>
  -
  -        <exclude name="**/XMLDB*.java" unless="xmldb.present"/>
  -        <exclude name="**/DbXML*.java" unless="xmldb.present"/>
  -
  -        <exclude name="**/servlet/*Filter*.java" unless="servlet23.present"/>
  -
  -        <exclude name="**/components/axis/**" unless="activation.present"/>
  -        <exclude name="**/reading/AxisRPCReader.java" unless="activation.present"/>
  -        <exclude name="**/webservices/**" unless="activation.present"/>
  -
  -        <exclude name="**/Slide*" unless="transaction.present"/>
  -        <exclude name="**/slide*" unless="transaction.present"/>
  -      </fileset>
  -    </copy>
  +    <if>
  +      <istrue value="${cocoon.webapp.scratchpad.include}"/>
  +      <then>
  +         <mkdir dir="${build.scratchpad.src}"/>
  +         <mkdir dir="${build.scratchpad.dest}"/>
  +         <copy todir="${build.scratchpad.src}" filtering="on">
  +           <fileset dir="${scratchpad.src}">
  +             <exclude name="**/Ifx*.java" unless="ifx.driver.present"/>
  +     
  +             <exclude name="**/components/request/**"                
unless="servlet.present"/>
  +             <exclude name="**/precept/**"                           
unless="servlet.present"/>
  +             <exclude name="**/reading/ByteRangeResourceReader.java" 
unless="servlet.present"/>
  +             <exclude name="**/acting/SourceMultiAction.java"        
unless="servlet.present"/>
  +             <exclude name="**/acting/SourceUploadAction.java"       
unless="servlet.present"/>
  +             <exclude name="**/generation/RequestAttribute**.java"   
unless="servlet.present"/>
  +     
  +             <exclude name="**/jxpath/**" unless="jxpath.present"/>
  +             <exclude name="**/taglib/**" unless="jxpath.present"/>
  +             <exclude name="**/transformation/TagTransformer.java" 
unless="jxpath.present"/>
  +     
  +             <exclude name="**/XMLDB*.java" unless="xmldb.present"/>
  +             <exclude name="**/DbXML*.java" unless="xmldb.present"/>
  +     
  +             <exclude name="**/servlet/*Filter*.java" unless="servlet23.present"/>
  +     
  +             <exclude name="**/components/axis/**" unless="activation.present"/>
  +             <exclude name="**/reading/AxisRPCReader.java" 
unless="activation.present"/>
  +             <exclude name="**/webservices/**" unless="activation.present"/>
  +     
  +             <exclude name="**/Slide*" unless="transaction.present"/>
  +             <exclude name="**/slide*" unless="transaction.present"/>
  +           </fileset>
  +         </copy>
  +      </then>
  +      <else>
  +        <echo message="Excluding scratchpad"/>
  +      </else>
  +    </if>
       
       <mkdir dir="${build.deprecated.src}"/>
       <mkdir dir="${build.deprecated.dest}"/>
  @@ -1114,29 +1125,33 @@
         </classpath>
       </javac>
   
  -    <copy todir="${build.scratchpad.dest}">
  -      <fileset dir="${build.scratchpad.src}">
  -        <include name="**/Manifest.mf"/>
  -        <include name="**/*.xsl"/>
  -        <include name="**/*.wsdd"/>
  -        <include name="**/*.roles"/>
  -        <include name="META-INF/**"/>
  -      </fileset>
  -    </copy>
  -
  -    <javac srcdir="${build.scratchpad.src}"
  -           destdir="${build.scratchpad.dest}"
  -           debug="${debug}"
  -           optimize="${optimize}"
  -           deprecation="${deprecation}"
  -           target="${target.vm}">
  -      <!--classpath refid="scratchpad.classpath"/-->
  -      <classpath>
  -        <path refid="scratchpad.classpath"/>
  -        <path location="{build.mocks}"/>
  -      </classpath>
  -    </javac>
  -    
  +    <if>
  +      <istrue value="${cocoon.webapp.scratchpad.include}"/>
  +      <then>
  +         <copy todir="${build.scratchpad.dest}">
  +           <fileset dir="${build.scratchpad.src}">
  +             <include name="**/Manifest.mf"/>
  +             <include name="**/*.xsl"/>
  +             <include name="**/*.wsdd"/>
  +             <include name="**/*.roles"/>
  +             <include name="META-INF/**"/>
  +           </fileset>
  +         </copy>
  +     
  +         <javac srcdir="${build.scratchpad.src}"
  +                destdir="${build.scratchpad.dest}"
  +                debug="${debug}"
  +                optimize="${optimize}"
  +                deprecation="${deprecation}"
  +                target="${target.vm}">
  +           <!--classpath refid="scratchpad.classpath"/-->
  +           <classpath>
  +             <path refid="scratchpad.classpath"/>
  +             <path location="{build.mocks}"/>
  +           </classpath>
  +         </javac>
  +      </then>
  +    </if>    
   
       <copy todir="${build.deprecated.dest}">
         <fileset dir="${build.deprecated.src}">
  @@ -1197,11 +1212,16 @@
         </fileset>
       </jar>
   
  -    <jar jarfile="${build.dir}/${scratchpad.name}.jar">
  -      <fileset dir="${build.scratchpad.dest}">
  -        <include name="org/**"/>
  -      </fileset>
  -    </jar>
  +    <if>
  +      <istrue value="${cocoon.webapp.scratchpad.include}"/>
  +      <then>
  +        <jar jarfile="${build.dir}/${scratchpad.name}.jar">
  +          <fileset dir="${build.scratchpad.dest}">
  +            <include name="org/**"/>
  +          </fileset>
  +        </jar>
  +      </then>
  +    </if>
       
       <jar jarfile="${build.dir}/${deprecated.name}.jar">
         <fileset dir="${build.deprecated.dest}">
  @@ -1430,34 +1450,40 @@
     <!-- Prepares the webapp directories for scratchpad                      -->
     <!-- =================================================================== -->
     <target name="prepare-webapp-scratchpad" depends="copy-webapp" 
if="include.scratchpad.libs">
  -      <!-- Invoke the XConfTool to add optional entries -->
  -      <xconf-tool directory="${build.scratchpad.src}"
  -                  extension="xmap"
  -                  configuration="${build.war}/sitemap.xmap"/>
  -
  -      <xconf-tool directory="${build.scratchpad.src}"
  -                  extension="xpipe"
  -                  configuration="${build.war}/sitemap.xmap"/>
  -
  -      <xconf-tool directory="${build.scratchpad.src}"
  -                  extension="xconf"
  -                  configuration="${build.war}/WEB-INF/cocoon.xconf"/>
  -
  -    <!-- copy scratchpad webapp samples -->
  -    <copy todir="${build.war}" filtering="on">
  -      <fileset dir="${scratchpad.webapp}">
  -        <exclude name="**/*.gif"/>
  -        <exclude name="**/*.jpg"/>
  -        <exclude name="**/*.png"/>
  -     </fileset>
  -    </copy>
  -    <copy todir="${build.war}" filtering="off">
  -      <fileset dir="${scratchpad.webapp}">
  -        <include name="**/*.gif"/>
  -        <include name="**/*.jpg"/>
  -        <include name="**/*.png"/>
  -     </fileset>
  -    </copy>
  +      <if>
  +      <istrue value="${cocoon.webapp.scratchpad.include}"/>
  +      <then>
  +  
  +           <!-- Invoke the XConfTool to add optional entries -->
  +           <xconf-tool directory="${build.scratchpad.src}"
  +                       extension="xmap"
  +                       configuration="${build.war}/sitemap.xmap"/>
  +     
  +           <xconf-tool directory="${build.scratchpad.src}"
  +                       extension="xpipe"
  +                       configuration="${build.war}/sitemap.xmap"/>
  +     
  +           <xconf-tool directory="${build.scratchpad.src}"
  +                       extension="xconf"
  +                       configuration="${build.war}/WEB-INF/cocoon.xconf"/>
  +     
  +         <!-- copy scratchpad webapp samples -->
  +         <copy todir="${build.war}" filtering="on">
  +           <fileset dir="${scratchpad.webapp}">
  +             <exclude name="**/*.gif"/>
  +             <exclude name="**/*.jpg"/>
  +             <exclude name="**/*.png"/>
  +          </fileset>
  +         </copy>
  +         <copy todir="${build.war}" filtering="off">
  +           <fileset dir="${scratchpad.webapp}">
  +             <include name="**/*.gif"/>
  +             <include name="**/*.jpg"/>
  +             <include name="**/*.png"/>
  +          </fileset>
  +         </copy>
  +       </then>
  +     </if>
     </target>
   
     <!-- =================================================================== -->
  @@ -1536,18 +1562,28 @@
     <!-- Prepares the scratchpad libraries for the war package               -->
     <!-- =================================================================== -->
     <target name="copy-scratchpad-libs" depends="copy-webapp-libs" 
if="include.scratchpad.libs">
  -    <copy todir="${build.war}/WEB-INF/lib">
  -      <fileset dir="${scratchpad.lib}">
  -        <include name="*.jar"/>
  -        <exclude name="servlet*.jar"/>
  -
  -        <exclude name="slide*.jar" unless="transaction.present"/>
  -      </fileset>
  -    </copy>
  +    <if>
  +      <istrue value="${cocoon.webapp.scratchpad.include}"/>
  +      <then>
  +         <copy todir="${build.war}/WEB-INF/lib">
  +           <fileset dir="${scratchpad.lib}">
  +             <include name="*.jar"/>
  +             <exclude name="servlet*.jar"/>
  +     
  +             <exclude name="slide*.jar" unless="transaction.present"/>
  +           </fileset>
  +         </copy>
  +       </then>
  +     </if>
     </target>
   
     <target name="prepare-scratchpad-libs" depends="copy-scratchpad-libs, 
prepare-webapp-libs" if="include.scratchpad.libs">
  -    <copy file="${build.dir}/${scratchpad.name}.jar" 
tofile="${build.war}/WEB-INF/lib/${scratchpad.name}.jar"/>
  +    <if>
  +      <istrue value="${cocoon.webapp.scratchpad.include}"/>
  +      <then>
  +        <copy file="${build.dir}/${scratchpad.name}.jar" 
tofile="${build.war}/WEB-INF/lib/${scratchpad.name}.jar"/>
  +      </then>
  +    </if>
     </target>
   
     <!-- =================================================================== -->
  
  
  
  1.1                  xml-cocoon2/tools/lib/ant-contrib-0.1.jar
  
        <<Binary file>>
  
  
  1.1                  xml-cocoon2/legal/LICENSE.ant-contrib
  
  Index: LICENSE.ant-contrib
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 Ant-Contrib project.  All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:  
   *       "This product includes software developed by the 
   *        Ant-Contrib project (http://sourceforge.net/projects/ant-contrib)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The name Ant-Contrib must not be used to endorse or promote products 
   *    derived from this software without prior written permission. For
   *    written permission, please contact
   *    [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Ant-Contrib"
   *    nor may "Ant-Contrib" appear in their names without prior written
   *    permission of the Ant-Contrib project.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE ANT-CONTRIB PROJECT OR ITS
   * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   */
  
  
  1.2       +4 -30     
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/mail/MailAction.java
  
  Index: MailAction.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/mail/MailAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MailAction.java   6 Jan 2003 21:51:20 -0000       1.1
  +++ MailAction.java   7 Jan 2003 13:36:57 -0000       1.2
  @@ -53,57 +53,31 @@
    *  <http://www.apache.org/>.
    */
   package org.apache.cocoon.mail;
  -import java.io.IOException;
  -
   import java.text.SimpleDateFormat;
   import java.util.HashMap;
   import java.util.Iterator;
   import java.util.List;
   import java.util.Map;
  -import java.util.Map;
  -import java.util.Properties;
   import java.util.Properties;
  +
   import javax.mail.Folder;
   import javax.mail.Message;
  -import javax.mail.MessagingException;
   import javax.mail.Provider;
   import javax.mail.Store;
   import javax.mail.URLName;
  -import javax.servlet.http.HttpSessionBindingEvent;
  -import javax.servlet.http.HttpSessionBindingListener;
  -//import javax.mail.Session;
  -import org.apache.avalon.framework.activity.Disposable;
  -import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.component.ComponentException;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.context.Context;
  +
   import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.Contextualizable;
  -import org.apache.avalon.framework.context.DefaultContext;
  -import org.apache.avalon.framework.logger.LogEnabled;
  -import org.apache.avalon.framework.logger.LogEnabled;
   import org.apache.avalon.framework.logger.Logger;
  -import org.apache.avalon.framework.logger.Logger;
  -import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.thread.ThreadSafe;
  -import org.apache.cocoon.Constants;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.acting.ComposerAction;
   import org.apache.cocoon.environment.ObjectModelHelper;
  -import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.cocoon.environment.Redirector;
   import org.apache.cocoon.environment.Request;
  -import org.apache.cocoon.environment.Request;
  -import org.apache.cocoon.environment.Session;
   import org.apache.cocoon.environment.Session;
  -import org.apache.cocoon.environment.SourceResolver;
  -import org.apache.cocoon.environment.SourceResolver;
  -import org.apache.cocoon.generation.ComposerGenerator;
   import org.apache.cocoon.mail.command.AbstractMailCommand;
  -import org.apache.cocoon.util.NetUtils;
  -import org.apache.excalibur.source.Source;
  -import org.xml.sax.SAXException;
  +import org.apache.excalibur.source.SourceResolver;
   
   /**
    * This action ...
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to