I have a simple maven project using Micronaut. I'm trying to create a new module and make the typical 'WelcomeController', and communicate that module with the parent pom.
I can run it command-line via mvn exec:exec
but running it with the IDE (IntelliJ IDEA) doesn't work for me. I got the following error:
Error: Could not find or load main class com.example.Application
Caused by: java.lang.ClassNotFoundException: com.example.Application
Child pom:
<parent>
<groupId>com.example.reports</groupId>
<artifactId>tnt-assignment-back</artifactId>
<version>0.1</version>
</parent>
<artifactId>tnt-rest</artifactId>
<description>Rest module for tnt-assignment</description>
<properties>
<exec.mainClass>com.example.reports.Application</exec.mainClass>
</properties>
Parent pom:
<parent>
<groupId>io.micronaut</groupId>
<artifactId>micronaut-parent</artifactId>
<version>2.2.1</version>
</parent>
<groupId>com.example.reports</groupId>
<artifactId>tnt-assignment-back</artifactId>
<version>0.1</version>
<packaging>pom</packaging>
<modules>
<module>tnt-rest</module>
</modules>
Any ideas? I've tried many things but still don't go. Thanks.