I am using Buildship 2.0.0. When I run Gradle -> Refresh Gradle Project on a project, the .classpath file is changed.
The problem is then that entries with libraries and the output directory disappear. The Eclipse plugin I have integrated. The .classpath file should not be overwritten.
Please use the file.whenMerged hook instead of file.withXml. The XML hook is no longer necessary, because the model you get in whenMerged contains all aspects of the classpath. Buildship only takes whenMerged into account, it does not work on XML level.
The directories contain properties that I need when starting the programs. Because it is Eclipse container, I can add you only via the eclipse plugin. Do you have an idea how I managed this.
If it is a directory it should just work. Sorry I thought it was a single properties file. If it doesnāt work can you please provide an example on github?
I have another question about buildship and classpath updating. When will the āProject and Exetrnal Dependenciesā (org.eclipse.buildship.core.gradleclasspathcontainer) rebuild in the Eclipse project. I have a new version of a library. However, the library is not updated
I donāt understand what you mean. Buildship will put library entries into the container. You should never be calling Ā“gradle eclipseĀ“ when using Buildship. They are mutually exclusive.
I do not run gradle eclipse manually. If I call refresh gradle on the project, the .classpath file is re-created. āRefresh gradleā I have to call that the updated libraries are loaded by the Nexus server
Buildship does not create lib entries. They might be left over from a time when you generated the classpath file manually. Please delete them from your classpath, the buildship container should already contain them.
Use the buildship plugin the eclipse tasks from build.gradle? Why does buildship change the refresh gradle .classpath file. My guess is that he re-sorted the .classpath.
Again, the libraries are already in the container (just open it in Eclipse and youāll see them), please remove the extra entries from your classpath.
The lib entries are not contained in my container. āproperties-zentralā is in Eclipse a link to a local directory, that exists only on the workstations, but not on the buildserver. For this reason they are not stored under dependencies in the build script.
You added them to the eclipse.classpath as lib entries. Buildship puts all those lib entries into the container. If you found a case where this doesnāt hold, please create a reproducible example.
Thank you for the example. The problem is that you are trying to include a linked resource as a dependency, but we check for physical files. We should probably replace that with an Eclipse resource check instead.
We should also actively remove any user-defined lib entries like you checked into your .classpath file, since those would conflict with our classpath container. Iāll see if we can get both of these changes into 2.0.1.