maven - Run Main Class in Spring In Action 3 -


i imported spring in action 3. how have modify pom.xml run main class instead of or additional junit test? added following plugin parent pom.xml, not executed.

      <plugin>             <groupid>org.codehaus.mojo</groupid>             <artifactid>exec-maven-plugin</artifactid>             <version>1.2.1</version>             <executions>                 <execution>                     <goals>                         <goal>java</goal>                     </goals>                 </execution>             </executions>             <configuration>                 <mainclass>com.springinaction.knights.knightmain</mainclass>             </configuration>         </plugin> 

you need bind execution of plugin test phase, example

        <executions>            <execution>               <id>run-class-as-part-of-tests</id>               <phase>test</phase>               <goals>                  <goal>java</goal>               </goals>            </execution>         </executions> 

this won't stop running unit tests, maven-surefire-plugin (which runs tests) bound test phase too. if want skip tests, need set property skip true of maven-surefire-plugin (check documentation here)


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -