Gradle Support - plugin detailAllows opening of Gradle projects
[ You have to be logged in to be able to comment. ] User Commentsissue with system.out
Small issue...when using System.out.print() I do not see the output in the console until a new line is printed. In the below example, I don't see abc print out until after the sleep command completes.
public class NBTest { @SuppressWarnings("unused") private static final String svnid = "$Id$"; public static void main(String[] args) { System.out.println("123456"); System.out.print("abc"); try { Thread.sleep(5000); } catch(InterruptedException ex) { ex.printStackTrace(); } System.out.println("123"); } }
Posted by buckfan617 on May 24, 2018
reference resource outside of project
In the eclipse plugin, there is a feature called linkedResource that is referenced this way in the build.gradle:
eclipse.project.linkedResource name: 'System', type:'2', location:"${project.ext.basedir}/${project.name}/System".toString() is there any such thing in this plugin? It does not have source code, just configuration files for running the applications.
Posted by buckfan617 on Mar 02, 2018
Could not use in JDK9
I could not use gradle plugin in JDK9 project
I now use gradle wrapper for target project $ cat gradle/wrapper/gradle-wrapper.properties distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME I can build on CLI but, error occurs on netbeans with gradle plugin with use gradle wrapper setting. (project properties - gradle location : Autodetect from the Gradle wrapper) error message as follow java.lang.IllegalArgumentException: Could not determine java version from '9.0.1'.
Posted by wasuzuki on Nov 10, 2017
Failed to open project after moving to another directory
After moving a project to another directory it failed to correctly reopen the project again. I Tried the following...
. reloading the project . deleting the gradle cash . deleting the project and creating it again . removing the plugin and install it again . updated to latest gradle version Nothing worked, and know I can't even create a project with the same name. Otherwise, congrats on the plugin. Regards
Posted by hugo.tigre on Mar 23, 2017
JSF custom components and CDI autocomplete not recognized
I'm migrating a project from maven to gradle, so far everything is ok, but I'm having problems with xhtml files:
-The IDE does not navigate to the CDI bean if i ctrl-click it in a xhtml file ( #{myBean} should navigate to MyBean class) -Some namespaces are not working, IE: http://xmlns.jcp.org/jsf/composite/components or http://xmlns.jcp.org/jsf/passthrough . Surprisingly others are OK, such as http://primefaces.org/ui All this features were working with maven, so it must be something with gradle. Any ideas?
Posted by cocorossello on Mar 13, 2017
Re: Run build but skip tests
You must list "-x" and "test" as a separate line in the arguments text box (as they are separate arguments). Alternatively, you can just write "-xtest" (i.e., no space between "-x" and "test").
Posted by attila.kelemen on Mar 12, 2017
Run build but skip tests
I can't set up "gradle build -x test" to run within NetBeans as a custom task.
Normally it should be set up as Tasks: "build" and Arguments: "-x test". However, this returns error: "Unknown command-line option '-x'.". Also, the custom tasks don't show up properly under "Custom Tasks" when you right click on Gradle project name.
Posted by mindjoy on Mar 07, 2017
JVM Arguments in NetBeans with Gradle [solved]
Thanks to @MarvinFrommhold and his Post http://stackoverflow.com/a/26141841/7220665 I have finally found what I wanted.
I just had to extend the run task with run { systemProperties = System.properties } and my arguments are passed through to my application where I can use it.
Posted by mick99 on Jan 13, 2017
JVM Arguments in NetBeans with gradle
I am having difficulties passing JVM arguments in NetBeans to my Gradle project. My previous attempts got no success and maybe someone can help me.
Here is what I have tried so far: I am adding the JVM Argument via right click on project --> Properties --> Build In Tasks --> Run --> Putting the JVM Value in the designated field -Dtest=mytestvalue When I run the project afterwards via right click and run it display: Executing: gradle :run Arguments: [-PcmdLineArgs=, -c, D:\NetBeansProjects\app\settings.gradle] JVM Arguments: [-Dtest=mytestvalue] :compileJava UP-TO-DATE :processResources UP-TO-DATE :classes UP-TO-DATE :run 10:54:55.899 [main] System.getProperty('test') null So the arguments are displayed in JVM Arguments: [-Dtest=mytestvalue] but not transferred to the application it seems and System.getProperty('test') results in null. I also tried using custom tasks with the same effect. If I create a jar file and pass the arguments everything works as expected: ? java -Dtest=mytestvalue -jar app.jar System.getProperty('test') mytestvalue System.getProperty('test') results in mytestvalue. My current workaround is to set the JVM arguments in the build.gradle file which works fine, but I want to get rid of writing the arguments directly into that file.
Posted by mick99 on Jan 13, 2017
Netbeans does not work well with Gradle 2.3
I am attempting to build projects for libGDX it appears these are using gradle 2.3 and I am getting an error in netbeans to use V2.2.
Thanks.
Posted by kirkkaf13 on Jan 09, 2017
Go to type (Ctrl + O) doesn't work. Find usages (Alt + F7) doesn't work.
NB8.0 or NB 8.2. Go to type (Ctrl + O) doesn't work. Types under gradle couldnt be searched. Find usages (Alt + F7) doesn't work.
Types under ANT coud be searched without any problems. What to do?
Posted by Evgenic on Jan 04, 2017
Re:
Sorry for the very late response but I did not receive any notification for the comment (next time, please use the https://github.com/kelemen/netbeans-gradle-project/issues) to report an issue.
Resolve Groovy Classes in the IDE: You have to set a directory in the global settings for your Gradle dist at the moment (you can still rely on the wrapper for anything else but the class path of the script). Resolve dependencies freeze: It is likely a proxy issue but there is known issue with nonProxyHosts handling. See this issue (especially the last comment): https://github.com/kelemen/netbeans-gradle-project/issues/139
Posted by attila.kelemen on Oct 04, 2016
Resolve dependencies freeze
Hi,
I am very glad to see gradle plugin for netbeans. I am using NB 8.1 and Gradle plugin 1.3.8.1, I am not able to load project from https://github.com/kelemen/netbeans-gradle-project.git; it is still resolving and resolving and nothing is resolved :-( may be it could be some proxy or other, but in Netbeans proxy is set up correctly, in general gradle settings too. So, could you give me some advice, how to find, where the root cause is. with best regards, jiri
Posted by Jirik_Kutil on Sep 15, 2016
Resolve Groovy Classes in the IDE
I wondering how to resolve Java, Groovy and Gradle classes that I import into a Gradle build script so that I do not get red highlights in the IDE. For example, if I do this:
import org.apache.tools.ant.filters.ReplaceTokens import groovy.sql.Sql these lines are highlighted in red. The build works fine, they are obviously being found, just not by the IDE. I use a gradle wrapper, so I do not have a Gradle installation, as such, on my dev machine.
Posted by coder451 on Aug 26, 2016
Re: Potential Issue/Question
Please open an issue on https://github.com/kelemen/netbeans-gradle-project with a sample project with which I can reproduce your issue (with the explanation on what you expect to see and what happens instead). It is hard track issues here.
Posted by attila.kelemen on May 03, 2016
Potential Issue/Question
It seems Netbeans does not properly resolve the source paths (as far as jumping using ctrl+shift+B) in certain circumstances. i have two source sets as follows:
/Src /QcUpdates I also have a library jar file with source code as follows: someLibrary-12.1.0.jar I create a newer version of the class file that exists in the library in QcUpdates source. Then i reference that new code from the Src directory. Everything compiles ok and there are no red x's, but if i try to jump to the code, it always reverts to the jar file. is there a way to identify if sources are set up in the wrong order? Thanks for your help. Let me know if you need sample files.
Posted by buckfan617 on May 03, 2016
Re: Problem Gradle Run failed
As you can see the JVM terminated with an error. This usually happens when the JVM cannot allocate enough memory. Check the error message of your JVM in the output window.
Posted by attila.kelemen on Mar 03, 2016
Problem Gradle Run failed
NetBeans IDE 8.0.2, win 7, Gluon 2.0
Got the following message. How to fix problem just testing to see if it works. But it does not work for me. Issue 1 -------- Requested project: C:\Users\Administrator\Documents\NetBeansProjects\GluonApplicationLatest Stack trace: org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.2.1-all.zip'. at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:59) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54) at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46) at org.gradle.tooling.internal.consumer.DefaultBuildLauncher.run(DefaultBuildLauncher.java:72) at org.netbeans.gradle.project.tasks.AsyncGradleTask.runBuild(AsyncGradleTask.java:369) at org.netbeans.gradle.project.tasks.AsyncGradleTask.doGradleTasksWithProgressIgnoreTaskDefCancel(AsyncGradleTask.java:492) at org.netbeans.gradle.project.tasks.AsyncGradleTask.doGradleTasksWithProgressIgnoreTaskDefCancel(AsyncGradleTask.java:402) at org.netbeans.gradle.project.tasks.AsyncGradleTask.doGradleTasksWithProgress(AsyncGradleTask.java:393) at org.netbeans.gradle.project.tasks.AsyncGradleTask.access$400(AsyncGradleTask.java:84) at org.netbeans.gradle.project.tasks.AsyncGradleTask$BuildExecutionItem$1.run(AsyncGradleTask.java:775) at org.netbeans.gradle.project.tasks.GradleDaemonManager.runBlockingGradleTask(GradleDaemonManager.java:52) at org.netbeans.gradle.project.tasks.GradleDaemonManager.access$200(GradleDaemonManager.java:23) at org.netbeans.gradle.project.tasks.GradleDaemonManager$2.execute(GradleDaemonManager.java:129) at org.jtrim.concurrent.AbstractTaskExecutorService$FunctionWrapper.execute(AbstractTaskExecutorService.java:270) at org.jtrim.concurrent.AbstractTaskExecutorService$TaskOfAbstractExecutor.execute(AbstractTaskExecutorService.java:340) at org.jtrim.concurrent.Tasks$RunOnceCancelableTask.execute(Tasks.java:342) at org.jtrim.concurrent.ThreadPoolTaskExecutor$ThreadPoolTaskExecutorImpl$QueuedItem.runTask(ThreadPoolTaskExecutor.java:1213) at org.jtrim.concurrent.ThreadPoolTaskExecutor$ThreadPoolTaskExecutorImpl$Worker.executeTask(ThreadPoolTaskExecutor.java:1049) at org.jtrim.concurrent.ThreadPoolTaskExecutor$ThreadPoolTaskExecutorImpl$Worker.run(ThreadPoolTaskExecutor.java:1179) at org.jtrim.concurrent.ThreadPoolTaskExecutor$ThreadPoolTaskExecutorImpl$Worker$1.run(ThreadPoolTaskExecutor.java:998) at java.lang.Thread.run(Thread.java:745) Caused by: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':run'. at org.gradle.initialization.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:77) at org.gradle.initialization.MultipleBuildFailuresExceptionAnalyser.transform(MultipleBuildFailuresExceptionAnalyser.java:47) at org.gradle.initialization.StackTraceSanitizingExceptionAnalyser.transform(StackTraceSanitizingExceptionAnalyser.java:30) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:108) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86) at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80) at org.gradle.tooling.internal.provider.BuildModelAction.run(BuildModelAction.java:43) at org.gradle.tooling.internal.provider.BuildModelAction.run(BuildModelAction.java:30) at org.gradle.tooling.internal.provider.ConfiguringBuildAction.run(ConfiguringBuildAction.java:119) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26) at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:47) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34) at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119) at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:35) at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119) at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:24) at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119) at org.gradle.launcher.daemon.server.exec.StartStopIfBuildAndStop.execute(StartStopIfBuildAndStop.java:33) at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:71) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:69) at org.gradle.util.Swapper.swap(Swapper.java:38) at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:69) at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119) at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34) at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119) at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:70) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34) at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119) at org.gradle.launcher.daemon.server.exec.DaemonHygieneAction.execute(DaemonHygieneAction.java:39) at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119) at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:46) at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246) at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64) Caused by: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':run'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:305) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88) at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62) at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68) at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106) ... 32 more Caused by: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_20\bin\java.exe'' finished with non-zero exit value 1 at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:365) at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:31) at org.gradle.api.tasks.JavaExec.exec(JavaExec.java:60) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:579) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:562) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) ... 55 more
Posted by lumbel on Mar 02, 2016
Search for dependencies in MAVEN reposI'm switching to Gradle from MAVEN and strongly miss ability of 'assisted' search for dependencies. When in MAVEN project I right-click on dependencies node in project tree the first item in popup is "Add Dependency ..." which brings up a dialog where i can search by class name of whatever else for MAVEN artifacts contained in locally indexed MAVEN repos. Same thing can be triggered from code - there is "Search for dependencies ..." item in popup for unresolved symbols. After searching - manually selected artifact will be automatically inserted into dependencies in pom.xml. I understand that unlike MAVEN in Gradle there are plenty of places to inject string with dependency instruction and this step cannot be automated, but it would be very handy to have repository 'searcher' tool like in MAVEN project with the only difference - instead of "Add" button show edit box with dependency string generated in various popular formats. For reference: Maven Add Dependency dialog: http://fgeorges.org/tmp/maven-nb-xspec.png Various formats for dependency strings: http://www.mvnrepository.com/artifact/org.codehaus.groovy/groovy-all/2.4.4#gradle PS: most probably this needs to be done as generic Netbeans feature, not only in context of Gradle plugin and i have reported feature request for that https://netbeans.org/bugzilla/show_bug.cgi?id=256536.
Posted by NukemBy on Nov 12, 2015
Re: Re: Running command line executables
I don't know what plugin you are using for this snippet to work. However, you should not specify relative path. So, for location write "$project.projectDir/src/main/resources" instead.
Posted by attila.kelemen on Oct 29, 2015
Re: Re: Running command line executables
So how would I change this snippet
generateVersionFile { location = "$project.name/src/main/resources" buildNumber = project.version } in order to specify the working directory used inside this task? Regards
Posted by brunorene on Oct 28, 2015
Re: Running command line executables
You have to explicitly specify the working directory. Your task is running in a process which may execute multiple tasks (the Gradle daemon), so there is not way to rely on the current working directory of the process executing your task. For example, you might want to use the "Exec" task of Gradle which lets you specify the working directory (and by default it is the project directory).
Posted by attila.kelemen on Oct 28, 2015
Running command line executables
Hi,
When I run something like gradle build and some task tries to execute something on the bash most of the times it wont find the executable or the execution is made outside the project dir. For example this error: generateVersionFile Executing command: git log -1 --pretty=format:%h stderr: fatal: Not a git repository (or any of the parent directories): .git stdout: generateVersionFile FAILED this happens because I think git is executed on a different dir. If I run this on the command line directly it works. Someone has ideas how to fix this? Regards
Posted by brunorene on Oct 28, 2015
Re: Permissions error from gradle daemon on windows
My guess is that you somehow started the Gradle daemon with another user (and the daemon is being reused by NetBeans). What I would try is to kill the daemon and delete the whole "build" directory. So that next time the directory will be created with the approriate user.
Posted by attila.kelemen on Oct 08, 2015
Permissions error from gradle daemon on windows
So I can use gradle fine from the command line but when I run in netbeans with this plugin, as I understand it, it is using the gradle daemon. For some reason a build/clean gives the following error:
:clean :assetCompile FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':assetCompile'. > Failed to create parent directory 'C:\dev\netbeans\AttDemoServer\build\assetCompile' when creating directory 'C:\dev\netbeans\AttDemoServer\build\assetCompile\assets' This just started happening and somewhat out of the blue. The only thing I can think of that I changed is adding a new maven repository for grails plugins i.e. -> maven { url "http://repo.grails.org/grails/plugins" } Removing this one line did not fix the issue. What it is essentially doing is removing rwx permissions for me, the user from assetCompile directory or creating it without rwx permissions and then subsequently trying to create the assets directory underneath it. I can get around all of this by using the command line which is why I think it's something specific to either how the gradle daemon is running or something the plugin is doing. Any ideas? edit: I'm running gradle 2.7 edit2: running netbeans as administrator "fixed" this but I'd like to understand how I could fix the problem so that I don't have to do this.
Posted by usma84 on Oct 08, 2015
Re: Build Error
Yes, you can set it either for the project (https://github.com/kelemen/netbeans-gradle-project/wiki/Gradle-project) or in the global settings (https://github.com/kelemen/netbeans-gradle-project/wiki/Gradle-Installation)
Posted by attila.kelemen on Sep 21, 2015
Build Error
I am using gradle plugin 1.3.7. The gradle I have installed on my linux is 1.11 but the plugin seems to be using 2.4. Is it possible for me to change this to 1.11? The project I have to use for developing has gradle files built out of 1.11. From command line my code is getting build correctly but from netbeans I am seeing the below error.
org.gradle.tooling.BuildException: Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.4-bin.zip'. at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:57) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54) at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Specs: Netbeans: 8.0.2 Gradle Plugin: 1.3.7 Gradle (where src build works): 1.11 Gradle (used by Netbeans plugin): 2.4 Thanks, ~Shyam
Posted by shynaray on Sep 21, 2015
Re: Plugin keeps downloading Gradle unnecessarily
If you did not configure otherwise in the project properties then it shouldn't attempt to download Gradle (by the way the downloaded Gradle is cached in "~/.gradle/wrapper").
Anyway, please open an issue here: https://github.com/kelemen/netbeans-gradle-project/issues because it is very inconvenient to track issues on this comment page. Also, please post a screenshot of your project properties window (Gradle project page).
Posted by attila.kelemen on Aug 26, 2015
Plugin keeps downloading Gradle unnecessarily
I am evaluating Gradle with the plugin on a small project. I have downloaded Gradle and using Gradle from the command line works perfectly on this project.
I have set the "Gradle installation directory" in the Netbeans Options and unchecked "Prefer wrapper". Whenever I try to open the gradle-based project in Netbeans, it tries to download Gradle itself, and then it hangs. My concern is not with the "hanging" but with the fact that the plugin wants to download Gradle. Is there any way to prevent that? Thak you!
Posted by fortiernr on Aug 26, 2015
Re: External Directories
If you can map those locations, you can create a new source set. Also, you can make it so that the source set is only visible to NetBeans by checking if the 'evaluatingIDE' property exists and has the value 'NetBeans'.
Posted by attila.kelemen on Jul 16, 2015
External Directories
Can i add an external reference? We have all of our source code in one directory. However, we also have a configuration directory that is used by the applications that resides in a network location. These are just simply XML files and i would like to be able to see them under the files tab. Is this possible?
Posted by buckfan617 on Jul 16, 2015
Re: Don't start the daemon if there is NOT any gradle project
The daemon is started by Gradle's API and is only done so if a Gradle project is loaded (note that NB can request to load a project for many reasons even if not opened). Though I try to avoid loading a project if it is not really necessary, there might still be cases when it can be done better. You can do the following:
- Reduce the memory foot print of the daemon by adding "-Xmx256m" (or whatever) to the "Gradle JVM arguments" in the global settings. - Reduce the timeout after the Gradle daemon dies in the global settings. - Try build the plugin from the sources, maybe I have already noticed something to reduce the number of unnecessary project loads. - Send me you IDE logs, so I can check why your projects get loaded.
Posted by attila.kelemen on Jun 15, 2015
Don't start the daemon if there is NOT any gradle project
Please,
I have only 2 projects on 15 which are built with gradle. It's a p.i.t.a to have this extra memory and CPU gone for nothing (these projects are not even loaded in my Netbeans) when I'm not on the main computer . Sometimes we have to work on low-profile hardware. !! Not every PC or laptop are 16GB of RAM !! I'm OK to deal with gradle daemon when I'm working on gradle but when I'm dealing with PLAIN (netbeans or maven) project; Not even one gradle project opened why do we have to start the gradle daemon ??? Is there some switch or should I just remove the all plugin and forgot about it ? Thanks
Posted by bytesArray on Jun 13, 2015
Re: Odd behavior when using multiple projects
Can you open an issue here: https://github.com/kelemen/netbeans-gradle-project/issues?
Also, please describe what exactly you see and what you expect to see (in the issue).
Posted by attila.kelemen on Jun 03, 2015
Odd behavior when using multiple projects
I've been having some odd behavior when using multiple gradle projects in my workspace. We have the workspace set up with one project as our main (base code) and then multiple other projects that depend on main are projects that contain customer-specific code. Some of the issues appear to be NetBeans caching information from previous build files. Does that seem right? If so, is there a way to clear that information?
Posted by buckfan617 on Jun 03, 2015
Re: Publish update to the plugin portal please
It depends on when those verifying the plugin have time. It is usually within 1-2 working days.
Posted by attila.kelemen on May 26, 2015
Publish update to the plugin portal please
When will this update be released to the Netbeans Plugin Portal? I had to uninstall the one from there and download from this page by hand because even though the plugin has the fix that makes Gradle work for my projects again, it's not available for automatic updates
Posted by jimi_mx on May 25, 2015
Re: Duplicate Folders
I'm not sure about your exact setup but this plugin does not display nodes (save for build script node) for Android projects, that is done by the Android plugin.
Posted by attila.kelemen on May 25, 2015
Duplicate Folders
Well, running a LibGDX "solution" through Gradle.
All Projects are fine, but the Android one suddenly displays duplicates of several folders, including Source Packages and Dependencies, as well as a duplicate of a Custom Task. This happened with the last update 1.3.6 and continues with 1.3.7 Using gradle-2.1-all And Android build tools 0.13+
Posted by CypherEA on May 25, 2015
Re: Broken new-project-wizard (exception thrown)
This is not exactly the same issue (Issue #208) but is fixed in master and will be in the next release (probably this weekend).
Posted by attila.kelemen on May 22, 2015
Broken new-project-wizard (exception thrown)
Windows 7, 64bit, Netbeans 8.0.2, Netbeans Gradle Project 1.3.6
I get exactly what's supposed to be fixed in 1.3.6: invalid project files, when creating a new Gradle project. Exception is: Issue 1 -------- Requested project: C:\Users\mfuerstenau\Documents\NetBeansProjects\TestProject Stack trace: org.gradle.tooling.BuildException: Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.4-bin.zip'. at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:57) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54) at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46) at org.gradle.tooling.internal.consumer.DefaultBuildActionExecuter.run(DefaultBuildActionExecuter.java:46) at org.netbeans.gradle.model.GenericModelFetcher.getModels(GenericModelFetcher.java:166) at org.netbeans.gradle.project.model.NbGradle18ModelLoader$ProjectModelFetcher.getModels(NbGradle18ModelLoader.java:360) at org.netbeans.gradle.project.model.NbGradle18ModelLoader.loadModels(NbGradle18ModelLoader.java:65) at org.netbeans.gradle.project.model.GradleModelLoader.loadModelWithProgress(GradleModelLoader.java:495) at org.netbeans.gradle.project.model.GradleModelLoader.access$700(GradleModelLoader.java:67) at org.netbeans.gradle.project.model.GradleModelLoader$6.run(GradleModelLoader.java:333) at org.netbeans.gradle.project.tasks.GradleDaemonManager.runNonBlockingGradleTask(GradleDaemonManager.java:36) at org.netbeans.gradle.project.tasks.GradleDaemonManager.access$100(GradleDaemonManager.java:23) at org.netbeans.gradle.project.tasks.GradleDaemonManager$2.execute(GradleDaemonManager.java:126) at org.jtrim.concurrent.AbstractTaskExecutorService$FunctionWrapper.execute(AbstractTaskExecutorService.java:270) at org.jtrim.concurrent.AbstractTaskExecutorService$TaskOfAbstractExecutor.execute(AbstractTaskExecutorService.java:340) at org.jtrim.concurrent.Tasks$RunOnceCancelableTask.execute(Tasks.java:342) at org.jtrim.concurrent.SingleThreadedExecutor$QueuedItem.runTask(SingleThreadedExecutor.java:919) at org.jtrim.concurrent.SingleThreadedExecutor$QueuedItem.access$1200(SingleThreadedExecutor.java:898) at org.jtrim.concurrent.SingleThreadedExecutor$Impl$Worker.executeTask(SingleThreadedExecutor.java:815) at org.jtrim.concurrent.SingleThreadedExecutor$Impl$Worker.processQueue(SingleThreadedExecutor.java:827) at org.jtrim.concurrent.SingleThreadedExecutor$Impl$Worker.run(SingleThreadedExecutor.java:861) at org.jtrim.concurrent.SingleThreadedExecutor$Impl$1.run(SingleThreadedExecutor.java:453) at java.lang.Thread.run(Thread.java:745) Caused by: org.gradle.internal.exceptions.LocationAwareException: Settings file 'C:\Users\mfuerstenau\Documents\NetBeansProjects\TestProject\settings.gradle' line: 1 Could not compile settings file 'C:\Users\mfuerstenau\Documents\NetBeansProjects\TestProject\settings.gradle'. at org.gradle.initialization.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:77) at org.gradle.initialization.MultipleBuildFailuresExceptionAnalyser.transform(MultipleBuildFailuresExceptionAnalyser.java:47) at org.gradle.initialization.StackTraceSanitizingExceptionAnalyser.transform(StackTraceSanitizingExceptionAnalyser.java:30) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:108) at org.gradle.initialization.DefaultGradleLauncher.getBuildAnalysis(DefaultGradleLauncher.java:97) at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.configure(InProcessBuildActionExecuter.java:94) at org.gradle.tooling.internal.provider.runner.ClientProvidedBuildActionRunner.run(ClientProvidedBuildActionRunner.java:45) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28) at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:49) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72) at org.gradle.util.Swapper.swap(Swapper.java:38) at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:66) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:71) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120) at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50) at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54) at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40) Caused by: org.gradle.groovy.scripts.ScriptCompilationException: Could not compile settings file 'C:\Users\mfuerstenau\Documents\NetBeansProjects\TestProject\settings.gradle'. at org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.wrapCompilationFailure(DefaultScriptCompilationHandler.java:187) at org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.compileScript(DefaultScriptCompilationHandler.java:127) at org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.compileToDir(DefaultScriptCompilationHandler.java:82) at org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$CacheInitializer.execute(FileCacheBackedScriptClassCompiler.java:113) at org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$CacheInitializer.execute(FileCacheBackedScriptClassCompiler.java:92) at org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:130) at org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler$ProgressReportingInitializer.execute(FileCacheBackedScriptClassCompiler.java:117) at org.gradle.cache.internal.DefaultPersistentDirectoryCache$Initializer.initialize(DefaultPersistentDirectoryCache.java:94) at org.gradle.cache.internal.DefaultCacheAccess$2.run(DefaultCacheAccess.java:104) at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.doWriteAction(DefaultFileLockManager.java:173) at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.writeFile(DefaultFileLockManager.java:163) at org.gradle.cache.internal.DefaultCacheAccess.open(DefaultCacheAccess.java:102) at org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:46) at org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:28) at org.gradle.cache.internal.DefaultCacheFactory.doOpen(DefaultCacheFactory.java:80) at org.gradle.cache.internal.DefaultCacheFactory.open(DefaultCacheFactory.java:50) at org.gradle.cache.internal.DefaultCacheRepository$PersistentCacheBuilder.doOpen(DefaultCacheRepository.java:138) at org.gradle.cache.internal.DefaultCacheRepository$AbstractCacheBuilder.open(DefaultCacheRepository.java:121) at org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler.compile(FileCacheBackedScriptClassCompiler.java:63) at org.gradle.groovy.scripts.internal.ShortCircuitEmptyScriptCompiler.compile(ShortCircuitEmptyScriptCompiler.java:53) at org.gradle.groovy.scripts.internal.CachingScriptClassCompiler.compile(CachingScriptClassCompiler.java:41) at org.gradle.groovy.scripts.DefaultScriptCompilerFactory$ScriptCompilerImpl.compile(DefaultScriptCompilerFactory.java:50) at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:122) at org.gradle.initialization.ScriptEvaluatingSettingsProcessor.applySettingsScript(ScriptEvaluatingSettingsProcessor.java:72) at org.gradle.initialization.ScriptEvaluatingSettingsProcessor.process(ScriptEvaluatingSettingsProcessor.java:62) at org.gradle.initialization.PropertiesLoadingSettingsProcessor.process(PropertiesLoadingSettingsProcessor.java:37) at org.gradle.initialization.SettingsHandler.findSettingsAndLoadIfAppropriate(SettingsHandler.java:89) at org.gradle.initialization.SettingsHandler.findAndLoadSettings(SettingsHandler.java:46) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:121) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106) ... 34 more Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: settings file 'C:\Users\mfuerstenau\Documents\NetBeansProjects\TestProject\settings.gradle': 1: unexpected char: '\' @ line 1, column 33. rootProject.name = 'TestProject'\ ^ 1 error at org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.compileScript(DefaultScriptCompilationHandler.java:125) ... 62 more And the build.gradle looks like (similar for settings.gradle, also I shortened the file): apply plugin: 'java'\\sourceCompatibility = '1.8'\[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'\\// Ne...
Posted by s_alat7 on May 22, 2015
Re: Problem Using Standard Input
I'm not sure if copy pasting CR LF is possible but if it were, it should work. Anyway, my intended workaround is to replace LF with the platform specific line separator.
Posted by attila.kelemen on May 21, 2015
Re: Problem Using Standard Input
Thanks! This is great news. I appreciate your efforts to find this. I will ask one more question - i can't seem to get CRLF to paste into the input window. Other than that, I think this is good news.
Posted by buckfan617 on May 21, 2015
Re: Problem Using Standard Input
I have found what exactly causes this bug in Gradle and knowing it, I might be able to implement a workaround. I can't promise it for the next release but most likely the release after. Until then, if you can copy paste CR LF (i.e., "\r\n") into the input window, Gradle will flush its own buffer.
Posted by attila.kelemen on May 21, 2015
Re: Problem Using Standard Input
Sadly, there is no workaround I know of.
Posted by attila.kelemen on May 20, 2015
Re: Problem Using Standard Input
Any suggested workaround available?
Posted by buckfan617 on May 20, 2015
Re: Problem Using Standard Input
The problem is in the code forwarding the IDE provided input (not the stdin reading itself): https://issues.gradle.org/browse/GRADLE-2462
Posted by attila.kelemen on May 20, 2015
Re: Problem Using Standard Input
Interestingly enough it works from a console window (e.g. I run "gradle fulfillmentMgr") just fine. For now, I guess I'll use the command option.
Posted by buckfan617 on May 20, 2015
Re: Problem Using Standard Input
Sadly, this is a bug in Gradle which I cannot fix. The bug seems to be Windows specific. You can report it to Gradle devs (it was probably not fixed yet because very few people cares about this issue).
Posted by attila.kelemen on May 20, 2015
Problem Using Standard Input
I have an application that I am running with a Gradle project, but I am unable to enter standard input and have the program respond. The way the application works when running in the foreground allows you to enter options to see various diagnostic statuses or to simulate other inputs from separate applications. Here is the portion of the gradle file launching:
task fulfillmentMgr << { javaexec { classpath = sourceSets.main.compileClasspath //debug = true main = 'com.qcsoftware.products.fulfillmentmgr.FulfillmentMgr' args = [ '-r', '-t', "0x7431" ] systemProperties = ['CONFIG_DIR':'q:/Projects/QcDev/System/Config'] standardInput = System.in } } I can send a Ctrl+D and then i see what I am expecting but that also closes standard input and basically renders the application useless from that point on. Any suggestions would be greatly appreciated.
Posted by buckfan617 on May 20, 2015
Re: Custom tests
You have to set the "jvmArgs" property of your test task in the build script (you should do this even for when you are not running the tests from NB).
Posted by attila.kelemen on May 12, 2015
Custom tests
I love the "custom tests" option, but is there any way to configure JVM args for them? I run out of permgen space when running my integration tests this way.
Posted by rjsang on May 11, 2015
Really impressed with the Gradle plugin
Watch this screencast to see how great Gradle works for me in NetBeans, here for Minecraft: https://www.youtube.com/watch?v=OQ2oRX89daE
Posted by geertjan on Apr 25, 2015
Re: "You are using Gradle 1.8"
One of your project is set to use Gradle 1.8. Either because it is set so in the Gradle wrapper, or explicitly in the project settings.
To fix this, you have to configure the plugin to use something else (possibly in the global settings). Gradle 1.8 and Gradle 2.3 has a bug in it which makes them less usable in NetBeans, so you should avoid those Gradle versions.
Posted by attila.kelemen on Mar 30, 2015
"You are using Gradle 1.8"
I had this annoying "You are using Gradle 1.8" message when launching Netbeans.
But I run Gradle 2.3 so why the f*** is that message supposed to mean? Not to mention that it broke everything and I cannot debug any project anymore..
Posted by maxoudela on Mar 30, 2015
Re:Love the plugin however
Another thing I can think of is that not all projects have a build.gradle. It might be a source of some issue. Altough, I did a few things to workaround this problem, it can never be perfect due to how NetBeans handles projects (it has benefits in some cases though).
Posted by attila.kelemen on Mar 09, 2015
Re:Love the plugin however
Clearing the cache didn't help.
If I go into the build script for a subproject and add references to the other projects in dependencies section like this compile project(':other-project') the marking of the files in error goes away. Most of my co-workers use Eclipse and this project has been around for a while so I assume they must not have this issue. Unfortunately I don't think I can share this with you since this is proprietary software. If I have some spare time maybe I cobble together something similar with dummy projects that has the problem.
Posted by jimcross on Mar 09, 2015
Re: Love the plugin however
Can you share example project(s) with which I can reproduce your problem? If so, please submit an issue on the GitHub page.
By the way, have you tried clearing NetBeans' cache (http://stackoverflow.com/questions/8689780/how-to-clear-the-cache-in-netbeans)?
Posted by attila.kelemen on Mar 09, 2015
Love the plugin however
I have opened and worked with many projects but now have a problem with one particular project with sub-projects.
Whether I open the subproject or the entire project with subprojects the plugiin doesn't seem to recognize packages in the other projects. From a command line I can build without error. I can even build without error with the plug but plugin is marking files in error that have imports to classes in one of the other subprojects. This is Netbean 8.02 and up to date as far as I know.
Posted by jimcross on Mar 09, 2015
Re: Need support for setting build jdk
What do you mean on "allows for no changes at all"? Do you have multiple JDKs with the same major version defined? Also, can you submit an issue with the whole exception stack trace?
Posted by attila.kelemen on Mar 07, 2015
Need support for setting build jdk
As of java 8.40 gradle-plugin will no longer recognize the build script.
It is and has been a burden to uninstall all jdk's aside from the one desired, just to use said jdk. The component is already there under properties, yet it allows for no changes at all.. Caused by: org.gradle.api.GradleException: Could not generate a proxy class for class org.gradle.invocation.DefaultGradle.
Posted by jdub1581 on Mar 06, 2015
Re: gradle plugin support of Native C++
This plugin doesn't have true c++ support. (a separate plugin should be created for this purpose) You can build the project because the plugin simply executes Gradle tasks for actions like "build".
The best you can do is (as far as I know) is to create fake source sets which are only visible to NetBeans as done in https://github.com/kelemen/netbeans-gradle-project/issues/115. Anyway, I have no idea how a c++ support should look like in NB since I do not use NB for c++ development.
Posted by attila.kelemen on Mar 04, 2015
gradle plugin support of Native C++
Does the gradle plugin support JNI Native C++. When I open an existing project I see all the build.gradle files and my Java code but I do not see my C++ code. Any idea why? I can build the project inside Netbeans or outside but cannot see the C++ code inside Netbeans.
Posted by mbinkley on Mar 04, 2015
Re: Cannot open project with gradle plugin when pom.xml is present
Sadly, the preference order has to be static in NetBeans. At the moment, I do not want to change this order, but you can change it in the plugin and have a custom build for you.
To change this preference order, you have to add a "position" property to the ServiceProvider annotation in https://github.com/kelemen/netbeans-gradle-project/blob/master/netbeans-gradle-plugin/src/main/java/org/netbeans/gradle/project/NbGradleProjectFactory.java with low enough value (I think 100 would be ok).
Posted by attila.kelemen on Feb 10, 2015
Cannot open project with gradle plugin when pom.xml is present
I have been migrating a project from maven to gradle, and so have both a pom.xml and a build.gradle. When doing 'open project' it does not show as a gradle project, only maven. If I remove pom.xml, I can open the project as a gradle project.
Posted by surlykke on Feb 10, 2015
Re: Project refuses to find JavaFX Button class
It is the daemon building the project. The only way I know of to shut down is to run "gradle --stop" (using the same version of Gradle). Though, I usually just kill the process, if I don't want it. Anyway, usually you don't want to kill it because leaving it alive will speed up subsequent builds by *a lot*. Also, you can set the maxmimum memory it uses in the global settings (Misc./Gradle) by adding the JVM argument "-Xmx512m" (or whatever you see fit). Gradle defaults to "-Xmx1024m" (which is often a waste).
Posted by attila.kelemen on Jan 20, 2015
Re: Project refuses to find JavaFX Button class
Thanks for the reply ..
Problem was with that particular jdk (openfx custom build). If I was able to change platforms, I'm sure I would have noticed earlier. ;) Now I have been searching google for my other problem (probably not the plugin) ... When I build the project, everything compiles fine now. I noticed however that (even when closing netbeans) there seems to be another JVM that starts and never terminates. My guess is that this is a daemon for building the projects. How do I get it to shut down? On a fresh open of netbeans, running a "clean build", that JVM jumps up to almost 1gb memory and steadily increases over time unless I go to task manager and end the process manually. I've searched the Gradle docs, but I couldn't seem to find much info on this situation. Side note: Awesome work! EDIT: This does not happen from the cmd line..
Posted by jdub1581 on Jan 19, 2015
Re: Project refuses to find JavaFX Button class
The button problem has nothing to with the plugin (I'm sure about this). My guess is that "java.awt.Button" is imported or something like that (though I don't know your exact scenario).
About the target platform: The only thing the plugin considers is that first two numbers in the version. Say, "1.7" or "1.8" and finds an added platform with that version. This is so, that project properties might be committed into vcs. Altough, probably something have to be done about this (but noone complained yet). Currently, the only workaround is to remove the platforms, you don't want NetBeans to choose.
Posted by attila.kelemen on Jan 19, 2015
Project refuses to find JavaFX Button class
So ...
Fairly new to gradle, thought I'd do a test to try it out. I created a root project, then created the subproject, created my Main class, and other jfx related classes. In one of my classes I went to add a Button ... pretty straight forward .. The project refuses to find the javafx Button class without a fully qualified name "javafx.scene.control.Button", yet all other jfx classes are found... The project also will not allow me to change the target platform. Every time I attempt a change ie: 8.20 <-&-> 8.40ea the combo box resets to it's previous setting which is not even the default platform. I'm on an x64 system, x64 jdk and ide. I do have one x86 jdk installed and the plugin seems to default to the x86 jdk. Is x64 not supported?
Posted by jdub1581 on Jan 18, 2015
Re: Offline Mode
Sadly, there is no such config in the plugin at the moment. So, as a workaround, you have to temporarily adjust your settings.gradle by adding "startParameter.offline=true".
Posted by attila.kelemen on Jan 16, 2015
Offline Mode
Is there a way to specify gradle --offline argument in this plugin?
Whenever I am on the train, gradle attempts to refresh dependencies, and fails as there is no connection. Nothing compiles afterwards. M.
Posted by mounyainbeast on Jan 16, 2015
Re: not working without much trouble
There is quite a bit of difference between Maven and Gradle and this has to be reflected by the plugin. Anyway, if you were to create a Gradle project through NetBeans' wizard, tasks would work as they do in other project types. However, you did wrote the script by hand and the script of your linked project is wrong: It actually says, that your project need Java 5. Why does it work from the command line? Because your JAVA_HOME is set to JDK 8 and Gradle has no other option but to use that regardless what you set. NetBeans on the other hand might have JDKs to choose the best from.
As for running Gradle tasks: There is little reason to use the command line, since NetBeans will just run Gradle tasks as well. By "Main property" I assume you mean the main class containing the main method to be executed. The plugin simply executes the "run" Gradle task and does not want to know that there is actually a main class to be executed. This decision was made long time ago and there are some backward compatibility issues to consider if I want to change that. In real projects this is not usually an issue because you usually want to have a "run" task anyway (to be able to run a project from the command line without relying on NetBeans). The advice I can give you is that if you want to learn how NetBeans and Gradle works together, you should start with a project generated by NetBeans. Those projects are simple and I think you will quickly learn what expectation does NetBeans have of your project (looking at the build script).
Posted by attila.kelemen on Jan 15, 2015
not working without much trouble
Hi ... I 'finally' an the example project to build on netbeans. The project is a JavaFX demo:
* https://bitbucket.org/hansolo/fridayfunxxii/ On bitbucket. I have netbeans 8.0.1, WINDOWS 7, no gradle until now for this demo -- I thought "why not". Set gradle_home. All good? I hade all kinds of errors about an exception. When I looked, some of the plugin was defaulting to Java 1.5 and java 1.7 -- One needs Java 8 for this demo -- I did what I could on that score. No luck. Anyway I wend to the command line and did a * Gradle build Getting stuff about exceptions. In netbeans I had compile errors and stuff. Eventually I re-ran gradle on the command line: * Gradle build --stacktrace And the thing build. When I did a build in Netbeans it worked too! Spooky? Perhaps not I can't runt he program because unlike Netbeans and Maven projects; the gradel plugin doesn't let me specify a Main property. As someone knowing nothing about gradle, the plugin needs to be at least similar enough to a Maven or Netbeans project so one can 'recognise' the common Java and Groovy project tasks and properties. I'll be reading some more on gradle; for now I'm afraid it looks like I need to use the command line at least as much as the Netbeans Plugin. Perhaps starting with a fresh Netbeans 8.0.1 and new gradle and attempting to build that same project will reveal what's missing. Better yet get an experienced Netbeans person who's never used Gradle and watch what they 'do' and 'assume'. I definitely think the gui needs to support the main project properties. details: gradle -v ------------------------------------------------------------ Gradle 2.0 ------------------------------------------------------------ Build time: 2014-07-01 07:45:34 UTC Build number: none Revision: b6ead6fa452dfdadec484059191eb641d817226c Groovy: 2.3.3 Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013 JVM: 1.8.0_25 (Oracle Corporation 25.25-b02) OS: Windows 7 6.1 amd64
Posted by aplatypus on Jan 15, 2015
Re: having problem compiling
You have to create your own debug task instead of relying on the default one provided by the plugin.
For example (the "mainClass" propery is checked because run single file passes that property by default): def definedMainClass = project.hasProperty('mainClass') ? project.mainClass : '' if (definedMainClass == null) definedMainClass = '' definedMainClass = definedMainClass.toString() task debug(type: JavaExec) { dependsOn project.classes main = definedMainClass classpath = project.sourceSets.main.runtimeClasspath standardInput = System.in jvmArgs = ['-Xms128m', '-Xmx512m'] debug = true }
Posted by attila.kelemen on Nov 05, 2014
RE: having problem compiling
I found the problem, not related to plugin indeed, one subproject was depended on Gradle 1.2, had to downgrade, all working fine.
BTW, how do I pass JVM args for the debug task, tried task sections ( arguments/jvm arguments ) my prog. do not see it.
Posted by likharev on Nov 04, 2014
Re: having problem compiling
This is not a problem in this plugin because NetBeans only asks Gradle to execute the build task. So it is either a problem in Gradle or a dependency problem of your project (the latter seems more likely to me). If you think it is not a problem in your project, you might ask about it on the Gradle forums (especially since Peter Niederwieser both the author of Spock and a developer of Gradle).
Posted by attila.kelemen on Oct 31, 2014
having problem compiling
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Could not instantiate global transform class org.spockframework.compiler.SpockTransform specified at jar:file:/C:/Users/u2410358/.gradle/caches/modules-2/files-2.1/org.spockframework/spock-core/0.7-groovy-1.8/3a677d19e8d3acf3bd296c4023356256d55da5a3/spock-core-0.7-groovy-1.8.jar!/META-INF/services/org.codehaus.groovy.transform.ASTTransformation because of exception org.spockframework.util.IncompatibleGroovyVersionException: The Spock compiler plugin cannot execute because Spock 0.7.0-groovy-1.8 is not compatible with Groovy 2.3.6. For more information, see http://versioninfo.spockframework.org Spock location: file:/C:/Users/u2410358/.gradle/caches/modules-2/files-2.1/org.spockframework/spock-core/0.7-groovy-1.8/3a677d19e8d3acf3bd296c4023356256d55da5a3/spock-core-0.7-groovy-1.8.jar Groovy location: file:/C:/Users/u2410358/.gradle/wrapper/dists/gradle-2.1-bin/2pk0g2l49n2sbne636fhtlet6a/gradle-2.1/lib/groovy-all-2.3.6.jar
Posted by likharev on Oct 30, 2014
Re: Networking problem - same if installing locally
Is there anything in the messages.log of NetBeans?
Posted by attila.kelemen on Aug 28, 2014
Networking problem - same if installing locally
On installation Netbeans 7.4 get:
Networking problem in http://plugins.netbeans.org/nbpluginportal/files/nbms/1404082203_org-netbeans-gradle-project.nbm I get same message if using downloaded file with reference to local file in the message.
Posted by jimcross on Aug 27, 2014
Re: Compiler crashes when using plugin
Most likely the reason for the difference between command line compilation and the one done within NetBeans, is that the plugin will use the first appropriate version (according to targetCompatibility) found within the added Java platforms. While the command line will use the JAVA_HOME environmental variable.
ps.: You have to set "targetCompatibility" and "sourceCompatibility" as a "global" property and not as the property of compileJava.
Posted by attila.kelemen on Jul 27, 2014
Compiler crashes when using plugin
I cannot compile the project at https://github.com/juleswhite/mobilecloud-14/tree/master/assignments/Asgn1-VideoUp using the Gradle Support plugin. If I try by running the wrapper from the command line (the one the project contains), it compiles perfectly fine.
I've tried both with the default/automatically installed gradle and my own installation of gradle. Could this be an issue with my having JDK 8 installed, and the project targeting Java 7 (I do get a warning about this, and for some reason I cannot change the source version in the project properties, like I can for ordinary NetBeans or Maven projects)? Also, I see that the error occurs in a class called Jdk6JavaCompiler, am I required to install JDK 6 to make the plugin work? Would it be enough to install JDK7? I don't really want to install older versions, but I will if I have to. I tried creating a HelloWorld project from scratch, and it worked perfectly fine. EDIT: I've manage to fix it without having to install an additional version of the JDK. I simply had to manually set the source compatibility level in the build.gradle build configuration: compileJava { sourceCompatibility = 1.7 targetCompatibility = 1.7 } I also truncated the below stack trace for good measure. Issue 1 -------- Requested project: D:\Skole\Coursera\MobileCloud\mobilecloud-14\assignments\Asgn1-VideoUp Stack trace: org.gradle.tooling.BuildException: Could not execute build using Gradle installation 'D:\Java\gradle-2.0'. at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:53) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57) at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [...] Caused by: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':compileJava'. at org.gradle.initialization.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:77) at org.gradle.initialization.MultipleBuildFailuresExceptionAnalyser.transform(MultipleBuildFailuresExceptionAnalyser.java:47) at org.gradle.initialization.StackTraceSanitizingExceptionAnalyser.transform(StackTraceSanitizingExceptionAnalyser.java:30) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:107) [...] Caused by: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileJava'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64) [...] Caused by: org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details. at org.gradle.api.internal.tasks.compile.jdk6.Jdk6JavaCompiler.execute(Jdk6JavaCompiler.java:47) at org.gradle.api.internal.tasks.compile.jdk6.Jdk6JavaCompiler.execute(Jdk6JavaCompiler.java:38) at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:96) [...]
Posted by Sardtok on Jul 26, 2014
Netbeans 7.4 Could not install Gradle
I have same issue on
org.gradle.tooling.GradleConnectionException: Could not install Gradle distribution from 'http://services.gradle.org/distributions/gradle-1.11-bin.zip'. and report bug about proxy: https://github.com/kelemen/netbeans-gradle-project/issues/146
Posted by gavenkoa on Jun 27, 2014
Netbeans 7.4 Could not install Gradle (Fixed)
Hello, I hope this helps.
I am using Ubuntu 13.04 and Netbeans 7.4 with Gradle 1.10. After installing the Grade Support plugin for Netbeans I was not able to open or even create a simple Gradle project. I got this exception: Stack trace: org.gradle.tooling.GradleConnectionException: Could not install Gradle distribution from 'http://services.gradle.org/distributions/gradle-1.11-bin.zip'. at org.gradle.tooling.internal.consumer.DistributionFactory$ZippedDistribution.getToolingImplementationClasspath(DistributionFactory.java:133) at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:36) at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:40) at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:98) at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:81) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:58) at org.gradle.tooling.internal.consumer.connection.LoggingInitializerConsumerActionExecutor.run(LoggingInitializerConsumerActionExecutor.java:44) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:55) at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46) at org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(DefaultModelBuilder.java:48) at org.netbeans.gradle.project.model.GradleModelLoader.loadModelWithProgress(GradleModelLoader.java:488) at org.netbeans.gradle.project.model.GradleModelLoader.access$600(GradleModelLoader.java:57) at org.netbeans.gradle.project.model.GradleModelLoader$6.run(GradleModelLoader.java:364) at org.netbeans.gradle.project.tasks.GradleDaemonManager.runNonBlockingGradleTask(GradleDaemonManager.java:24) at org.netbeans.gradle.project.tasks.GradleDaemonManager.access$100(GradleDaemonManager.java:14) at org.netbeans.gradle.project.tasks.GradleDaemonManager$2.run(GradleDaemonManager.java:105) at org.netbeans.gradle.project.tasks.GradleDaemonManager$3.run(GradleDaemonManager.java:130) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042) Caused by: java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78) at org.gradle.wrapper.Install.createDist(Install.java:44) at org.gradle.tooling.internal.consumer.DistributionFactory$ZippedDistribution.getToolingImplementationClasspath(DistributionFactory.java:129) at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:36) at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:40) at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:98) at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:81) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:58) at org.gradle.tooling.internal.consumer.connection.LoggingInitializerConsumerActionExecutor.run(LoggingInitializerConsumerActionExecutor.java:44) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:55) at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:215) at java.util.zip.ZipFile.(ZipFile.java:145) at java.util.zip.ZipFile.(ZipFile.java:159) at org.gradle.wrapper.Install.unzip(Install.java:157) at org.gradle.wrapper.Install.access$400(Install.java:26) at org.gradle.wrapper.Install$1.call(Install.java:67) at org.gradle.wrapper.Install$1.call(Install.java:44) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) ... 13 more Afte some googling (nice sport on a good quite evening), I found that for some reason Netbeans or Gradle Wrapper is trying to use a version of Gradle that I do not have installed. In Ubuntu gradle is installed in /usr/lib/gradle/x.x if you install it through apt-get. I then open Netbeans tools/options/Miscellaneous/Gradle tab and specified the Gradle Installation Directory to /usr/lib/gradle/1.10 in my case. After this gradle project is loading properly, now I just need to fix some dependency issues, so I will keep googling for the rest of the evening. Keep coding ! Marc Andreu Fernandez.
Posted by jcramnb on Apr 26, 2014
1.2.9 version works in Netbeans 8.0 RC1
1.2.9 version works in Netbeans 8.0 RC1 !
Posted by eskatos on Feb 27, 2014
Re: Plugin tries to load every project I ever opened
It's not that the plugin opens a project but NetBeans and the plugin answers the request of the the IDE. However, I have never experienced what you wrote. I did see NB requesting information from projects from weird reason but certainly not everyone ever opened.
If you have a way to reproduce the issue, please report an issue on the Github page. I might be able to hack around this.
Posted by attila.kelemen on Jan 20, 2014
Plugin tries to load every project I ever opened
On several latest versions I noticed that when NetBeans is started the plugin tries to load every gradle project ever opened.
Is there a way to turn off such behavior and load only projects that are actually opened right now? It really is annoying since most of these projects aren't valid now but I still need them on filesystem.
Posted by AndreiLED on Jan 20, 2014
Awesome plugin
It has a few glitches but overall it's great.
It helps a lot, don't have to waste time on converting gradle projects to classic NB projects.
Posted by AndreiLED on Jan 20, 2014
Re: Project Javadoc
If you don't have the sources of the 3rd party project, then I'm afraid, it is currently not possible.
Please, file an issue on https://github.com/kelemen/netbeans-gradle-project/issues and I'll try to come up with something. In the issue, please describe where you have the javadoc (Maven repository, somewhere in the filesystem, in the project directory, etc.).
Posted by attila.kelemen on Aug 07, 2013
Project Javadoc
First of all, many thanks for this plugin and all nice features! I was just wondering how to set the project and 3rd parties javadoc?
Posted by imartinbe on Aug 07, 2013
Re: Cool Plugin, like it!
The newproject wizard itself cannot be customized. However, in the next release (probably this weekend) you will be able to define custom variables in the arguments of custom tasks to be replaced with something queried from the user. This is something I actually wrote for this purpose (even though it is a lot more generic). So, you are expected to write a Gradle task which is parameterizable from the command line (e.g.: "-PnewProjectName=MyProject"). In the Gradle task, you may create the new project based on that (although the project has to be opened manually).
I have already added a wiki page (https://github.com/kelemen/netbeans-gradle-project/wiki/Custom-Task-Variables) describing the format of the custom task variable. Note that this is not available in the current release. So, you have to build the plugin from the sources or wait for the next release.
Posted by attila.kelemen on Jun 27, 2013
Cool Plugin, like it!
Is there a smart way to customize the newproject gradle templates? As far as I can see one would have to patch the org-netbeans-gradle-project.jar
Posted by christianlerch on Jun 27, 2013
Love This Plugin
Gradle is the way to go. I would love to see it get first class support in NetBeans. Keep up the great work on this plugin. I can't go back to Ant or Maven. Gradle is like Maven without the frustration of nothing ever working the way you need it to and with 75% less code - none of which is tedious XML.
Posted by swpalmer on Jun 21, 2013
Gradle Support
Thanks for sharing this post about Gradle Support. It's nice and awesome. If I'll this post to my friends they will surely like this. What is SEO
Posted by katherine250 on Apr 07, 2013
Re: Fantastic Plugin
Thank you. Loaded projects are cached because reloading projects might take quite a bit of time. So, if you adjust the buildscript and want NetBeans to know about the changes, you have to explicitly reload the project (right click on the project and reload). Regardless, if you run a custom task, it doesn't matter if NetBeans knows about that task. That is, Gradle will simply be asked to execute the requested task.
As for idea tasks, Gradle seems to add some of them regardless if you apply the "idea" plugin or not. By the way, NetBeans relies on the idea plugin as well, so adjusting things in the idea plugin should affect NetBeans (except if you make adjustment to the xmls of Idea).
Posted by attila.kelemen on Mar 22, 2013
Fantastic Plugin
I have been looking for a way to develop with Gradle from within an IDE with the ability to run all my tests and debug easily. This was lacking in IDEA and Eclipse would have been my last choice however this plugin is everything I need right now and I am a fan of NetBeans too :)
My only issue is that tasks removed from the build file seem to be cached or at least my old idea tasks do but I can live with that. Fantastic work thanks a lot.
Posted by -tp- on Mar 22, 2013
Re: wrong download
It is not the plugin storing the url but the project you attempt to load. That is, this is the URL specified for the Gradle wrapper (in "gradle/wrapper/gradle-wrapper.properties").
Anyway, I don't think that the URL is wrong because I have just tried it and seems to work (i.e., I can download the zip from a browser). Besides, this is the URL specified in Gradle itself: https://github.com/gradle/gradle/blob/master/gradle/wrapper/gradle-wrapper.properties Could it be a proxy error? I know from experience that the proxy settings in NetBeans must be properly set because it is somehow used by the Gradle Tooling API.
Posted by attila.kelemen on Mar 06, 2013
wrong download
Hello Attila and thanks for your reply, I manually downloaded gradle and by changing the setting I successfully run it!
The gradle zip in my home directory contained only this info: Moved Permanently The document has moved here. I suppose the plugin should be updated with the new url?
Posted by dusty on Mar 06, 2013
Re: Plugin unable to download gradle
I have never seen such issue but seems weird. What JDK do you use?
Regardless, you can fix this particular problem by specifying where you have Gradle installed in the global settings: Tools/Options/Miscellaneous/Gradle/Gradle Installation Directory. This way the plugin won't try to download Gradle. Other than this, what you can try is to delete the Gradle cache (~/.gradle), maybe the zip file got corrupted somehow.
Posted by attila.kelemen on Mar 05, 2013
Plugin unable to download gradle
I'm unable to open a project, I get this error:
Failed to load Gradle project: spring-social org.gradle.tooling.GradleConnectionException: Could not install Gradle distribution from 'http://services.gradle.org/distributions/gradle-1.4-bin.zip'. at org.gradle.tooling.internal.consumer.DistributionFactory$ZippedDistribution.getToolingImplementationClasspath(DistributionFactory.java:110) at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:37) at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:42) at org.gradle.tooling.internal.consumer.connection.LazyConnection.onStartAction(LazyConnection.java:135) at org.gradle.tooling.internal.consumer.connection.LazyConnection.withConnection(LazyConnection.java:118) at org.gradle.tooling.internal.consumer.connection.LazyConnection.getModel(LazyConnection.java:108) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection$2.run(ProgressLoggingConnection.java:67) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.run(ProgressLoggingConnection.java:81) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.getModel(ProgressLoggingConnection.java:65) at org.gradle.tooling.internal.consumer.connection.LoggingInitializerConnection.getModel(LoggingInitializerConnection.java:53) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$2.run(DefaultAsyncConnection.java:61) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$3.run(DefaultAsyncConnection.java:79) at org.gradle.messaging.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Caused by: java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:214) at java.util.zip.ZipFile.(ZipFile.java:144) at java.util.zip.ZipFile.(ZipFile.java:158) at org.gradle.wrapper.Install.unzip(Install.java:148) at org.gradle.wrapper.Install.createDist(Install.java:65) at org.gradle.tooling.internal.consumer.DistributionFactory$ZippedDistribution.getToolingImplementationClasspath(DistributionFactory.java:106) ... 15 more Someone has some clues on how to fix it, even by hand?
Posted by dusty on Mar 05, 2013
Re: Re: Re: Great Plugin
Missing dependency issues would be a problem but I don't show the source folders because I don't know where they are at that time. That is, I load the project using the Tooling API of Gradle which tells me everything (where the source folders are, the dependencies, etc.) in a single method call and I have no control over it.
Posted by attila.kelemen on Nov 11, 2012
Re: Re: Great Plugin
"I don't know what you mean on "ability to edit/remove needs to be exposed", they can be edited and removed."
Sorry my bad I never spotted the button in the project properties dialog... Just going back to the issue of loading, and to give my two cents... As the project is loading, within the projects tab only the Dependencies folder and the (build/settings).gradle files are visible. meaning that when I open a gradle project I cannot get to my source/test files until gradle has finished loading. Is it possible to re-think the loading of a gradle project to allow the src/test folders to be visible, so that when a user opens a project they can immediately get to their code. Although if I understand it correctly if this was the case, netbeans would highlight missing dependency issues in the code until gradle has finished loading right? If so I think thats a reasonable, especially if those missing dependency issues are resolved in the netbeans editor as soon as the gradle project is fully loaded.
Posted by satory on Nov 10, 2012
Re: Great Plugin
Hi,
Thank you. I will try to answer your remarks.
Posted by attila.kelemen on Nov 10, 2012
Great Plugin
Hey this plugin is great, although I do have a few small issues.
I have a single project, but I notice that it takes netbeans a while to full finish loading it up when I open netbeans, where as other projects appear nearly instantaneously. An improved Project properties dialog is needed, with both core/existing netbeans java project properties pages kept, like general project information, declaring the actual paths of the Src and Test folders and even improving what actions are assigned to which gradle tasks. - Much like a maven project properties dialog shows. Custom tasks are a god send, but we need more control on them, the ability to edit/remove needs to be exposed, probably through an enhanced project properties dialog... Other than those issues that I have, I think this plugin is great.
Posted by satory on Nov 10, 2012
Re: Re: Unfortunatelly it doesn't work for me
No problem. I hope you will be able to successfully use the plugin.
Posted by attila.kelemen on Oct 24, 2012
Re: Re: Unfortunatelly it doesn't work for me
Sorry for all the fuss, turns out Bug 218373 is to blame. An attempt to install any other plugin or to update caused the installation to break down.
Managed to solve the problem by installing the latest stable release (7.2.1). Yet again sorry for the inconvenience and thank you for the prompt answer.
Posted by AndreiLED on Oct 24, 2012
Re: Unfortunatelly it doesn't work for me
I have seen this issue but I don't think it has anything to do with this plugin. That is, the plugin does not really do anything until you try to open a Gradle project.
I think it has to do something with NetBeans when installing updates through the update center and also installing a plugin. It might be due to a buggy dependency resolution. What I would do is first update NetBeans, then install the plugin (and don't install the plugin with updates from the update center). If you have stack traces, etc., it might be worth to report to the NetBeans dev. team. EDIT: I believe this is the same problem: http://netbeans.org/bugzilla/show_bug.cgi?id=178087 but reported to an earlier release. Since this occured to you while updating other components and added this plugin, I believe that it can be triggered by installing a new downloaded plugin along with updates from the update center. If you install this plugin after every update, there should be no errors (I'm using it with the latest updates).
Posted by attila.kelemen on Oct 24, 2012
Unfortunatelly it doesn't work for me
Not only it doesn't work for me, my NetBeans simply won't even start after the plugin installation.
Symptoms: 1) First during the installation it asks to install a bunch of other required plugins and then to restart the IDE. 2) During the restart NetBeans tells me that it can't enable a lot of plugins (77 total) because of unmet dependencies. And click on Disable plugins doesn't help at all - NetBeans would simply hang up on the loading splash screen and do nothing. Funny thing here is that mostly actual versions of plugins installed are higher then required by that bunch of new plugins, so why won't it work? After that I had to completely re-install NetBeans to be able event to start it. Any ideas what I may be doing wrong?
Posted by AndreiLED on Oct 24, 2012
|