Neverwinter nights: enhanced edition 1 78. Mail Suite manage Mail like a Maven With Mojave, we have consolidated our 4 plugins into a single product with a single installer. MailSuite provides four powerful components in a single Mail plugin: Organize messages with.MailTags'. Keywords, Projects, due dates and more.
- Spring Best Practices Maven Pom. GitHub Gist: instantly share code, notes, and snippets.
- Project Structure. Our project structure looks like the following: Maven Dependencies. We use Apache Maven to manage our project dependencies. Make sure the following dependencies reside on your class-path.
POM is an acronym for Project Object Model. The pom.xml file contains information of project and configuration information for the maven to build the project such as dependencies, build directory, source directory, test source directory, plugin, goals etc.
Maven reads the pom.xml file, then executes the goal.
Before maven 2, it was named as project.xml file. But, since maven 2 (also in maven 3), it is renamed as pom.xml.
Elements of maven pom.xml file
For creating the simple pom.xml file, you need to have following elements:
Element | Description |
---|---|
project | It is the root element of pom.xml file. |
modelVersion | It is the sub element of project. It specifies the modelVersion. It should be set to 4.0.0. |
groupId | It is the sub element of project. It specifies the id for the project group. |
artifactId | It is the sub element of project. It specifies the id for the artifact (project). An artifact is something that is either produced or used by a project. Examples of artifacts produced by Maven for a project include: JARs, source and binary distributions, and WARs. |
version | It is the sub element of project. It specifies the version of the artifact under given group. |
Maven pom.xml file with additional elements
Here, we are going to add other elements in pom.xml file such as:
Element | Description |
---|---|
packaging | defines packaging type such as jar, war etc. |
name | defines name of the maven project. |
url | defines url of the project. |
dependencies | defines dependencies for this project. |
dependency | defines a dependency. It is used inside dependencies. |
scope | defines scope for this maven project. It can be compile, provided, runtime, test and system. |
- Optional 'thank-you' note:
- Optional 'thank-you' note:
this is my pom.xml file
Mailsuite 1 0 2 – Manage Mail Like A Maven File
- Optional 'thank-you' note:
- Optional 'thank-you' note:
- Optional 'thank-you' note:
why am not recieving any emails??
- Optional 'thank-you' note:
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).
- Optional 'thank-you' note:
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??
- Optional 'thank-you' note:
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.
- Optional 'thank-you' note:
i changed the phase to site and it downloaded some required plugins but i get the error as above
- Optional 'thank-you' note:
- Optional 'thank-you' note:
- Optional 'thank-you' note:
- Optional 'thank-you' note:
I will surely test with the above command
For creating the simple pom.xml file, you need to have following elements:
Element | Description |
---|---|
project | It is the root element of pom.xml file. |
modelVersion | It is the sub element of project. It specifies the modelVersion. It should be set to 4.0.0. |
groupId | It is the sub element of project. It specifies the id for the project group. |
artifactId | It is the sub element of project. It specifies the id for the artifact (project). An artifact is something that is either produced or used by a project. Examples of artifacts produced by Maven for a project include: JARs, source and binary distributions, and WARs. |
version | It is the sub element of project. It specifies the version of the artifact under given group. |
Maven pom.xml file with additional elements
Here, we are going to add other elements in pom.xml file such as:
Element | Description |
---|---|
packaging | defines packaging type such as jar, war etc. |
name | defines name of the maven project. |
url | defines url of the project. |
dependencies | defines dependencies for this project. |
dependency | defines a dependency. It is used inside dependencies. |
scope | defines scope for this maven project. It can be compile, provided, runtime, test and system. |
- Optional 'thank-you' note:
- Optional 'thank-you' note:
this is my pom.xml file
Mailsuite 1 0 2 – Manage Mail Like A Maven File
- Optional 'thank-you' note:
- Optional 'thank-you' note:
- Optional 'thank-you' note:
why am not recieving any emails??
- Optional 'thank-you' note:
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).
- Optional 'thank-you' note:
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??
- Optional 'thank-you' note:
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.
- Optional 'thank-you' note:
i changed the phase to site and it downloaded some required plugins but i get the error as above
- Optional 'thank-you' note:
- Optional 'thank-you' note:
- Optional 'thank-you' note:
- Optional 'thank-you' note:
I will surely test with the above command
Mailsuite 1 0 2 – Manage Mail Like A Maven Download
posted 9 years ago- Optional 'thank-you' note:
I tried to ping smtp.mycompany.com but i got the error as below
Ping request could not find host smtp.mycompany.com. Please check the name and try again.
- Optional 'thank-you' note:
- Optional 'thank-you' note:
- Optional 'thank-you' note:
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
<project xmlns='http://maven.apache.org/POM/4.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd'> <modelVersion>4.0.0</modelVersion> <groupId>com.tutorvista.qa</groupId> <artifactId>autotestlive</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>autotestlive</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-server</artifactId> <version>2.17.0</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.persistence</groupId> <artifactId>persistence-api</artifactId> <version>1.0</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>ch.fortysix</groupId> <artifactId>maven-postman-plugin</artifactId> <version>0.1.6</version> <executions> <execution> <id>send_an_email</id> <phase>test</phase> <goals> <goal>send-mail</goal> </goals> <inherited>false</inherited> <configuration> <mailhost>smtp.gmail.com</mailhost> <mailport>465</mailport> <mailssl>true</mailssl> <mailAltConfig>true</mailAltConfig> <mailuser>abcd@gmail.com</mailuser> <mailpassword>abcd</mailpassword> <from>tutorvista.qa@gmail.com</from> <receivers> <receiver>xyz@abcd.com</receiver> <receiver>abc@xyz.com</receiver> </receivers> <subject>Test Automation Report </subject> <failonerror>true</failonerror> <htmlMessageFile> ${basedir}/target/site/surefire-report.html </htmlMessageFile> </configuration> </execution> </executions> </plugin> </plugins> </build> <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <version>2.12</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> <version>2.1.1</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> <version>3.0</version> <configuration> <generateSitemap>true</generateSitemap> <generateReports>true</generateReports> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jxr-plugin</artifactId> <version>2.1</version> </plugin> </plugins> </reporting> </project>
what changes i need to do?
- Optional 'thank-you' note:
or any more plugins need to be added?