Intellij IDEA not importing dependencies from @Grab in Groovy project

GKelly picture GKelly · Aug 26, 2013 · Viewed 10.2k times · Source

I have a groovy script I am working on, which imports dependencies using the @Grab annotation. This script will run within IDEA, and from the command line. However, within the IDE, the imports are shown in red (as unresolvable), and no auto-completion on the classes so imported is given.

I am accessing a corporate repository via a proxy, which has been configured as the Http Proxy within IDEA (the module should be, and is, in my local .m2 repo anyway!)

Anyone got any ideas (no pun intended!)?

I am using IntelliJ IDEA 12.5 Ultimate (IU-129.1135), JRE 1.7, and Groovy 2.1.6

Answer

Remi Mélisson picture Remi Mélisson · Aug 30, 2013

As stated by CrazyCoder, Alt + Enter then select Grab the artifacts and Enter