Joe
Joe

Reputation: 8042

How do you run unit tests in Netbeans 8.0 without downloading Maven dependencies?

I am using Netbeans 8.0 and running unit tests in Java. When I run the tests, it downloads all the dependencies. I want it to not download the dependencies and just assume everything is up to date.

I tried adding offline under Actions, but it doesn't work.

Also, I would like to re-compile my project, which it does not do automatically when I test.

Upvotes: 0

Views: 629

Answers (1)

mkleint
mkleint

Reputation: 2321

you don't mention the netbeans version, but by default 8.0 will do compile on saving. So you have to turn it off to get the sources compiled on test execution.

dependencies should be downloaded in your local repository once and cached, unless you have some maven settings turned on to keep on retrying (eg. for snapshots).

AFAIK you cannot turn --offline per action mapping, just globally in Tools/Options.

Upvotes: 1

Related Questions