提交 8ee94a43 编写于 作者: S Sam Brannen

Eclipse project deps come after third-party libs

Prior to this commit, the ordering of classpath entries in the
generated Eclipse .classpath files did not align with the intended
dependency management configured in the Gradle build. Specifically,
project dependencies often came before dependencies on third-party
libraries required for the given project, causing the project not to
compile in Eclipse.

This commit fixes this issue by introducing new functionality in the
ide.gradle script that moves all project dependencies to the end of the
generated classpath.

Issue: SPR-11836
上级 4b291c66
......@@ -47,10 +47,21 @@ eclipse.classpath.file.whenMerged { classpath ->
}
}
// Ensure project dependencies come after 3rd-party libs (SPR-11836)
// https://jira.spring.io/browse/SPR-11836
eclipse.classpath.file.whenMerged { classpath ->
def projectOutputDependencies = classpath.entries.findAll { entry -> entry instanceof ProjectDependency }
projectOutputDependencies.each { entry ->
// delete from original position
classpath.entries.remove(entry)
// append to end of classpath
classpath.entries.add(entry)
}
}
// Allow projects to be used as WPT modules
eclipse.project.natures "org.eclipse.wst.common.project.facet.core.nature"
// Include project specific settings
task eclipseSettings(type: Copy) {
from rootProject.files(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册