I'm trying to build basic Java/Groovy project using Gradle. i have one groovy class, one jar file and and xml file with the following file structure:
Project Structure:
QB/
/src/
/main/
/groovy/somefile.groovy
/lib/
/jcifs-1.3.17.jar
/config/
/config.xml
/build.gradle
The build.gradle file content:
apply plugin: 'java'
apply plugin: 'groovy'
targetCompatibility = "1.6"
sourceCompatibility = "1.6"
version = "1-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
groovy group: 'org.codehaus.groovy', name: 'groovy', version: '1.8.5'
runtime fileTree(dir: 'lib', includes: ['*.jar'])
}
But i keep getting this error:
:compileJava UP-TO-DATE
:compileGroovy
[ant:groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
[ant:groovyc] ..../QB/src/main/groovy/QuickBookSync.groovy: 2: unable to resolve class jcifs.smb.SmbFile
[ant:groovyc] @ line 2, column 1.
[ant:groovyc] import jcifs.smb.SmbFile
[ant:groovyc] ^
[ant:groovyc]
[ant:groovyc] ..../QB/src/main/groovy/QuickBookSync.groovy: 3: unable to resolve class jcifs.smb.SmbFileInputStream
[ant:groovyc] @ line 3, column 1.
[ant:groovyc] import jcifs.smb.SmbFileInputStream
[ant:groovyc] ^
[ant:groovyc]
[ant:groovyc] ..../QB/src/main/groovy/QuickBookSync.groovy: 1: unable to resolve class jcifs.smb.NtlmPasswordAuthentication
[ant:groovyc] @ line 1, column 1.
[ant:groovyc] import jcifs.smb.NtlmPasswordAuthentication
[ant:groovyc] ^
[ant:groovyc]
[ant:groovyc] 3 errors
[ant:groovyc]
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileGroovy'.
Cause: Forked groovyc returned error code: 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
any thoughts?
thanks
jcifs-1.3.17.jar
似乎是编译依赖性,但您jcifs-1.3.17.jar
其设为运行时依赖性。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.