Is it possible to have two mainClass in the pom.xml or be able to run two classes in the same pom.xml?



I am working on a java project. We use Continuous Integration with maven 3, svn and Jenkins. We have one utility java project in which we've implemented some useful features. We build a jenkins tasks to run the mainClass in this project. Here is the code snippet on project pom.xml :



<plugin>
..
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.ent.uti.Cleaner</mainClass>
<arguments>
<argument>value1</argument>
<argument>value2</argument>
</arguments>
</configuration>
</plugin>


This class is execute in jenkins task configuration :



mvn exec:java -o -f cleaner/pom.xml


I am wondering if it is possible for me to implement some features in the same project and add another task in Jenkins ? Is it possible to have two main classes in the same pom.xml configuration ?


I know i could create another project and configure a mainClass in the pom. I think doing so is not a good idea. The both task are independant so it's not suitable to run the both class one after another.


Thanks for reading.


No comments:

Post a Comment