Author: billbarker
Date: Sun Apr  9 18:36:19 2006
New Revision: 392872

URL: http://svn.apache.org/viewcvs?rev=392872&view=rev
Log:
Restore the ability to build with the Mail Resources

Modified:
    tomcat/tc6.0.x/trunk/build.xml

Modified: tomcat/tc6.0.x/trunk/build.xml
URL: 
http://svn.apache.org/viewcvs/tomcat/tc6.0.x/trunk/build.xml?rev=392872&r1=392871&r2=392872&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/build.xml (original)
+++ tomcat/tc6.0.x/trunk/build.xml Sun Apr  9 18:36:19 2006
@@ -60,7 +60,15 @@
   <target name="build-prepare">
 
     <available classname="junit.framework.TestCase" property="junit.present" />
-
+    <condition property="javamail.present">
+      <and>
+        <available classname="javax.activation.DataSource"
+         classpath="${activation.jar}" />
+        <available classname="javax.mail.Service"
+         classpath="${mail.jar}" />
+      </and>
+    </condition>
+    
     <mkdir dir="${tomcat.classes}"/>
     
     <mkdir dir="${tomcat.build}"/>
@@ -82,8 +90,10 @@
            excludes="**/CVS/**,**/.svn/**">
       <classpath refid="tomcat.classpath" />
       <exclude name="org/apache/tomcat/util/net/puretls/**" />
-      <exclude name="org/apache/naming/factory/MailSessionFactory.java"/>
-      <exclude name="org/apache/naming/factory/SendMailFactory.java"/>
+      <exclude name="org/apache/naming/factory/MailSessionFactory.java"
+              unless="javamail.present" />
+      <exclude name="org/apache/naming/factory/SendMailFactory.java"
+              unless="javamail.present" />
     </javac>
     <!-- Copy static resource files -->
     <filter token="VERSION" value="${version}"/>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to