Jayanthi Palanisamy
2018-12-07 06:52:36 UTC
Here with I am attaching my code
<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>AutogenerateEmail</groupId>
<artifactId>Emailviamaven</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Emailviamaven</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- Extent Report dependency -->
<dependency>
<groupId>com.relevantcodes</groupId>
<artifactId>extentreports</artifactId>
<version>2.41.1</version>
</dependency>
<!-- TestNG dependency -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.4</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!-- Suirefire plugin to run xml files -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<suiteXmlFiles>
<!-- TestNG suite XML files -->
<suiteXmlFile>TestSuites/sendmail.xml</suiteXmlFile>
<testErrorIgnore>true</testErrorIgnore>
<testFailureIgnore>true</testFailureIgnore>
</suiteXmlFiles>
</configuration>
</plugin>
<!-- Post-Man plugin -->
<plugin>
<groupId>ch.fortysix</groupId>
<artifactId>maven-postman-plugin</artifactId>
<executions>
<execution>
<id>send a mail</id>
<phase>test</phase>
<goals>
<goal>send-mail</goal>
</goals>
<inherited>true</inherited>
<configuration>
<!-- From Email address -->
<from>***@gmail.com</from>
<!-- Email subject -->
<subject>Test Automation Report</subject>
<htmlMessage>
<![CDATA[
<p>Hi, Please find
attached.Thanks,Jayanthi.P</p>
]]>
</htmlMessage>
<!-- Fail the build if the mail doesnt reach -->
<failonerror>true</failonerror>
<!-- host -->
<mailhost>smtp.gmail.com</mailhost>
<!-- port of the host -->
<mailport>465</mailport>
<mailssl>true</mailssl>
<mailAltConfig>true</mailAltConfig>
<!-- Email Authentication(USername and Password) -->
<mailuser>***@gmail.com</mailuser>
<mailpassword>******</mailpassword>
<receivers>
<!-- To Email address -->
<receiver>***@gmail.com</receiver>
</receivers>
<fileSets>
<fileSet>
<!-- Report directory Path -->
<directory>/data/User_Jayanthi/EclipseNeon/12.2
Workspace/Emailviamaven/Reports</directory>
<includes>
<!-- Report file name -->
<include>TestReport.html</include>
</includes>
<!-- Use Regular Expressions like **/*.html if you want all the html files
to send-->
</fileSet>
</fileSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
and error i got while doing maven install is below
INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model
for AutogenerateEmail:Emailviamaven:jar:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for
ch.fortysix:maven-postman-plugin is missing. @ line 77, column 10
[WARNING]
[WARNING] It is highly recommended to fix these problems because they
threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support
building such malformed projects.
[WARNING]
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building Emailviamaven 0.0.1-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
Emailviamaven ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/data/User_Jayanthi/EclipseNeon/12.2
Workspace/Emailviamaven/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @
Emailviamaven ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources)
@ Emailviamaven ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/data/User_Jayanthi/EclipseNeon/12.2
Workspace/Emailviamaven/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @
Emailviamaven ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ Emailviamaven
---
[INFO] Surefire report directory: /data/User_Jayanthi/EclipseNeon/12.2
Workspace/Emailviamaven/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1.983 s
[INFO] Finished at: 2018-12-07T11:44:45+05:30
[INFO] Final Memory: 10M/208M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test)
on project Emailviamaven: Execution default-test of goal
org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: There
was an error in the forked process
[ERROR] org.apache.maven.surefire.testset.TestSetFailedException: Suite
file /data/User_Jayanthi/EclipseNeon/12.2 Workspace/Emailviamaven/true is
not a valid file
[ERROR] at
org.apache.maven.surefire.testng.TestNGXmlTestSuite.locateTestSets(TestNGXmlTestSuite.java:116)
[ERROR] at
org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:83)
[ERROR] at
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
[ERROR] at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
[ERROR] at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Please help me in resolving....
<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>AutogenerateEmail</groupId>
<artifactId>Emailviamaven</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Emailviamaven</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- Extent Report dependency -->
<dependency>
<groupId>com.relevantcodes</groupId>
<artifactId>extentreports</artifactId>
<version>2.41.1</version>
</dependency>
<!-- TestNG dependency -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.4</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!-- Suirefire plugin to run xml files -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<suiteXmlFiles>
<!-- TestNG suite XML files -->
<suiteXmlFile>TestSuites/sendmail.xml</suiteXmlFile>
<testErrorIgnore>true</testErrorIgnore>
<testFailureIgnore>true</testFailureIgnore>
</suiteXmlFiles>
</configuration>
</plugin>
<!-- Post-Man plugin -->
<plugin>
<groupId>ch.fortysix</groupId>
<artifactId>maven-postman-plugin</artifactId>
<executions>
<execution>
<id>send a mail</id>
<phase>test</phase>
<goals>
<goal>send-mail</goal>
</goals>
<inherited>true</inherited>
<configuration>
<!-- From Email address -->
<from>***@gmail.com</from>
<!-- Email subject -->
<subject>Test Automation Report</subject>
<htmlMessage>
<![CDATA[
<p>Hi, Please find
attached.Thanks,Jayanthi.P</p>
]]>
</htmlMessage>
<!-- Fail the build if the mail doesnt reach -->
<failonerror>true</failonerror>
<!-- host -->
<mailhost>smtp.gmail.com</mailhost>
<!-- port of the host -->
<mailport>465</mailport>
<mailssl>true</mailssl>
<mailAltConfig>true</mailAltConfig>
<!-- Email Authentication(USername and Password) -->
<mailuser>***@gmail.com</mailuser>
<mailpassword>******</mailpassword>
<receivers>
<!-- To Email address -->
<receiver>***@gmail.com</receiver>
</receivers>
<fileSets>
<fileSet>
<!-- Report directory Path -->
<directory>/data/User_Jayanthi/EclipseNeon/12.2
Workspace/Emailviamaven/Reports</directory>
<includes>
<!-- Report file name -->
<include>TestReport.html</include>
</includes>
<!-- Use Regular Expressions like **/*.html if you want all the html files
to send-->
</fileSet>
</fileSets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
and error i got while doing maven install is below
INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model
for AutogenerateEmail:Emailviamaven:jar:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for
ch.fortysix:maven-postman-plugin is missing. @ line 77, column 10
[WARNING]
[WARNING] It is highly recommended to fix these problems because they
threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support
building such malformed projects.
[WARNING]
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building Emailviamaven 0.0.1-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
Emailviamaven ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/data/User_Jayanthi/EclipseNeon/12.2
Workspace/Emailviamaven/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @
Emailviamaven ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources)
@ Emailviamaven ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/data/User_Jayanthi/EclipseNeon/12.2
Workspace/Emailviamaven/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @
Emailviamaven ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ Emailviamaven
---
[INFO] Surefire report directory: /data/User_Jayanthi/EclipseNeon/12.2
Workspace/Emailviamaven/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1.983 s
[INFO] Finished at: 2018-12-07T11:44:45+05:30
[INFO] Final Memory: 10M/208M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test)
on project Emailviamaven: Execution default-test of goal
org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: There
was an error in the forked process
[ERROR] org.apache.maven.surefire.testset.TestSetFailedException: Suite
file /data/User_Jayanthi/EclipseNeon/12.2 Workspace/Emailviamaven/true is
not a valid file
[ERROR] at
org.apache.maven.surefire.testng.TestNGXmlTestSuite.locateTestSets(TestNGXmlTestSuite.java:116)
[ERROR] at
org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:83)
[ERROR] at
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
[ERROR] at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
[ERROR] at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Please help me in resolving....
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/81e6017d-b6e2-4d87-919c-b99b3b23ec82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+***@googlegroups.com.
To post to this group, send email to selenium-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/81e6017d-b6e2-4d87-919c-b99b3b23ec82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.