I have multiple gradle projects in my workspace which get build automatically.
The problem arrises from one project which fails this automatic builds so an error dialog pops up regulary which is quite annoying. Since the project is just a simple prototype and the only person which has it running locally is currently on vacation there is no fix in sight.
I could easily close the project in eclipse but I have to refer regulary to it as a code reference which obviously isn't possible when the project is closed.
Is there an easy way to disable the automatic Gradle build for only this project while keeping the builds for the other Gradle projects in my workspace functional?
Many thanks in advance.
Okay I found the way.
Just right click on the project in the package explorer and choose Gradle -> Disable Dependecy Management.
Related
Eclipse Gradle project shows dependency errors.
the container 'project and external dependencies' references non existing library
Got the same error. Gradle -> Refresh Project.. did not fix it.
Close Project, then Open Project did fix it.
Eclipse Gradle projects have a button to refresh the gradle project, but it is not really obvious and does not trigger when trying to 'quick fix' the error in eclipse.
Right-click on the desired Project that has dependency errors
In the menu select Gradle
Click 'Refresh Gradle Project'
This will remove the errors but could take a few minutes to process.
If the errors are still present in eclipse you should try to refresh dependencies and build with gradle outside of eclipse on the command line and see if that works to rule out eclipse/gradle sync as your issue.
Example of gradle command line to refresh and build (use gradlew if your using a gradle wrapper):
gradle clean
gradle --refresh-dependencies
gradle build -x test
gradle test (optional)
I get this same error. It happens randomly every now and then, to most projects I have imported into Eclipse. Gradle misses some random dependency even though it's on the disc. Below image shows 6 different projects failing and next picture shows none-existing library reference actually exists.
.
A Gradle refresh usually does not solve it. To solve it I have to delete the project from Eclipse (not disc), then manually remove .classpath/.project files and .settings folder, then import project into Eclipse again. Very annoying :/
Based upon the feedback from the other answers, you probably should file an issue against Buildship, as this seems easy to reproduce. However, there already is one issue #985 filed, which states that the reason would / might be a read-only .classpath or .project files.
I tried all the suggestions above. Unfortunately, none of those steps helped me.
On Mac, this is what I had to do...
$ brew upgrade gradle
(this upgraded gradle from 5.0 to 6.7.1)...
$ cd /project_root
$ gradle help --scan
$ gradle wrapper --gradle-version 6.7.1
Workspace Settings
Build Options
Does anyone know why eclipse never ends building when I check "Refresh using native hooks or polling"?
Well I just found out that the build creates a jar file in the eclipse project, which triggers a build again and so on...
In case someone faces the same problem in the future:
To solve the problem right click on the folder, go to properties and add a resource filter so eclipse doesn't care about this particular file anymore.
We are creating some JUnit tests as part of QA development. So we are doing this daily and while running individual tests, or part of a package, they do appear under the Run arrow:
they do not appear in the Ant build Targets:
Well.. you can see that the Schedules_Load appears but that's because I have exported the Ant build again.
Note that even if I create Run configurations using the Eclipse menu:
It still doesn't update my Ant Targets list..
Under the menu item Project I do have Build automatically checked but don't think it makes any difference anyway, just thought I would mention it.
So is there any way to automatically update Ant targets with new run configurations without having to export the Ant build again?
Thanks.
try selecting the check-box: "Refresh automatically".
Window->Preferences->General->Workspace->"Refresh automatically"
(source: avajava.com)
How to exclude one project from automatic build in Eclipse?
I have one project in workspace, which is probably builds very long (even if nothing was changed). I want to keep this project opened to browse source code but I need not it is being build all the time.
How to disable automatic build for this project?
Probably this was a bug in Eclipse https://bugs.eclipse.org/bugs/show_bug.cgi?id=60803 and it was solved long time ago. Unfortunately, I can't find any per project options to control automatic build.
When you open the Project properties of the project that should not be built you can disable all Builders - especially the "Java Builder". This should prevent any automated action like compiling regarding the project.
An easier solution is to "Close Project" on the projects that you don't want to Build. I tried deselecting the Builders for the project, but this didn't work. Close Project on sample code, unused libraries and other "non-dependencies" allowed me to work with only the Projects of concern in the Package Explorer.
The best approach is to use the Inclusion and Exclusion Patterns option in the Java Build Path.
For example if you want to exclude one project from being automatically built:
1- Go to its Properties->Java Build Path->Source.
2- Expand the folder in the "Source folders on the build path:" area
3- Select Exclude->Edit
4- In the exclusion patterns add **
Note: for more information on this patterns: Include and Exclusion Patterns
I have a workspace in Eclipse containing two BlackBerry projects. I started the workspace with the first project and later added the second project. Now I wanted to build and run the second project, but Eclipse keeps starting the first project in the BlackBerry simulator. When I close the first project and try to run the second one again, I get the error message "Launching DebugServer has encountered a problem. Resource FIRST PROJECT is not open." I think I have to configure Eclipse/BlackBerry simulator to build and run the second project an some place, but I can't find out where to do it. I hope someone can help me, as I also fail to move the second project into another workspace for some reason.
I found the solution. The projects that are to be built and run can be configured in the menu "BlackBerry -> Build Configurations -> Edit". For every mode ("private", "debug" and "release") I had to uncheck the first project and check the second one.