Skip to content

Run As > Groovy Script fails when script is not part of project classpath #1163

@eric-milles

Description

@eric-milles

When a groovy script is located outside of a source folder, Run As > Groovy Script fails when checking if test classpath entries should be included.

Java Model Exception: Java Model Status [<project root> [in Bugs] is not on its project's build path]
	at org.eclipse.jdt.internal.core.PackageFragmentRoot.getResolvedClasspathEntry(PackageFragmentRoot.java:630)
	at org.codehaus.groovy.eclipse.launchers.AbstractGroovyLaunchShortcut.hasTestAttribute(AbstractGroovyLaunchShortcut.java:423)
	at org.codehaus.groovy.eclipse.launchers.AbstractGroovyLaunchShortcut.launchGroovy(AbstractGroovyLaunchShortcut.java:209)
	at org.codehaus.groovy.eclipse.launchers.AbstractGroovyLaunchShortcut.launchGroovy(AbstractGroovyLaunchShortcut.java:201)
	at org.codehaus.groovy.eclipse.launchers.AbstractGroovyLaunchShortcut.launch(AbstractGroovyLaunchShortcut.java:126)
	at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(LaunchShortcutExtension.java:419)
	at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.runInternal(LaunchShortcutAction.java:83)
	at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.runWithEvent(LaunchShortcutAction.java:135)

Original source: https://stackoverflow.com/questions/63747262/run-as-groovy-script

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions