You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jason Rogers <ja...@tumbleweed.com> on 2001/09/14 15:22:18 UTC

need help with email listener

Below is my ant commandline and output.  I am having trouble with the
listener.  The trouble is that it isn't complaining about anything being
wrong at runtime, but it doesn't send the email.  I have done independent
validations on the smtp server and email address found in the properties
file to prove that they are correct.  With those validations I receive the
email as I think I should.  What makes me think that all is not "hunky-dory"
with the monitor is that after the build I see the line
"javax/activation/DataSource"...  Has anyone run into this before?  I am
also including the contents of my monitor.properties file after the build
info.  Thanks in advance!

-Jason

<build_info>
ant -Dbasedir=/working -Dtests.notrequired=true -Dcvs.noupdate=true
-listener BuildMonitor -logfile build.log
Buildfile: build.xml

init:
     [echo] Built on September 14 2001 at 0912

co:

mkdirs:
    [mkdir] Created dir: C:\working\Apps\PostOffice\build\classes

src:
    [javac] Compiling 46 source files to
C:\working\Apps\PostOffice\build\classes
      [jar] Building jar:
C:\working\Apps\PostOffice\build\lib\postoffice.jar

samples:
    [javac] Compiling 12 source files to
C:\working\Apps\PostOffice\build\classes
      [jar] Building jar:
C:\working\Apps\PostOffice\build\lib\postofficeSamples.jar

tests:

javadoc_check:

javadocs:

clean:
   [delete] Deleting directory C:\working\Apps\PostOffice\build\classes

BUILD SUCCESSFUL

Total time: 7 seconds
javax/activation/DataSource
</build_info>

<props_file>
# configuration for build monitor

mail.transport.protocol=smtp
mail.smtp.host=exch.mi.tumbleweed.com
mail.from=Jason Rogers <jr...@intface.com>

build.log=build.log

build.failed.notify=true
build.failed.email.to=jrog@intface.com
build.failed.email.subject=Nightly build failed!

build.succeeded.notify=true
build.succeeded.email.to=jrog@intface.com
build.succeeded.email.subject=Nightly build succeeded!
</props_file>


Re: need help with email listener

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
Do you have Sun's activation.jar in your classpath when you run Ant?

You'll need that.   Its available at:
http://java.sun.com/products/javabeans/glasgow/jaf.html

One thing I have on my Ant to-do list is to submit a version of that e-mail
code to be included in the Ant core distribution since its a very commonly
requested feature.   The particular code that is in the Ant FAQ probably
will need to be modified to use the older Java 1.1 way of sending an e-mail
rather than using JAF (all it does is put text in the body of the message,
does not make an attachment anyway).

I'm also considering modifying Ant such that build listeners can be attached
dynamically through build.xml definitions (the main caveat is that at the
very least the build started message would not be sent to those listeners).

    Erik

----- Original Message -----
From: "Jason Rogers" <ja...@tumbleweed.com>
To: "Ant Users (E-mail)" <an...@jakarta.apache.org>
Cc: <wi...@jda.com>
Sent: Friday, September 14, 2001 6:22 AM
Subject: need help with email listener


> Below is my ant commandline and output.  I am having trouble with the
> listener.  The trouble is that it isn't complaining about anything being
> wrong at runtime, but it doesn't send the email.  I have done independent
> validations on the smtp server and email address found in the properties
> file to prove that they are correct.  With those validations I receive the
> email as I think I should.  What makes me think that all is not
"hunky-dory"
> with the monitor is that after the build I see the line
> "javax/activation/DataSource"...  Has anyone run into this before?  I am
> also including the contents of my monitor.properties file after the build
> info.  Thanks in advance!
>
> -Jason
>
> <build_info>
> ant -Dbasedir=/working -Dtests.notrequired=true -Dcvs.noupdate=true
> -listener BuildMonitor -logfile build.log
> Buildfile: build.xml
>
> init:
>      [echo] Built on September 14 2001 at 0912
>
> co:
>
> mkdirs:
>     [mkdir] Created dir: C:\working\Apps\PostOffice\build\classes
>
> src:
>     [javac] Compiling 46 source files to
> C:\working\Apps\PostOffice\build\classes
>       [jar] Building jar:
> C:\working\Apps\PostOffice\build\lib\postoffice.jar
>
> samples:
>     [javac] Compiling 12 source files to
> C:\working\Apps\PostOffice\build\classes
>       [jar] Building jar:
> C:\working\Apps\PostOffice\build\lib\postofficeSamples.jar
>
> tests:
>
> javadoc_check:
>
> javadocs:
>
> clean:
>    [delete] Deleting directory C:\working\Apps\PostOffice\build\classes
>
> BUILD SUCCESSFUL
>
> Total time: 7 seconds
> javax/activation/DataSource
> </build_info>
>
> <props_file>
> # configuration for build monitor
>
> mail.transport.protocol=smtp
> mail.smtp.host=exch.mi.tumbleweed.com
> mail.from=Jason Rogers <jr...@intface.com>
>
> build.log=build.log
>
> build.failed.notify=true
> build.failed.email.to=jrog@intface.com
> build.failed.email.subject=Nightly build failed!
>
> build.succeeded.notify=true
> build.succeeded.email.to=jrog@intface.com
> build.succeeded.email.subject=Nightly build succeeded!
> </props_file>
>
>