You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stephane-3 <mi...@yahoo.se> on 2012/04/21 19:36:15 UTC

Re: Build on test target hangs when using an SMTP appender in the log4j configuration

So I removed the file spring-smtp-appender.xml

Then I added a debug property:

		

as in:

	<appender name="mailAppender" class="org.apache.log4j.net.SMTPAppender">
		

I also added the port property:

		

When I then ran the build I could see the following output in the console
log:

DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 465, isSSL
false

But the SSL should be ttrue for the gmail smtp.

Here is what Google requires:

Server: smtp.gmail.com
Port: 465
Connection secutiry: SSL
Authentication: Normal password

So I googled and found out about the SSL property and added it:

		

The full smtp appender now looks like:

	<appender name="mailAppender" class="org.apache.log4j.net.SMTPAppender">
		
		
		
		
		
		
		
		
		
		
		
		<layout class="org.apache.log4j.PatternLayout">
			
		</layout>
		<filter class="org.apache.log4j.varia.LevelRangeFilter">
			
			
		</filter>
	</appender>

I'm also using slf4j instead of log4j as:

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.6.4</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.6.4</version>
      </dependency>

But the issue remains the same and the build hangs.



--
View this message in context: http://maven.40175.n5.nabble.com/Build-on-test-target-hangs-when-using-an-SMTP-appender-in-the-log4j-configuration-tp5459477p5656537.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Build on test target hangs when using an SMTP appender in the log4j configuration

Posted by Stephane-3 <mi...@yahoo.se>.
Hi Wayne,

In fact it was a strange java behavior. 

After rebooting my pc Lenovo X60 with Linux Mint 12 the build worked fine.

The mails were sent containing the exceptions.

The issue is closed.

Thanks.



--
View this message in context: http://maven.40175.n5.nabble.com/Build-on-test-target-hangs-when-using-an-SMTP-appender-in-the-log4j-configuration-tp5459477p5656684.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Build on test target hangs when using an SMTP appender in the log4j configuration

Posted by Wayne Fay <wa...@gmail.com>.
> So I removed the file spring-smtp-appender.xml
...lots of lines of Spring configuration...
...brief mention of dependendencies...
> But the issue remains the same and the build hangs.

I don't think you're getting any traction on your questions here
because this is not the right place to ask this question.

Ask for help @ Spring list/forum. Maven has very little to do with your issue.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org