java directory not marked az source directory

时间:2019-01-07 13:58:14

标签: java maven

I build a multi module project using maven. structure of my project is like this: enter image description here

In plugins/local java directory is not marked as source root. when mark it as source root and create class inside it, dependency in parent pom not recognize.

The parent pom is:

<groupId>my.company.inquiry</groupId>
<artifactId>InquiryManager</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<modules>
    <module>inquiry-manager-core</module>
    <module>inquiry-manager-simulator</module>
    <module>plugins/local</module>
</modules>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.10.RELEASE</version>
</parent>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
            <version>1.5.10.RELEASE</version>
        </dependency>
    </dependencies>

The child module pom is:

<parent>
    <artifactId>InquiryManager</artifactId>
    <groupId>my.company.inquiry</groupId>
    <version>1.0-SNAPSHOT</version>
    <relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>my.company.inquiry.plugins.local</groupId>
<artifactId>local-plugin</artifactId>
<version>1.0-SNAPSHOT</version>

How can I solve this problem?

0 个答案:

没有答案