Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run/debug uses gradle test when it shouldn't #353

Open
robaho opened this issue Dec 23, 2024 · 1 comment
Open

run/debug uses gradle test when it shouldn't #353

robaho opened this issue Dec 23, 2024 · 1 comment

Comments

@robaho
Copy link

robaho commented Dec 23, 2024

Often times, a standalone java program will be placed in the src/test folder to avoid having it included in a minimal production jar. The problem is that if you try to run that program using a 'launch configuration' it always uses the gradle test command - which fails.

For example:

src/test/SimpleFileServer.java

it tries to run using:

JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-23.jdk/Contents/Home"
cd /Users/robertengels/httpserver; ./gradlew --configure-on-demand -x check cleanTest test --debug-jvm --tests SimpleFileServer

which fails, because SimpleFileServer is not a "test" (i.e. does not extend TestCase, etc.)

Is there any way to make this work?

Using extension 23.0.1 and VSCode 1.96.2

@robaho
Copy link
Author

robaho commented Dec 23, 2024

You can see a sample project at github.com/robaho/httpserver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant