0

Eclipse STS 4.10/linux を使用。

次のようなマルチモジュール プロジェクトがあります。

-rootFolder
-web (Web アプリ)
-dataservice (サービス、ドメイン ロジック)
-datadef (モデル、リポジトリ)

依存関係 build.gradle が示すように、web には dataservice があります。

dependencies {
    compile project(':dataservice')
    implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
    implementation 'org.springframework.boot:spring-boot-starter-web'
///
}

依存関係 build.gradle が示すように、dataservice には datadef があります。

dependencies {
    compile project(':datadef')
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
///
}

私が達成できないのは、 datadef-1.0.0-SNAPSHOT.jar が dataservice-1.0.0-SNAPSHOT.jar ファイルに含まれていることです。ただし、どちらも web.app に含まれています。Eclipse は、datadef プロジェクトのデータサービスの参照を「失い」、datadef からのすべてをエラーとして扱うことがあります。

データサービス プロジェクトの .classpath ファイルを貼り付けています。これは、datadef への依存関係を示しています。

<classpath>
    <classpathentry kind="output" path="bin/default"/>
    <classpathentry output="bin/main" kind="src" path="src/main/java">
        <attributes>
            <attribute name="gradle_scope" value="main"/>
            <attribute name="gradle_used_by_scope" value="main,test"/>
        </attributes>
    </classpathentry>
    <classpathentry output="bin/main" kind="src" path="src/main/resources">
        <attributes>
            <attribute name="gradle_scope" value="main"/>
            <attribute name="gradle_used_by_scope" value="main,test"/>
        </attributes>
    </classpathentry>
    <classpathentry output="bin/test" kind="src" path="src/test/java">
        <attributes>
            <attribute name="gradle_scope" value="test"/>
            <attribute name="gradle_used_by_scope" value="test"/>
            <attribute name="test" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
    <classpathentry kind="src" path="/datadef">
...```


Thank you.
4

0 に答える 0