对于个人项目,我想使用这个git项目:https://github.com/ahlashkari/CICFlowMeter,否则我会遇到一个问题:
type Jar
type JavaExec
:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':compileClasspath'.
> Could not find org.jnetpcap:jnetpcap:1.4.1.
Searched in the following locations:
file:/root/.m2/repository/org/jnetpcap/jnetpcap/1.4.1/jnetpcap-1.4.1.pom
file:/root/.m2/repository/org/jnetpcap/jnetpcap/1.4.1/jnetpcap-1.4.1.jar
https://repo.maven.apache.org/maven2/org/jnetpcap/jnetpcap/1.4.1/jnetpcap-1.4.1.pom
https://repo.maven.apache.org/maven2/org/jnetpcap/jnetpcap/1.4.1/jnetpcap-1.4.1.jar
https://clojars.org/repo/org/jnetpcap/jnetpcap/1.4.1/jnetpcap-1.4.1.pom
https://clojars.org/repo/org/jnetpcap/jnetpcap/1.4.1/jnetpcap-1.4.1.jar
Required by:
project :
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
1 actionable task: 1 executed我做了git所要求的:
//linux :at the pathtoproject/jnetpcap/linux/jnetpcap-1.4.r1425
//windows: at the pathtoproject/jnetpcap/win/jnetpcap-1.4.r1425
mvn install:install-file -Dfile=jnetpcap.jar -DgroupId=org.jnetpcap -DartifactId=jnetpcap -Dversion=1.4.1 -Dpackaging=jar然后
//linux:
$ sudo bash
$ gradle execute
//windows:
$ gradlew execute(我在Fedora上)
你有什么想法吗?
发布于 2020-05-22 19:03:36
经过几次搜索,下面是我是如何解决这个问题的:
我打开build.gradle并在第20行替换了:
compile group: 'org.jnetpcap', name: 'jnetpcap', version:'1.4.1'通过
compile group: 'jnetpcap', name: 'jnetpcap', version:'1.4.r1425-1g'就是这样!
https://stackoverflow.com/questions/61939324
复制相似问题