Is there any plan to support maven multiple module project?
See original GitHub issueCan not auto detect source code in sub module. Even if I add the source folder manually, the dependency packages still can not be found.
Parent pom:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.1.RELEASE</version>
<relativePath />
</parent>
<groupId>net.jaggerwang</groupId>
<artifactId>spring-cloud-in-practice</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>spring-cloud-in-practice</name>
<description>Spring cloud in practice</description>
<properties>
<java.version>11</java.version>
<graphql-starter.version>6.0.0</graphql-starter.version>
<guava.version>28.1-jre</guava.version>
<scip-library.version>1.0-SNAPSHOT</scip-library.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
...
</dependencies>
<modules>
<module>spring-cloud-in-practice-library</module>
<module>spring-cloud-in-practice-user</module>
<module>spring-cloud-in-practice-post</module>
<module>spring-cloud-in-practice-file</module>
<module>spring-cloud-in-practice-stat</module>
<module>spring-cloud-in-practice-metric</module>
</modules>
</project>
One of sub module pom:
<?xml version="1.0" ?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.jaggerwang</groupId>
<artifactId>spring-cloud-in-practice</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>net.jaggerwang</groupId>
<artifactId>spring-cloud-in-practice-user</artifactId>
<version>1.0-SNAPSHOT</version>
<name>spring-cloud-in-practice-user</name>
<description>Spring cloud in practice user service</description>
<properties>
<start-class>net.jaggerwang.scip.api.ScipUserApplication</start-class>
</properties>
<dependencies>
<dependency>
<groupId>net.jaggerwang</groupId>
<artifactId>spring-cloud-in-practice-library</artifactId>
<version>${scip-library.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources/java</outputDirectory>
<processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Environment
- Operating System: macOS
- JDK version: 11
- Visual Studio Code version: 1.41.0
- Java extension version: 0.8.1
Issue Analytics
- State:
- Created 4 years ago
- Reactions:12
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Multi-Module Project with Maven - Baeldung
A multi -module project is built from an aggregator POM that manages a group of submodules. In most cases, the aggregator is located...
Read more >Multi-module projects and maven central - java - Stack Overflow
I am planning a multi-module maven project. ... My Questions: 1. Is a multi-module maven project the correct approach to achieve these aims?...
Read more >Top 5 Exciting Maven Multi-Module Project Ideas & Topics for ...
Want to take a step ahead in your maven learning journey? Check out the top 5 exciting maven multi-module project ideas and topics...
Read more >Multi-module project builds with Maven and Gradle
Every single one of those notes represents a session where JCrete participants poured their passion to share and exchange ideas. On Tuesday ...
Read more >Should we use a Maven Multi-Module Project in our Scenario?
One in the Team proposed as a solution to above problems to merge all git repositories and projects into one git repository and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same issue, tried almost every option, but could not resolve it. Unfortunately, I could not share the actual project or reproduce the issue on a smaller instance.
Environment Operating System: Ubuntu 18.04 Openjdk: “11.0.5” Visual Studio Code version: 1.41.1 Java version: 8
Note quite relevant, but as a feature, it would be great to improve the option “Add Folder To Java Source Path” to also handle maven projects. This option is available for a folder in the explorer, but for maven projects it shows the following:
“Unsupported operation. Please use pom.xml file to manage the source directories of maven project.”
In addition, there is an “Attach Source” option in the .class files, it sometimes works but it does not remember this action next time you run vscode.
The recent logs is as following: