File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how do i send a email test report from maven

 
linda russel
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any idea of which plugin to use in pom.xml and other changes required for it?
 
linda russel
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator




this is my pom.xml file
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
 
linda russel
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there anything else i should do in order to get the email other than adding the above mentioned postman plugin to my pom.xml


 
linda russel
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



why am not recieving any emails??
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your configuration seems correct (at least according to http://support.google.com/mail/bin/answer.py?hl=en&answer=13287)

Does running with -X provide any clues? Have you tried the same settings in another app?

As an aside, I wouldn't send email from Maven itself. I'd have Jenkins fire off the build and send an email after it was completed. That way only official builds would result in email notifications. Or just let interested parties subscribe to the RSS feed for the job in Jenkins. Or they could subscribe to the RSS feeds in Nexus (which is where we deploy our artifacts).
 
linda russel
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I ran mvn test command from the command line.

one more thing is that i am still not sure that from which location the Test reports will be fetched if at all it is fetched in the first place!!!

Do i need to run any other command in order to get the email of test reports.

is the port number correct for the emai??
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Linda

You have defined your plugin to run under the 'deploy' phase. However, you are only running up to 'test' so no attempt to send the email is made.

Try mvn clean deploy instead.
 
linda russel
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



i changed the phase to site and it downloaded some required plugins but i get the error as above
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try running with -X to see if that provides additional details on the error. Looks like there is something wrong with the configuration.
 
linda russel
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is it like mvn -X site from command line?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not "mvn -X site", rather "mvn -X deploy" because you have email configured to run during deploy.
 
linda russel
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.

I will surely test with the above command
 
linda russel
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Finally i got a email but i got it only when i used GMAIL . but when i tried with my company email it failed.


I tried to ping smtp.mycompany.com but i got the error as below



 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will have to contact your IT department to find out the proper settings for connecting to the corporate email system. I have the same issue with the Exchange server in my company - I cannot programmatically access the same Exchange server that I access via Outlook. Instead, there is different server that was set up to handle programmatic connections, and I have to target that one.
 
linda russel
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks :-)
 
linda russel
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator




i get the above error when my mvn test finishes. i do not understand why surefire-report.html is not getting generated !!!

my pom.xml is pasted below





what changes i need to do?
 
linda russel
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there any command i need to run to get the site folder and surefire-report.html under it?


or any more plugins need to be added?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic