Commits

shemnon  committed 3c9a1ab

Add a debug task. Really, it was that simple for NetBeans debug integration.

  • Participants
  • Parent commits edb42ec

Comments (0)

Files changed (1)

File plugin/src/main/groovy/com/bitbucket/shemnon/javafxplugin/JavaFXPlugin.groovy

         configureJavaFXSignJarTask(project)
         configureJFXDeployTask(project)
         configureRunTask(project)
+        configureDebugTask(project)
     }
 
 
         run.conventionMapping.main = {convention, aware -> convention.getPlugin(JavaFXPluginConvention).mainClass }
     }
 
+    private void configureDebugTask(Project project) {
+        def debug = project.tasks.add("debug", JavaExec)
+        debug.classpath = project.sourceSets.main.runtimeClasspath
+        debug.conventionMapping.main = {convention, aware -> convention.getPlugin(JavaFXPluginConvention).mainClass }
+        debug.debug = true
+    }
+
     public void configureConfigurations(ConfigurationContainer configurationContainer) {
         Configuration provideCompileConfiguration = configurationContainer.add(PROVIDED_COMPILE_CONFIGURATION_NAME).setVisible(false).
                 setDescription("Additional compile classpath for libraries that should not be part of the WAR archive.");