​My question is that I wanted to execute a testNG suite file and a java
program one after other using a POM.xml. 

Please help me out with a code snippet that actually does this execution. 


Below is my code that is currently running my test scripts of testng.xml,
and I want to add a code for executing a separate Java(Main)​ class. Please
add the code for executing my java program in it. 

         <build> 
                    <plugins> 
                          <plugin> 
                                <groupId>org.apache.maven.plugins</groupId> 
                               
<artifactId>maven-surefire-plugin</artifactId> 
                                <version>2.17</version> 
                                <configuration> 
                                        <argLine> 
                                               
-javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
 
                                        </argLine> 
                                                <suiteXmlFiles> 
                                               
<suiteXmlFile>${basedir}\testng.xml</suiteXmlFile> 
                                        </suiteXmlFiles> 
                                       
<outputDirectory>${basedir}/results</outputDirectory> 
                                </configuration> 
                                <dependencies> 
                                        <dependency> 
                                               
<groupId>org.aspectj</groupId> 
                                               
<artifactId>aspectjweaver</artifactId> 
                                               
<version>${aspectj.version}</version> 
                                        </dependency> 
                                </dependencies> 
                        </plugin> 
                </plugins> 
        </build>



--
View this message in context: 
http://maven.40175.n5.nabble.com/Need-help-in-executing-a-Java-program-and-testng-xml-one-after-other-using-Maven-tp5863066.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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

Reply via email to