I can´t import org.apache.commons.net.FTPClient


(Osmay Moya Miranda) #1

Hello, I need to use de FTPClient from apache.commons.net in a Gradle proyect in Eclipse IDE, but I can´t import de class. This is my build.gradle archive:

buildscript {
ext {
kotlinVersion = '1.1.51’
springBootVersion = ‘1.5.8.RELEASE’
}
repositories {
mavenCentral()
maven {
url “https://plugins.gradle.org/m2/
}
}
dependencies {
classpath(“org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}”)
classpath(“org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}”)
classpath(“org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}”)
classpath(“org.jetbrains.kotlin:kotlin-noarg:${kotlinVersion}”)
classpath(“gradle.plugin.org.gradle.kotlin:gradle-kotlin-dsl-plugins:0.12.0”)
}
}

apply plugin: 'kotlin’
apply plugin: 'kotlin-spring’
apply plugin: 'eclipse’
apply plugin: 'org.springframework.boot’
apply plugin: 'kotlin-jpa’
apply plugin: ‘org.gradle.kotlin.kotlin-dsl’

group = 'com.webservice’
version = '0.0.1-SNAPSHOT’
sourceCompatibility = 1.8

jar {
manifest {
attributes ‘Main-Class’: ‘com.webservice.PeajeWebServiceApplication’
}
}

springBoot {
executable = true
}

compileKotlin {
kotlinOptions.jvmTarget = “1.8”
}

compileTestKotlin {
kotlinOptions.jvmTarget = “1.8”
}

repositories {
mavenCentral()
}

dependencies {
compile(‘org.springframework.boot:spring-boot-starter-data-jpa’)
compile(‘org.springframework.boot:spring-boot-starter-web’)
compile(‘org.springframework.boot:spring-boot-starter-web-services’)
compile(‘org.springframework.boot:spring-boot-starter-data-jpa’)
compile(‘org.springframework.boot:spring-boot-starter-log4j2’)
compile(“org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}”)
compile(“org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}”)
compile(‘commons-net:commons-net:3.6’)
runtime(‘org.postgresql:postgresql’)

testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('commons-net:commons-net:3.6')

}

configurations {
compile.exclude module: ‘spring-boot-starter-logging’
}

Please, can somebody help me to find the error


(Osmay Moya Miranda) #2

Hi, the problem is not from gradle. The problem was that I need to refresh the Eclipse project and include done. Thanks