Gradle import is no longer working after last Intellij update...

Answered

For whatever reason my ability to import a project via build.gradle configuration is no longer working. Upon attempts I get an error:

The modules below are not imported from Gradle anymore.
Check those to be removed from the ide project too:    (is this english correct?)
[X] <main module name>

Why wouldn't they be loaded via gradle anymore? 

 

fyi:

IntelliJ IDEA 2016.3.3
Build #IU-163.11103.6, built on January 16, 2017

JRE: 1.8.0_112-release-408-b6 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

5 comments
Comment actions Permalink

>Why wouldn't they be loaded via gradle anymore

This happens when Gradle modules (previously imported under IDEA project and listed in Gradle projects tool window)   are no longer included into main Gradle project.

Is your project structure changed before you see this notification? Could you describe the steps to reproduce/share a sample project?

0
Comment actions Permalink

Even I'm facing same problem. I'm using latest version, I'm not sure when I'm trying to import project why is the module coming into the picture ?

0
Comment actions Permalink

I'm also getting this error. It happens for me when I create a new "Empty" project and try to import a gradle module whose files are in a separate directory named "resource".

To see the failure you get just git clone this and try to create an empty project and then just try to add the resource module by importing the resource directory and you'll see the error.

git clone https://github.com/dynamind/spring-boot-security-oauth2-minimal.git

I've always had a heck of a time trying to keep Intellij files outside of my source files.  I love to store my idea files in a directory completely separate from my source code but I've never been successful achieving this with IntelliJ.  Any guidance would be appreciated.  Rmecham@adobe.com

The build.gradle file has this information in it:

buildscript {
    ext {
        springBootVersion = '1.4.0.RELEASE'
    }
    repositories {
        mavenCentral()
        maven { url "https://repo.spring.io/milestone" }
    }
    dependencies {
        classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
    }
}

group 'dynamind'
version '0.1-SNAPSHOT'

apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'idea'
apply plugin: 'spring-boot'

jar {
    baseName = rootProject.name
    version = '0.0.1-SNAPSHOT'
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
    mavenCentral()
    maven { url "https://repo.spring.io/snapshot" }
    maven { url "https://repo.spring.io/milestone" }
}

dependencies {
    // By excluding Tomcat from starter-web and adding it as a provided dependency,
    // we can deploy as a WAR on a servlet container or run as a standalone application
    compile(group: 'org.springframework.boot', name: 'spring-boot-starter-web') {
        exclude(module: 'spring-boot-starter-tomcat')
        exclude(group: 'org.apache.tomcat.embed')
    }
    providedCompile(group: 'org.springframework.boot', name: 'spring-boot-starter-tomcat')

    compile(group: 'org.springframework.boot', name: 'spring-boot-starter-security')
    compile(group: 'org.springframework.security', name: 'spring-security-jwt', version: '1.0.3.RELEASE')
    compile(group: 'org.springframework.security.oauth', name: 'spring-security-oauth2', version: '2.0.8.RELEASE') {
        exclude(module: 'jackson-mapper-asl') // We already have a more recent jackson via Spring Boot
    }

}

// Create the wrapper support files by running 'gradle wrapper',
task wrapper(type: Wrapper) {
    gradleVersion = '2.9'
}

 

0
Comment actions Permalink

I do get this message if I import a project a second time from a 2nd workspace. Even if I imported the project the first time with UE and the second time with CE!

IDEA version:

IntelliJ IDEA 2017.1.5
Build #IU-171.4694.70, built on July 4, 2017
JRE: 1.8.0_112-release-736-b21 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Gradle 3.3 (local gradle distribution)

0
Comment actions Permalink

Похоже, что это сообщение появляется в тех случаях, когда название Gradle-проекта (rootProject.name = 'testProject') не совпадает с названием каталога проекта (например, myTestProject).

0

Please sign in to leave a comment.