ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <rambiusparkisan...@yahoo.com>
Subject <loadproperties> issues
Date Fri, 17 Dec 2004 12:19:22 GMT
Dear Colleagues,

Today I noticed that our night build scripts have
stooped sending their emails with MailLogger and after
4 hours of debugging I found what is the problem. I
define MailLogger properties in global.properties
file:

MailLogger.mailhost=mysmtp.mydomain.com
MailLogger.port=25
MailLogger.user=night.build
MailLogger.password=darksecret
MailLogger.from=night.build@mydomain.com
MailLogger.replyto=night.build@mydomain.com
MailLogger.failure.notify=true
MailLogger.success.notify=true
MailLogger.failure.to=receiver@mydomain.com
MailLogger.success.to=receiver@mydomain.com
MailLogger.failure.subject=Build Failed for ${product}
on ${FULLDATE}
MailLogger.success.subject=Build Succeeded for
${product} on ${FULLDATE}

The error was that the line
MailLogger.success.to=receiver@mydomain.com
ends with a space:
MailLogger.success.to=receiver@mydomain.com<Space_comes_here>.

Now I removed the wrong space and it works likes a
charm. Please note that if we place a space after
MailLogger.mailhost=mysmtp.mydomain.com 
it fails with
javax.mail.SendFailedException: Sending failed;
  nested exception is:
        class javax.mail.MessagingException: Unknown
SMTP host: mysmtp.mydomain.com ;
i.e. we can see the error. But if the space is after
MailLogger.success.to line, Ant send the email but to
wrong address.

I checked the documentation of <property file="...">
and <loadproperties> tasks but this behaviour is not
documented.
I would also suggest that we add a trim attribute (and
I am a volunteer for it) to <loadproperties> that will
trim the properties' values.

Regards Ivan


		
__________________________________ 
Do you Yahoo!? 
Send a seasonal email greeting and help others. Do
good. 
http://celebrity.mail.yahoo.com

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message