The following pom.xml is suitable to run main programs in java using maven
pom.xml
<build>
<plugins>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>2.3</version>
<configuration>
<goalPrefix>clean</goalPrefix>
<goalPrefix>install</goalPrefix>
<goalPrefix>run</goalPrefix>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.email.TestApp</mainClass>
</configuration>
</plugin>
</plugins>
</build>
No comments:
Post a Comment