Announcement Announcement Module
Collapse
No announcement yet.
Gradle Plugin not working Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Gradle Plugin not working

    Hello ,

    I have Eclipse Version: Indigo Service Release 2 .

    I was writing a project using gradle . I wrote gradle build file without any tool and ran it through command prompt.

    One of my colleague suggested using STS plugin for Gradle development.

    I have added STS plugin on eclipse. I have also added the Gradle extension .

    The version information is : Spring IDE :Version: 3.0.0.201204032204-CI-B1483

    Now the problem I am facing is :

    when I right click build.gradle I see two option Gradle Build and Gradle Build ...

    1) By Running Gradle Build I see -

    FAILURE: Build failed with an exception.

    * Where:
    Build file '<path>\build.gradle' line: 1

    * What went wrong:
    A problem occurred evaluating root project '<project name>'.
    Cause: Could not find method apply() for arguments [{plugin=java}] on root project '<project name>'.

    * Try:
    Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.

    BUILD FAILED

    Total time: 3.432 secs

    2) When I click Gradle Build ...

    nothing happens and I see error in workspace log -Unhandled event loop exception

    I am pasting the event details :

    Code:
    eclipse.buildId=M20120208-0800
    java.version=1.6.0_23
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
    Framework arguments:  -product org.eclipse.epp.package.jee.product
    Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
    
    Error
    Wed Apr 11 08:46:01 PDT 2012
    Unhandled event loop exception
    
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    	at java.util.ArrayList.RangeCheck(Unknown Source)
    	at java.util.ArrayList.get(Unknown Source)
    	at java.util.Collections$UnmodifiableList.get(Unknown Source)
    	at com.breskeby.eclipse.gradle.launchConfigurations.GradleTasksTab.getTasks(GradleTasksTab.java:306)
    	at com.breskeby.eclipse.gradle.launchConfigurations.GradleTasksTab.initializeFrom(GradleTasksTab.java:330)
    	at org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup.initializeFrom(AbstractLaunchConfigurationTabGroup.java:86)
    	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupWrapper.initializeFrom(LaunchConfigurationTabGroupWrapper.java:194)
    	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.displayInstanceTabs(LaunchConfigurationTabGroupViewer.java:751)
    	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer$8.run(LaunchConfigurationTabGroupViewer.java:623)
    	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.inputChanged(LaunchConfigurationTabGroupViewer.java:640)
    	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.setInput0(LaunchConfigurationTabGroupViewer.java:602)
    	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.setInput(LaunchConfigurationTabGroupViewer.java:578)
    	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog.initializeContent(LaunchConfigurationPropertiesDialog.java:102)
    	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.createContents(LaunchConfigurationsDialog.java:437)
    	at org.eclipse.jface.window.Window.create(Window.java:431)
    	at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
    	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.create(LaunchConfigurationsDialog.java:368)
    	at org.eclipse.jface.window.Window.open(Window.java:790)
    	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.open(LaunchConfigurationsDialog.java:1132)
    	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog.open(LaunchConfigurationPropertiesDialog.java:203)
    	at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialog(DebugUITools.java:662)
    	at com.breskeby.eclipse.gradle.launchConfigurations.GradleLaunchShortcut.launch(GradleLaunchShortcut.java:209)
    	at com.breskeby.eclipse.gradle.launchConfigurations.GradleLaunchShortcut.launch(GradleLaunchShortcut.java:133)
    	at com.breskeby.eclipse.gradle.launchConfigurations.GradleLaunchShortcut.launch(GradleLaunchShortcut.java:75)
    	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(LaunchShortcutExtension.java:434)
    	at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.run(LaunchShortcutAction.java:73)
    	at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.runWithEvent(LaunchShortcutAction.java:121)
    	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
    	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
    	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
    	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
    	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
    	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
    	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
    	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
    	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
    	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
    	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
    	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

    Please suggest .

    Using Gradle with an IDE is an important factor in adopting Gradle in my organization as other developers use m2eclipse for maven and I have to show if STS-Gradle extension is equally powerful as m2eclipse.

    Thanks
    Priyanka

  • #2
    Hi Priyanka,

    The stacktrace you are showing suggest you have some gradle-plugin installed that isn't actually the STS one (I see 'breskeby' in the stacktrace). I know that somebody by that name was working on some Gradle support long before STS started its support. I don't think that the plugin that you are using is supported or maintained anymore by its original author. In any case, it is not supported by us, and you would have to find the original author to get support.

    I'm not certain if perhaps you have both 'breskeby plugin' (for lack of a better name) and the STS gradle plugins installed at the same time. But I'd advise you by starting with an instance of Eclipse/STS that *only* has the STS gradle plugins installed. (Having both installed will just confuse things).

    If you have STS you should be able to install gradle support from the dashboard extension page. Alternatively it can be installed from update site into Eclipse following these instructions:

    http://static.springsource.org/sts/d...tallation.html

    To remove the breskeby plugin I can't give you instructions since I don't really know how you have installed it. If you don't know how to remove it, it may be easiest to start with a fresh copy of Eclipse or STS.

    Kris

    Comment

    Working...
    X