Невозможно выполнить задачу bootJar при компиляции / реализации другого проекта - PullRequest
0 голосов
/ 07 июля 2019

Что произошло, когда извините bootJar или run:

> Task :common:compileJava
> Task :common:processResources NO-SOURCE
> Task :common:classes
> Task :common:jar SKIPPED

> Task :api:compileJava FAILED
D:\workspace\IDEA\bootar\api\src\main\java\com\sample\Application.java:3:
 ����: �����com.sample.common������// looks like package or class not found.
import com.sample.common.CommonClazz;
                        ^
D:\workspace\IDEA\bootar\api\src\main\java\com\sample\Application.java:23:
 ����: �Ҳ�������
    public CommonClazz test() {
           ^
  ����:   �� CommonClazz
  �: �� Application
2 ������

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':api:compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
2 actionable tasks: 2 executed

Собственно, сам проект очень прост: Project structure

ифайлы gradle: enter image description here

Среда IDE может найти CommonClazz и импортировать ее в Application, но когда я пытаюсь запустить или построить модуль api, она не удалась.

Я использую:

IntelliJ IDEA 2019.2 EAP (Ultimate Edition)
Build #IU-192.5587.17, built on July 3, 2019
Runtime version: 11.0.3+12-b304.10 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1270M
Cores: 4
Registry: debugger.watches.in.variables=false, git.explicit.commit.renames.prohibit.multiple.calls=false
Non-Bundled Plugins: Key Promoter X, Lombook Plugin, Property Sorter, cn.yiiguxing.plugin.translate, mobi.hsz.idea.gitignore, GradleDependenciesHelper, com.vladsch.idea.multimarkdown

spring-boot-gradle-plugin:2.1.6.RELEASE
springCloudVersion Greenwich.SR1
...