Open arey opened 1 year ago
Thanks @arey for reporting. Will take a look.
I have a similar problem, in my multi-module project, the directory structure is similar to the following:
The error I get when I try to run the just run rest
command is:
java.nio.file.NoSuchFileException: /xxx/parent/src/main
at java.base@17.0.5/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base@17.0.5/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:148)
at java.base@17.0.5/java.nio.file.Files.readAttributes(Files.java:1851)
at java.base@17.0.5/java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:220)
at java.base@17.0.5/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:277)
at java.base@17.0.5/java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:323)
at java.base@17.0.5/java.nio.file.Files.walkFileTree(Files.java:2804)
at java.base@17.0.5/java.nio.file.Files.walkFileTree(Files.java:2882)
at io.methvin.watcher.PathUtils.recursiveVisitFiles(PathUtils.java:108)
at io.methvin.watcher.PathUtils.initWatcherState(PathUtils.java:78)
at io.methvin.watcher.DirectoryWatcher.<init>(DirectoryWatcher.java:190)
at io.methvin.watcher.DirectoryWatcher$Builder.build(DirectoryWatcher.java:122)
In fact I don't need to create the src
directory in the parent
module.
I tried to start just run rest
after creating the src
directory but there are also errors:
spring | ------------------------------------------------------------------------
spring | [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.3.2.RELEASE:run (default-cli) on project parent: Unable to find a suitable main class, please add a 'mainClass' property -> [Help 1]
spring | [ERROR]
spring | [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
spring | [ERROR] Re-run Maven using the -X switch to enable full debug logging.
spring | [ERROR]
spring | [ERROR] For more information about the errors and possible solutions, please read the following articles:
spring | [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
spring | [ERROR]
spring | [ERROR] After correcting the problems, you can resume the build with the command
spring | [ERROR] mvn <args> -rf :parent
It looks like I'm looking for the startup class in the parent
module, but actually my startup class is in the rest
module.
I've tried the 0.0.13 version including the "Support for multi-module maven project" feature #18 From my application based on the hexagonal architecture I got a NullPointerException
My maven modules look like :