Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3999932
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:43:09+00:00 2026-05-20T07:43:09+00:00

When doing a serious refactor in a Java Eclipse project I will often break

  • 0

When doing a serious refactor in a Java Eclipse project I will often break the build, but focus on getting one test to pass at a time. When running the tests Eclipse warns that the project cannot be compiled, but it will still run the tests it can compile.

Now I’m using SBT and would like to achieve the same thing with ‘test-only’, but it tries to compile the whole project, fails, and doesn’t run the tests. How can I tell it to just compile the bits it can and run the tests.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T07:43:10+00:00Added an answer on May 20, 2026 at 7:43 am

    You should add the following task to your project definition:

    import sbt._
    
    class Project(info: ProjectInfo) extends DefaultProject(info) {
    
      lazy val justTest = testTask(testFrameworks, testClasspath, testCompileConditional.analysis, testOptions)
    
    }
    

    This is the same as the ordinary test task, but has no dependencies attached at the end. If you’d like it to have dependencies, call dependsOn on the testTask(...) expression and provide the tasks you want it to depend on.

    testTask(testFrameworks, testClasspath, testCompileConditional.analysis, testOptions).dependsOn(testCompile, copyResources, copyTestResources) 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Doing the below will reproduce my problem: New WPF Project Add ListView Name the
We're doing some serious games interface work. Games allow unique new interfaces, but we
I'm doing an iPad tech demo and I'm running into a serious technical problem.
I've got a serious problem with my GPS on my Nexus One: I wrote
I'm doing a project for a college class I'm taking. I'm using PHP to
I am running into some serious memory leaks in one of my applications I
Maybe im just an idiot, but I am having serious issues mapping relationships with
I come from a computer science. background, but I am now doing genomics. My
I'm doing some serious hacking. And at a certain point in my row of
I've used WPF for quite some time now, but I've never looked serious into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.