Comments (3)
We probably need to expose classpath per scope, i.e. compile vs test for Maven, but also runtime/provided.
For Gradle projects, scope is a more "open" notion, not only are the scopes named differently (compile, compileTest) but it's open to customization. We need a way to extract those informations from Buildship's APIs, ideally. @oehme, @donat any pointers?
from eclipse.jdt.ls.
Note: with Java 9's modulepath, we have an extra level of project dependencies
from eclipse.jdt.ls.
@fbricon Actually, we're in the process of adding support separating scopes in the Eclipse runtime classpath. See the related issue and my feature branch. Basically, the idea is that the Gradle eclipse
plugin produces extra classpath attributes describing dependency scopes:
Here's an example .classpath
file:
<classpath>
<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"/>
</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="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry path="bin/default" kind="output"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry sourcepath="/Users/donat/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/a6c32b40bf3d76eca54e3c601e5d1470c86fcdfa/junit-4.12-sources.jar" kind="lib" path="/Users/donat/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar">
<attributes>
<attribute name="gradle_used_by_scope" value="test"/>
</attributes>
</classpathentry>
</classpath>
The scope information is based on the source set names (main
, test
, integTest
, etc). By using the scope information, Buildship can figure out which output folders and dependencies should be filtered from the runtime classpath.
from eclipse.jdt.ls.
Related Issues (20)
- Exception occurred after sending textDocument/completion request. HOT 6
- saving non-Java file under source folder leads to rebuild HOT 4
- eclipse.jdt.ls core compilation fails on groovy-maven-plugin execution goal: SSLHandshakeException HOT 2
- I just cannot get this tool to work properly HOT 4
- JDT LS should mention as capability that it can support willRenameFiles HOT 1
- LSP not working with Gradle Kotlin build script DSL HOT 1
- Notify clients that enabling preview features on incompatible compliance level fails the build HOT 8
- Can't run under windows 11 HOT 1
- Interleaving `textDocument/codeAction` and `codeAction/resolve` with another type of request gives a wrong response
- If the switch expression is used to use boolean, JDTLS does not report an error HOT 3
- faiure in json getting classpath HOT 1
- lombok.eclipse.handlers.HandleBuilder failed even with latest lombok HOT 2
- JDT LS doesn't use the project gradle wrapper HOT 7
- Tries to clean default workspace when it doesn't exist. HOT 1
- Doesn't revalidate project files after classpath changes if autobuild is off. HOT 6
- [Feature, Performance] - Native GraalWM Executable HOT 2
- references stop working; index file not found errors; deadlocks with autobuild.enabled = false and maxConcurrentBuilds=8 HOT 1
- [Feature] Browsing jar dependencies contents HOT 5
- Disabling maven importer prevents project from being imported at all. HOT 3
- Run the build test suite against the incubator javac branch HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eclipse.jdt.ls.