首页 文章

args4J不适用于gradle

提问于
浏览
1

我完全是新手,所以这可能是一个明显的问题:

我正在使用带有gradle的eclipse,我实际上没有为junit或者东西添加依赖项没有问题,它将junit lib添加到gradle依赖项并且使用junit没有问题,但是如果我尝试使用args4j(也添加了依赖项)它只是不起作用 .

只是为了确保build.gradle没有问题

apply plugin: 'java'
apply plugin: 'eclipse'

sourceCompatibility = 1.8
version = '1.0'
jar {
    manifest {
        attributes 'Implementation-Title': 'title', 
        'Implementation-Version': version,
        'Main-Class':'path.to.main.Main'
    }
}

repositories {
    mavenCentral()
}

test {
    systemProperties 'property': 'value'
}

dependencies{
    compile 'args4j:args4j-site:2.0.25'
    testCompile group: 'junit', name: 'junit', version: '4.+'
}

不,我没有使用title或path.to.main ^^

Eclipse向我显示无法解析导入(args4j)

1 回答

  • 2

    你忘了主“args4j”模块:

    compile group: 'args4j',             name: 'args4j',        version: '2.0.25'
    compile group: 'args4j',             name: 'args4j-site',   version: '2.0.25'
    

相关问题