Arg. I dag er tydeligvis «make maven work»-day. Feilmeldingen over forsvinner når du stikker dette inn i POM-filen din:
<plug</plugin><plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1</version> <executions> <execution> <goals> <goal>exec</goal> </goals> </execution> </executions> <configuration> <executable>maven</executable> <!-- optional --> </configuration> </plugin>
(inni «plugins» i tre-strukturen). Det siste som gjenstår da, er å fortelle maven hvilken klasse som inneholder din main.Her kommer maven faktisk med en hjelpsom feilmelding. Den sier:
[0] Inside the definition for plugin ‘exec-maven-plugin’ specify the following: <configuration> … <mainClass>VALUE</mainClass> </configuration> -OR- on the command line, specify: ‘-Dexec.mainClass=VALUE’
Så der. Da kjører det!