If I have a project with maven folders, one of them contains the main class that should be launched (and can be launched from there), how should I make Eclipse and Maven to launch that class when I choose Run as
- Java Application
from the head folder?
Edit:
The maven-exec-plugin does not help:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>use_annotations.UseAnnotationsLaunch</mainClass>
</configuration>
</execution>
</executions> </plugin>
Does not show any errors, but the head project cannot launch use_annotations.UseAnnotationsLaunch.main. I am getting "Selection does not contain a main type"
Notice, that Maven compile command calls compile for maven modules correctly. It is the problem of eclipse and maven modules.