You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ba...@apache.org on 2008/08/10 11:59:04 UTC

svn commit: r684439 - in /james/postage/trunk: build.xml doc/howto.txt doc/todos.txt pom.xml src/main/java/org/apache/james/postage/smtpserver/SMTPMailSink.java src/main/java/org/apache/james/postage/smtpserver/SimpleMailServer.java

Author: bago
Date: Sun Aug 10 02:59:02 2008
New Revision: 684439

URL: http://svn.apache.org/viewvc?rev=684439&view=rev
Log:
Updated m2 and ant builds to require java 1.5 (removed conditional compilation for JMX support).
Make use of the new stage folder for building and running postage with both ant and m2.
Updated SimpleMailServer/SMTPMailSink to be based on current server trunk (only because of cleaner/simpler m2 dependency tree).
Removed m2 stuff from todos.txt.
Updated howto.txt according to this upgrade.

Modified:
    james/postage/trunk/build.xml
    james/postage/trunk/doc/howto.txt
    james/postage/trunk/doc/todos.txt
    james/postage/trunk/pom.xml
    james/postage/trunk/src/main/java/org/apache/james/postage/smtpserver/SMTPMailSink.java
    james/postage/trunk/src/main/java/org/apache/james/postage/smtpserver/SimpleMailServer.java

Modified: james/postage/trunk/build.xml
URL: http://svn.apache.org/viewvc/james/postage/trunk/build.xml?rev=684439&r1=684438&r2=684439&view=diff
==============================================================================
--- james/postage/trunk/build.xml (original)
+++ james/postage/trunk/build.xml Sun Aug 10 02:59:02 2008
@@ -23,39 +23,43 @@
 
     <!--  CONFIGURE -->
     
-    <property file="build.properties" />
+    <!--<property file="build.properties" /> -->
     
-    <property name="dir.build" value="${basedir}/build"/>
-    <property name="dir.build.source" value="${dir.build}/source/"/>
+    <property name="dir.build" value="${basedir}/target"/>
     <property name="dir.build.classes" value="${dir.build}/classes/"/>
     <property name="dir.build.lib" value="${dir.build}/lib/"/>
     
     <property name="dir.source.classes" value="${basedir}/src/main/java/"/>
-    
-	<condition property='dir.james.basedir' value="${JAMES_HOME}">
-		<isset property="JAMES_HOME"/>
-	</condition>
-    <property name="dir.james.basedir" value="${basedir}/../../server/branches/v2.3"/>
-
-    <property name="force.java1_4.support" value="false"/>
+	
+	  <property name="dir.stage" value="${basedir}/stage"/>
     
     <target name="initialize">
-		<available property='exists.james.home' file='${dir.james.basedir}'/>
-    	<fail unless='exists.james.home'>
-    		${dir.james.basedir} does not exist.
-    		Please set JAMES_HOME in a build.properties file</fail>
-    	
         <tstamp/>
         
         <path id="java.build.classpath">
-            <fileset dir="${basedir}/lib/">
-                <include name="*.jar"/>
-            </fileset>
-            <fileset dir="${dir.james.basedir}/lib/">
-                <include name="*.jar"/>
-            </fileset>
-            <fileset dir="${dir.james.basedir}/build/lib/">
-                <include name="*.jar"/>
+            <fileset dir="${dir.stage}">
+              <!-- BUILDTIME AND RUNTIME -->
+              <include name="commons-collections/jars/commons-collections-3.1.jar"/>
+              <include name="commons-configuration/jars/commons-configuration-1.5.jar"/>
+              <include name="commons-lang/jars/commons-lang-2.3.jar"/>
+              <include name="commons-logging/jars/commons-logging-1.1.jar"/>
+              <include name="commons-net/jars/commons-net-1.4.1.jar"/>
+              <include name="javax.mail/jars/mail-1.4.1.jar"/>
+              <include name="javax.activation/jars/activation-1.1.1.jar"/>
+            	<include name="org.apache.avalon.cornerstone.sockets/jars/cornerstone-sockets-api-2.2.2.jar" />
+            	<include name="org.apache.avalon.cornerstone.sockets/jars/cornerstone-sockets-impl-2.2.2.jar" />
+            	<include name="org.apache.avalon.cornerstone.threads/jars/cornerstone-threads-api-2.2.2.jar" />
+            	<include name="org.apache.avalon.cornerstone.connection/jars/cornerstone-connection-impl-2.2.2.jar" />
+              <include name="org.apache.avalon.framework/jars/avalon-framework-api-4.3.1.jar"/>
+              <include name="org.apache.avalon.framework/jars/avalon-framework-impl-4.3.1.jar"/>
+            	<include name="org.apache.excalibur.components/jars/excalibur-thread-impl-2.2.1.jar" />
+            	<include name="org.apache.excalibur.components/jars/excalibur-thread-api-2.2.1.jar" />
+            	<include name="org.apache.excalibur.components/jars/excalibur-pool-api-2.2.1.jar" />
+              <include name="org.apache.james/jars/mailet-2.4-SNAPSHOT.jar"/>
+              <include name="org.apache.james/jars/james-server-domain-api-3.0-SNAPSHOT.jar"/>
+              <!-- BUILD TIME ONLY -->
+            	<include name="org.apache.james/jars/james-server-core-library-3.0-SNAPSHOT.jar"/>
+              <include name="org.apache.james/jars/james-server-smtpserver-function-3.0-SNAPSHOT.jar"/>
             </fileset>
         </path>
 
@@ -63,60 +67,47 @@
             <fileset dir="${basedir}/build/lib/">
                 <include name="postage.jar"/>
             </fileset>
-            <fileset dir="${basedir}/lib/">
-                <include name="*.jar"/>
-            </fileset>
-            <fileset dir="${dir.james.basedir}/lib/">
-                <include name="*.jar"/>
-            </fileset>
-            <fileset dir="${dir.james.basedir}/build/lib/">
-                <include name="*.jar"/>
+            <fileset dir="${dir.stage}">
+              <!-- BUILDTIME AND RUNTIME -->
+              <include name="commons-collections/jars/commons-collections-3.1.jar"/>
+              <include name="commons-configuration/jars/commons-configuration-1.5.jar"/>
+              <include name="commons-lang/jars/commons-lang-2.3.jar"/>
+              <include name="commons-logging/jars/commons-logging-1.1.jar"/>
+              <include name="commons-net/jars/commons-net-1.4.1.jar"/>
+              <include name="javax.mail/jars/mail-1.4.1.jar"/>
+              <include name="javax.activation/jars/activation-1.1.1.jar"/>
+            	<include name="org.apache.avalon.cornerstone.sockets/jars/cornerstone-sockets-api-2.2.2.jar" />
+            	<include name="org.apache.avalon.cornerstone.sockets/jars/cornerstone-sockets-impl-2.2.2.jar" />
+            	<include name="org.apache.avalon.cornerstone.threads/jars/cornerstone-threads-api-2.2.2.jar" />
+            	<include name="org.apache.avalon.cornerstone.connection/jars/cornerstone-connection-impl-2.2.2.jar" />
+              <include name="org.apache.avalon.framework/jars/avalon-framework-api-4.3.1.jar"/>
+              <include name="org.apache.avalon.framework/jars/avalon-framework-impl-4.3.1.jar"/>
+            	<include name="org.apache.excalibur.components/jars/excalibur-thread-api-2.2.1.jar" />
+            	<include name="org.apache.excalibur.components/jars/excalibur-thread-impl-2.2.1.jar" />
+            	<include name="org.apache.excalibur.components/jars/excalibur-pool-api-2.2.1.jar" />
+              <include name="org.apache.james/jars/james-server-core-library-3.0-SNAPSHOT.jar"/>
+              <include name="org.apache.james/jars/james-server-smtpserver-function-3.0-SNAPSHOT.jar"/>
+              <include name="org.apache.james/jars/mailet-2.4-SNAPSHOT.jar"/>
+              <include name="org.apache.james/jars/james-server-domain-api-3.0-SNAPSHOT.jar"/>
+              <!-- RUNTIME ONLY -->
+            	<include name="concurrent/jars/concurrent-1.3.4.jar" />
+            	<include name="org.apache.excalibur.components/jars/excalibur-pool-impl-2.2.1.jar" />
+              <include name="org.apache.james/jars/apache-james-mailet-base-1.0-SNAPSHOT.jar"/>
+            	<include name="org.apache.avalon.cornerstone.connection/jars/cornerstone-connection-api-2.2.2.jar" />
+            	<include name="dnsjava/jars/dnsjava-2.0.6.jar" />
             </fileset>
         </path>
 
-        <!--
-         no.gmx property determines, whether or not we can and should compile in Java 5 support (JMX support for the JVM
-         parameters like memory, threads).
-         if yes, it is probably not possible to run the application in earlier JVMs.
-         if false, it is not possible to record memory and thread consumption.
-        -->
-        <condition property="no.jmx" >
-            <or>
-                <equals arg1="${ant.java.version}" arg2="1.1" />
-                <equals arg1="${ant.java.version}" arg2="1.2" />
-                <equals arg1="${ant.java.version}" arg2="1.3" />
-                <equals arg1="${ant.java.version}" arg2="1.4" />
-                <equals arg1="force.java1_4.support" arg2="true" />
-            </or>
-        </condition>
-
     </target>
 
     <target name="init-compiler-sources">
         <fixcrlf srcdir="${dir.source.classes}" includes="**/*.java" eol="lf" tab="remove" tablength="4" />
-        
-        <copy todir="${dir.build.source}"  >
-            <fileset dir="${dir.source.classes}" >
-                <include name="**/*.java" />
-                <exclude name="**/JVMResourceSamplerWorker.java" if="no.jmx"/>  
-            </fileset> 
-        </copy>
     </target>
         
-    <!-- PREPARE LIBRARIES -->
-    <target name="fetch-third-party-libs" depends="initialize" >
-        <extension id="ext.lib.junit" extensionName="junit-3.8.1.jar" />
-        
-        <jarlib-resolve property="lib.junit">
-            <extension refid="ext.lib.junit"/>
-            <url url="http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar" destfile="lib/junit.jar"/>
-        </jarlib-resolve>    
-    </target>
-    
     <!--  CLEAN UP -->
     
     <target name="clean" depends="initialize" >
-        <delete dir="${dir.build}"/>
+        <delete dir="${dir.build}" />
     </target>
 
     
@@ -125,9 +116,6 @@
     <target name="init-paths">
         <mkdir dir="${dir.build}"/>
         <mkdir dir="${dir.build.classes}"/>
-            
-        <delete dir="${dir.build.source}" failonerror="false"/>
-        <mkdir dir="${dir.build.source}"/>
     </target>
         
     <target name="build" depends="initialize, init-paths, init-compiler-sources">
@@ -136,8 +124,9 @@
         <!-- build the src javas -->
         <javac destdir="${dir.build.classes}"
             classpathref="java.build.classpath"
+            target="1.5" source="1.5"
             debug="on" >
-            <src path="${dir.build.source}" /> 
+            <src path="${dir.source.classes}" /> 
         </javac>
 		
         <echo>Finished compiling ${ant.project.name}</echo>
@@ -145,7 +134,7 @@
     
     <!--  PACKAGE -->
     
-    <target name="package" depends="initialize" >
+    <target name="package" depends="build" >
         <mkdir dir="${dir.build}"/>
         <mkdir dir="${dir.build.lib}"/>
         
@@ -172,7 +161,7 @@
 
     <!--  RUN -->
     
-    <target name="run" depends="initialize" >
+    <target name="run" depends="initialize, package" >
         <java classname="org.apache.james.postage.Main" fork="true">
             <classpath refid="java.run.classpath"/>
             

Modified: james/postage/trunk/doc/howto.txt
URL: http://svn.apache.org/viewvc/james/postage/trunk/doc/howto.txt?rev=684439&r1=684438&r2=684439&view=diff
==============================================================================
--- james/postage/trunk/doc/howto.txt (original)
+++ james/postage/trunk/doc/howto.txt Sun Aug 10 02:59:02 2008
@@ -43,42 +43,40 @@
 the following libraries are expected on the classpath:
 
 for reading xml configuration file:                               
-commons-beanutils.jar
 commons-collections-3.1.jar
-commons-configuration-1.2.jar
-commons-digester.jar
-commons-lang-2.1.jar
+commons-configuration-1.5.jar
+commons-lang-2.3.jar
 
 for logging:
-commons-logging.jar
+commons-logging-1.1.jar
 
 for telnet, SMTP & POP3  client:
 commons-net-1.4.1.jar
 
 for unit testing:
-junit.jar
+junit-3.8.1.jar
 
 for embedded SMTP server from James:
-james-2.3-dev.jar
-mail-1.3.2.jar
-mailet-2.3.jar
-mailet-api-2.3.jar
-activation.jar
-avalon-framework-api-4.3.jar
-avalon-framework-impl-4.3.jar
-avalon-logkit-2.1.jar
+mail-1.4.1.jar
+activation-1.1.1.jar
+cornerstone-sockets-api-2.2.2.jar
+cornerstone-sockets-impl-2.2.2.jar
+cornerstone-threads-api-2.2.2.jar
+cornerstone-connection-impl-2.2.2.jar
+avalon-framework-api-4.3.1.jar
+avalon-framework-impl-4.3.1.jar
+excalibur-thread-api-2.2.1.jar
+excalibur-thread-impl-2.2.1.jar
+excalibur-pool-api-2.2.1.jar
+james-server-core-library-3.0-SNAPSHOT.jar
+james-server-smtpserver-function-3.0-SNAPSHOT.jar
+mailet-2.4-SNAPSHOT.jar
+james-server-domain-api-3.0-SNAPSHOT.jar
 concurrent-1.3.4.jar
-cornerstone-connection-api-2.1.jar
-cornerstone-connection-impl-2.1.jar
-cornerstone-sockets-api-2.1.jar
-cornerstone-sockets-impl-2.1.jar
-cornerstone-threads-api-2.1.jar
-cornerstone-threads-impl-2.1.jar
-dnsjava-2.0.1.jar
-excalibur-pool-api-2.1.jar
-excalibur-pool-impl-2.1.jar
-excalibur-thread-api-2.1.jar
-excalibur-thread-impl-2.1.jar
+excalibur-pool-impl-2.2.1.jar
+apache-james-mailet-base-1.0-SNAPSHOT.jar
+cornerstone-connection-api-2.2.2.jar
+dnsjava-2.0.6.jar
 
 ++ How does it work?
 

Modified: james/postage/trunk/doc/todos.txt
URL: http://svn.apache.org/viewvc/james/postage/trunk/doc/todos.txt?rev=684439&r1=684438&r2=684439&view=diff
==============================================================================
--- james/postage/trunk/doc/todos.txt (original)
+++ james/postage/trunk/doc/todos.txt Sun Aug 10 02:59:02 2008
@@ -1,7 +1,4 @@
 current plans
-
-+ make project maven2 compatible
-+ move to maven2
 + test with disappearing services. is sampling data generated? are error codes being set?
 + increment mails per min
 + wiki documentation

Modified: james/postage/trunk/pom.xml
URL: http://svn.apache.org/viewvc/james/postage/trunk/pom.xml?rev=684439&r1=684438&r2=684439&view=diff
==============================================================================
--- james/postage/trunk/pom.xml (original)
+++ james/postage/trunk/pom.xml Sun Aug 10 02:59:02 2008
@@ -96,19 +96,40 @@
         <enabled>false</enabled>
       </snapshots>
     </repository>
-    <!--
+
+
     <repository>
-      <id>bago-dist-m1</id>
-      <name>Temporary Repository</name>
-      <url>http://people.apache.org/~bago/maven/dist-m1</url>
+      <id>local-postage-stage-repository</id>
+      <name>Local postage stage repository</name>
+      <!-- Please note that due to http://jira.codehaus.org/browse/MNG-2896 -->
+      <!-- If you don't have james-project checked out in ../james-project -->
+      <!-- you will have to place your absolute path to the project instead -->
+      <!-- of ${basedir}, or, otherwise, manually install the parent poms -->
+      <!--
+           mvn -fignorepom.xml install:install-file 
+              -Dfile=stage\org.apache.james\poms\james-parent-1.1.pom 
+              -Dpackaging=pom 
+              -DgroupId=org.apache.james 
+              -DartifactId=james-parent 
+              -Dversion=1.1
+           mvn -fignorepom.xml install:install-file 
+              -Dfile=stage\org.apache.james\poms\james-project-1.2.pom 
+              -Dpackaging=pom 
+              -DgroupId=org.apache.james 
+              -DartifactId=james-project 
+              -Dversion=1.2
+       -->
+      <url>file://${basedir}/stage</url>
       <layout>legacy</layout>
       <snapshots>
         <enabled>true</enabled>
         <checksumPolicy>ignore</checksumPolicy>
       </snapshots>
-    </repository>
-    -->
-  </repositories>
+      <releases>
+        <enabled>true</enabled>
+        <checksumPolicy>ignore</checksumPolicy>
+      </releases>
+    </repository>  </repositories>
 
   <dependencies verbose="true">
 
@@ -119,15 +140,15 @@
     </dependency>
 
     <dependency>
-      <groupId>avalon-framework</groupId>
+      <groupId>org.apache.avalon.framework</groupId>
       <artifactId>avalon-framework-api</artifactId>
-      <version>4.3</version>
+      <version>4.3.1</version>
     </dependency>
 
     <dependency>
-      <groupId>avalon-framework</groupId>
+      <groupId>org.apache.avalon.framework</groupId>
       <artifactId>avalon-framework-impl</artifactId>
-      <version>4.3</version>
+      <version>4.3.1</version>
       <exclusions>
         <exclusion>
           <groupId>jmock</groupId>
@@ -167,19 +188,19 @@
     <dependency>
       <groupId>commons-lang</groupId>
       <artifactId>commons-lang</artifactId>
-      <version>2.1</version>
+      <version>2.3</version>
     </dependency>
     
     <dependency>
       <groupId>commons-logging</groupId>
       <artifactId>commons-logging</artifactId>
-      <version>1.0.4</version>
+      <version>1.1</version>
     </dependency>
     
     <dependency>
       <groupId>commons-configuration</groupId>
       <artifactId>commons-configuration</artifactId>
-      <version>1.2</version>
+      <version>1.5</version>
       <exclusions>
         <exclusion>
           <groupId>commons-codec</groupId>
@@ -211,15 +232,15 @@
     </dependency>
 
     <dependency>
-      <groupId>cornerstone-sockets</groupId>
+      <groupId>org.apache.avalon.cornerstone.sockets</groupId>
       <artifactId>cornerstone-sockets-api</artifactId>
-      <version>2.1</version>
+      <version>2.2.2</version>
     </dependency>
 
     <dependency>
-      <groupId>cornerstone-sockets</groupId>
+      <groupId>org.apache.avalon.cornerstone.sockets</groupId>
       <artifactId>cornerstone-sockets-impl</artifactId>
-      <version>2.1</version>
+      <version>2.2.2</version>
       <exclusions>
         <exclusion>
           <groupId>xml-apis</groupId>
@@ -228,6 +249,7 @@
       </exclusions>
     </dependency>
     
+    <!-- 
     <dependency>
     	<groupId>org.apache.james</groupId>
     	<artifactId>james-server</artifactId>
@@ -241,12 +263,6 @@
           <groupId>org.bouncycastle</groupId>
           <artifactId>bcmail-jdk14-workaround</artifactId>
         </exclusion>
-        <!-- 
-        <exclusion>
-          <groupId>javax.mail</groupId>
-          <artifactId>mail</artifactId>
-        </exclusion>
-         -->
         <exclusion>
           <groupId>avalon-framework</groupId>
           <artifactId>avalon-framework-api</artifactId>
@@ -263,16 +279,6 @@
           <groupId>commons-net</groupId>
           <artifactId>commons-net</artifactId>
         </exclusion>
-        <!-- 
-        <exclusion>
-          <groupId>cornerstone-connection</groupId>
-          <artifactId>cornerstone-connection-api</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>cornerstone-connection</groupId>
-          <artifactId>cornerstone-connection-impl</artifactId>
-        </exclusion>
-         -->
         <exclusion>
           <groupId>cornerstone-sockets</groupId>
           <artifactId>cornerstone-sockets-api</artifactId>
@@ -313,16 +319,6 @@
           <groupId>dnsjava</groupId>
           <artifactId>dnsjava</artifactId>
         </exclusion>
-        <!-- 
-        <exclusion>
-          <groupId>excalibur-thread</groupId>
-          <artifactId>excalibur-thread-api</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>excalibur-thread</groupId>
-          <artifactId>excalibur-thread-impl</artifactId>
-        </exclusion>
-        -->
         <exclusion>
           <groupId>avalon-logkit</groupId>
           <artifactId>avalon-logkit</artifactId>
@@ -333,7 +329,8 @@
         </exclusion>
     	</exclusions>
     </dependency>
-
+		-->
+		
     <dependency>
       <groupId>dnsjava</groupId>
       <artifactId>dnsjava</artifactId>
@@ -348,6 +345,38 @@
       <scope>test</scope>
     </dependency>
 
+
+    <dependency>
+    	<groupId>org.apache.excalibur.components</groupId>
+    	<artifactId>excalibur-thread-impl</artifactId>
+    	<version>2.2.1</version>
+    </dependency>
+    <dependency>
+    	<groupId>org.apache.avalon.cornerstone.threads</groupId>
+    	<artifactId>cornerstone-threads-api</artifactId>
+    	<version>2.2.2</version>
+    </dependency>
+    <dependency>
+    	<groupId>org.apache.avalon.cornerstone.connection</groupId>
+    	<artifactId>cornerstone-connection-impl</artifactId>
+    	<version>2.2.2</version>
+    </dependency>
+    <dependency>
+    	<groupId>org.apache.james</groupId>
+    	<artifactId>james-server-core-library</artifactId>
+    	<version>3.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+    	<groupId>org.apache.james</groupId>
+    	<artifactId>james-server-smtpserver-function</artifactId>
+    	<version>3.0-SNAPSHOT</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.james</groupId>
+      <artifactId>mailet</artifactId>
+      <version>2.4-SNAPSHOT</version>
+    </dependency>
   </dependencies>
 
   <distributionManagement>
@@ -391,6 +420,15 @@
           </descriptorRefs>
         </configuration>
       </plugin>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.0.2</version>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+          <encoding>iso8859-1</encoding>
+        </configuration>
+      </plugin>      
     </plugins>
     
   </build>
@@ -410,7 +448,7 @@
       <plugin>
         <artifactId>maven-pmd-plugin</artifactId>
         <configuration>
-          <targetjdk>1.4</targetjdk>
+          <targetjdk>1.5</targetjdk>
           <rulesets>
             <ruleset>/rulesets/basic.xml</ruleset>
             <ruleset>/rulesets/controversial.xml</ruleset>

Modified: james/postage/trunk/src/main/java/org/apache/james/postage/smtpserver/SMTPMailSink.java
URL: http://svn.apache.org/viewvc/james/postage/trunk/src/main/java/org/apache/james/postage/smtpserver/SMTPMailSink.java?rev=684439&r1=684438&r2=684439&view=diff
==============================================================================
--- james/postage/trunk/src/main/java/org/apache/james/postage/smtpserver/SMTPMailSink.java (original)
+++ james/postage/trunk/src/main/java/org/apache/james/postage/smtpserver/SMTPMailSink.java Sun Aug 10 02:59:02 2008
@@ -27,10 +27,12 @@
 import org.apache.avalon.cornerstone.services.sockets.SocketManager;
 import org.apache.avalon.cornerstone.services.threads.ThreadManager;
 import org.apache.avalon.excalibur.thread.impl.DefaultThreadPool;
+import org.apache.avalon.framework.configuration.DefaultConfiguration;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.excalibur.thread.ThreadPool;
+import org.apache.james.dnsserver.DNSServer;
 import org.apache.james.postage.SamplingException;
 import org.apache.james.postage.execution.Sampler;
 import org.apache.james.postage.result.PostageRunnerResult;
@@ -73,7 +75,7 @@
         m_smtpServer.initialize();
     }
 
-    private ServiceManager setUpServiceManager() {
+    private ServiceManager setUpServiceManager() throws Exception {
         SimpleServiceManager serviceManager = new SimpleServiceManager();
         SimpleConnectionManager connectionManager = new SimpleConnectionManager();
         connectionManager.enableLogging(new AvalonToPostageLogger());
@@ -81,6 +83,11 @@
         serviceManager.put("org.apache.mailet.MailetContext", new TrivialMailContext());
         serviceManager.put("org.apache.james.services.MailServer", m_mailServer);
         serviceManager.put("org.apache.james.services.UsersRepository", null); //m_usersRepository);
+        DNSServer server = new DNSServer();
+        server.enableLogging(new AvalonToPostageLogger());
+        server.configure(new DefaultConfiguration("dnsserver"));
+        server.initialize();
+                serviceManager.put("org.apache.james.services.DNSServer", server);
         serviceManager.put(SocketManager.ROLE, this);
         serviceManager.put(ThreadManager.ROLE, this);
         return serviceManager;

Modified: james/postage/trunk/src/main/java/org/apache/james/postage/smtpserver/SimpleMailServer.java
URL: http://svn.apache.org/viewvc/james/postage/trunk/src/main/java/org/apache/james/postage/smtpserver/SimpleMailServer.java?rev=684439&r1=684438&r2=684439&view=diff
==============================================================================
--- james/postage/trunk/src/main/java/org/apache/james/postage/smtpserver/SimpleMailServer.java (original)
+++ james/postage/trunk/src/main/java/org/apache/james/postage/smtpserver/SimpleMailServer.java Sun Aug 10 02:59:02 2008
@@ -20,13 +20,7 @@
 
 package org.apache.james.postage.smtpserver;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.james.postage.result.MailProcessingRecord;
 import org.apache.james.postage.result.PostageRunnerResult;
-import org.apache.james.postage.mail.HeaderConstants;
-import org.apache.james.postage.mail.MailMatchingUtils;
-import org.apache.james.postage.mail.MailAnalyzeStrategy;
 import org.apache.james.services.MailRepository;
 import org.apache.james.services.MailServer;
 import org.apache.mailet.Mail;
@@ -36,7 +30,6 @@
 import javax.mail.MessagingException;
 import javax.mail.internet.InternetAddress;
 import javax.mail.internet.MimeMessage;
-import javax.mail.internet.MimeMultipart;
 
 import java.io.InputStream;
 import java.util.Collection;
@@ -49,8 +42,6 @@
  */
 public class SimpleMailServer implements MailServer {
 
-    private static Log log = LogFactory.getLog(SimpleMailServer.class);
-
     private int m_counter = 0;
     private PostageRunnerResult m_results;
 
@@ -108,5 +99,19 @@
     public void setResults(PostageRunnerResult results) {
         m_results = results;
     }
+
+    /* JAMES 3.0-SNAPSHOT specific methods */
+    
+    public String getDefaultDomain() {
+        return "localhost";
+    }
+
+    public String getHelloName() {
+        return "localhost";
+    }
+
+    public boolean supportVirtualHosting() {
+        return false;
+    }
 }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org