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.
As I’m sure you can appreciate, every build is different. Whilst you have provided a few paragraphs of text, you have provided zero insight into your build. If you’d like some help, I suggest that you provide some concrete detail rather than a frustrated rant
That’s the point. I programmed java, jsp, servlets for years, not one time did I ever need to read one word in Ant documentation. My very first gradle project was ruined because of errors, it ran fine before updating gradle, so I know it was programmed correct. And to ask what was the errors is also a main point. Because there should be NO errors. You should be able to program in Java technology without having to bottle feed and nurse maid a build tool. A build tool should just work. The only reason I wanted to mess with gradle, is because I see Spring is now forcing it on people, so I figured I had better try it.
All I know is in todays World you see more web applications are done in ASP.net and PHP, and less in Java. I can now see why.
It used to be fun and nice to program using Java. You should not have to worry, think about, be aware, concerned, have to cross your fingers, about if your build tool will let you down.
Please fix it. There should be 0 errors because of a build tool.
Java is only 3.4% now, I just wonder if new developers are scared away by something so hard to use, and scared a whole project will have to be completely redone.
Java itself is fun and a joy. So I wonder what ruined it for some to want to learn.
No Rant, but fact, You should not have to have any thought about a build tool, it should do it’s job.
BUILD SUCCESSFUL in 830ms
3 actionable tasks: 3 up-to-date
=====================================
java.lang.NullPointerException
at org.netbeans.modules.j2ee.deployment.plugins.spi.IncrementalDeployment.getDirectoryForNewApplication(IncrementalDeployment.java:122)
at org.netbeans.modules.j2ee.deployment.impl.InitialServerFileDistributor.distribute(InitialServerFileDistributor.java:80)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.initialDistribute(TargetServer.java:259)
at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:664)
[catch] at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:221)
Caused: Deployment error.
See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:269)
[catch] at org.netbeans.modules.gradle.javaee.execute.DeployHook.deploy(DeployHook.java:95)
at org.netbeans.modules.gradle.javaee.execute.DeployHook.afterAction(DeployHook.java:62)
at org.netbeans.modules.gradle.ActionHookMerger.afterAction(ActionHookMerger.java:63)
at org.netbeans.modules.gradle.ActionProviderImpl.lambda$invokeProjectAction$0(ActionProviderImpl.java:271)
at org.openide.util.Task.notifyFinished(Task.java:215)
at org.netbeans.core.execution.ExecutorTaskImpl.finished(ExecutorTaskImpl.java:64)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:150)
Some how it has to be gradle, netbeans on both computers and gradle versions are the same. When I placed that project folder the only thing missing was server, and in the “run” dropdown I chose tomcat.
And as I showed above it built. Just would not run.
Every project on that netbeans install runs perfect, the only trouble I am having is gradle.
A gradle project built from scratch works, runs perfect, zero problems. But if you copy a project, update groovy / gradle, or sneeze wrong it gets messed up, why?
I have copied ant projects, picked server, clean and build, runs perfect. What is going on here. Please fix gradle.
Can you build from command line? Do you have tasks in your build.gradle that allow you to run from command line?
If command line is working then Gradle is working fine. Also your output seems to show “BUILD SUCCESSFUL” which shows that Gradle has completed successfully when invoked via Netbeans Gradle plugin.
Judging by the stacktrace you gave earlier, it seems that the problem is with 2 or 3. So, I suggest that you ask your question on the netbeans forums since Netbeans owns 2 & 3 above
Okay, weird thing, even though this is a netbeans project, I tried importing Gradle project in Eclipse, assigned Tomcat, and it ran perfect. It should have ran also in netbeans. Very latest Eclipse Java EE version. The 2020-06.
It gets more weird. I actually exported the project from eclipse to a war file.
Opened tomcat manager, where you browse for war, I did, clicked deploy, it ran perfect.
So somehow I can create a new gradle project in netbeans, and it works. But I cannot copy one to netbeans, or import one and have it work. Gradle only seems to work in netbeans if it’s a new project.
Yet I can import same project in eclipse, runs fine, export war and deploy to tomcat, runs fine.
Okay gradle is apache, and netbeans is apache, what gives?
Do you think there are bugs in netbeans 12 with working with a gradle project.
I am no expert on those errors, usually with ant all works. And thanks for response. I wasn’t mad at you, just gradle at first, but now seems to be a netbeans problem.
In fact, in eclipse after I imported, assigned tomcat, built, it ran right away, no errors that I saw.
Please note that you are asking your question in the Gradle forums. The people on this list are familiar with Gradle and can help with Gradle issues.
Now that your problem has been identified as a Netbeans issue, I suggest that you ask your question on the Netbeans forums. Many of the people on this list use Intellij or Eclipse and have never touched Netbeans
Okay gradle is apache, and netbeans is apache, what gives?
Gradle is not an Apache project. Gradle is backed by Gradle Inc.