Search code examples
javaintellij-ideajunit

Offline IntelliJ installation and junit


I've seen similar questions but my installation has no outside connectivity. I've tried the recommendations in several posts I'll link below but my issue persists. I downloaded both junit and hamcrest per installation instructions and have been trying to get my project to recognize junit.

offline junit files

First, the error I'm receiving when attempting to debug:

No cached. version listing for junit

I have added them to my project under Project Settings -> Libraries

Libraries

I have added them as modules via Project Settings -> Modules

Project Settings - Modules

I have it added via Gradle as a dependency:

Gradle dependency

What am I missing? Still very much new to IntelliJ so any and all help is welcome. Thanks!

Setting up JUnit with IntelliJ IDEA

Importing JUnit into Intellij


Solution

  • Thanks for all who responded but ultimately I discovered that IntelliJ was trying to update Gradle even with "Toggle Offline Mode" enabled within Gradle settings.

    By navigating to File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle and manually settings the distribution to "Local installation" it no longer attempted to download itself and behaved appropriately.