execute maven mainclass multiple times with different sets of arguments -


how can invoke maven mainclass multiple times different arguments

<build> <plugins>     <plugin>         <groupid>org.codehaus.mojo</groupid>         <artifactid>exec-maven-plugin</artifactid>         <version>1.2.1</version>         <configuration>             <mainclass>testexecutioninitiator</mainclass>             <classpathscope>test</classpathscope>             <arguments>                 <argument>chrome</argument>             </arguments>         </configuration>     </plugin> </plugins> 

so far initiate main class passing argument 'chrome'. want invoke main class argument firefox. when run mvn exec:java main class should invoke multiple times.

you can use several executions following:

<plugins>     <plugin>         <groupid>org.codehaus.mojo</groupid>         <artifactid>exec-maven-plugin</artifactid>         <version>1.2.1</version>         <executions>           <execution>             <id>exec-1</id>             <phase>test</phase>             <goals><goal>exec</goal></goals>             <configuration>               <mainclass>testexecutioninitiator</mainclass>               <classpathscope>test</classpathscope>               <arguments>                   <argument>chrome</argument>               </arguments>             </configuration>           </execution>           <execution>             <id>exec-2</id>             <phase>test</phase>             <goals><goal>exec</goal></goals>             <configuration>               whatever configuration             </configuration>           </execution>         </executions>     </plugin> </plugins> 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -