First a little background. I can go from netbeans 8.0 to 12 and open an existing older project that was built with netbeans native builder (pretty sure it's ant), do a clean and build, and the project runs perfect with zero problems. You can totally be unaware of build.
Now the problem, gradle. I did my first gradle project, all was good, ran fine. Then a few days later netbeans informed me there was an update to gradle, I updated, restarted the ide, and nothing. The project would not build anymore, etc.
How, and I plea for help here, how do you make it so you can update gradle, and just press on with a clean and build?
Meaning, I want to be unaware that gradle even exist, I should not have to spend time fixing a build tool, I should be able to update, and forget I’m even using it. Any help is appreciated.
Been using netbeans for years, and never encountered such a mess.
Also if it's not possible in netbeans, I'll use eclipse, but I'd like to not even think about the build tool just like in the past. Any hints, tips?
Or after an update to gradle, is there some little thing that needs to be done?
I have used native build for years, mostly netbeans and some in eclipse and never needed to read one word of the ant documentation, it just always works.
Related
I currently have a Maven Java 11 project that builds fine. However, I use Eclipse's implementation of the language-server for editing the code within Emacs. This works fine, everything that I really need is available.
However, my question, is how can I disable the Eclipse LSP/compiler from attempting to auto-compile the project? It's not always an issue, but often the JDTLS seems to be recompile everything all the time to the point that when I run Maven, it has to recompile everything again. At best, this is a slowdown in the develop->test cycle. At worst, I have to clean build frequently.
Eclipse has an option in its GUI which "builds automatically". I am curious, is there a text file I can toggle this setting with?
According to the lsp-java documentation, the setting you are looking for is lsp-java-autobuild-enabled.
However, if there is a way to run the tests directly rather than via Maven, it would be faster since Maven does not support incremental compiling like JDT does (ideally, compiling should be done incrementally on save and not when running the application or a test).
we have a jbuilder project which supports java 5. Need to convert this to latest version. Like to change the IDE to Eclipse too.
The code is working in ongoing project need to reuse the same. Plz help on this
in this form I'm afraid community won't be able to help much, SO is intended for asking very precise questions to get precise answers. That's why you've got a downvote I believe. Welcome to the SO though.
Anyway, JBuilder is somewhat old (very old) so If you really think about updating the system, I suggest starting with building a build script in something like maven or maybe gradle.
If you go with maven, for example, you'll have a file pom.xml (or maybe many files if its a multi-module project) that describes a build process. Then it's possible to take advantage of eclipse maven integration and just open a pom.xml as a project (it will work in IntelliJ as well).
Today I faced problems in starting eclipse (reinstall etc. did not work). I had to use a vanilla eclipse and with luck it was working.
With that I experienced the problem of an IDE that is not working. That can be a mess if you need a quick bugfix for a hot system.
Is there a tool that takes an eclipse-project and converts it into a makefile for a more basic tool (like ant, maven, gradle, ...) that work from the commandline?
Sure I can make it by hand but because it should be only a safety I would prefere the automatic way and keep the development-work in the IDE.
EDIT:
Or maybe: Is there an build-command that works on the commandline without starting the IDE?
Thanks!
Running "gradle init" from the command line will attempt to create a build.gradle for your project. If your project layout is "conventional" it might do a good job. If it finds anomalies it tends to give up. Constructing a simple Gradle build script for a simple project takes a few minutes once you get used to it. Searching the web with intelligent queries will tend to find lots of examples.
Adding the "Gradle Nature" in Eclipse is simple if the project is buildable from the command line with Gradle.
You can use m2e eclipse plugin to convert your existing projects to maven projects. But you have to do it before hand(while your eclipse is still working)
https://crunchify.com/how-to-convert-existing-java-project-to-maven-in-eclipse/
I'd like to make Gradle use Eclipse project dependencies. Unlike this question, I don't want to do any export as I don't want to hunt down problems due to forgetting to re-export after a change. And unlike this question, I don't want to integrate Gradle into Eclipse at all, as I'm satisfied with how my Eclipse works (it's much faster than a Gradle build) and I'm also afraid that my Eclipse 3.7.2 may be too old for such games.
Ideally, I'd like something like
dependencies {
compile allFilesFromEclipse()
}
Actually, getting the JARs would suffice.
What I've tried: Just some light googling. I could imagine parsing the .classpath file myself, but it's not done in 5 minutes, so I'm asking if there's an existing solution.
I am afraid you won't find much help. It is not obvious what problem you want to solve here. Most developers prefer to base their build on a build tools rather than expect that they will replicated an IDE setup everywhere.
As for Eclipse 3.7.2: I am not sure why you want to stick with that but gradle eclipse generates files that work with this version.
I have little experience in Java/Groovy/Grails, about 1 year using Eclipse and some weeks using GGTS, and I always got my projects with build path problems, or other related problems, with apparently no reason. The environment seems to be buggy. Any tip?
Below there's an screenshot of a project I was working on and, after a computer restart, a lot of wild build path problems had appeared.
PS.: To solve these problems I closed the project in GGTS, used a grails clean in console, opened the project again (all the problems still were there), then I just gave a look into properties > Java Build Path and all problems have gone. These steps makes no sense for me.
Like others I would not recommend Eclipse. All variants(sts,ggts,vanilla eclipse+plugins) are unstable at least on Juno, IMHO.
I personally use emacs, but like #James, I would suggest IntelliJ:
stable as in no strange internal errors pop up while doing Grails coding, no project corruptions.
better completion, especially dynamic methods