我正在尝试创建一个包含我的测试类的胖 jar 以及此处描述的内容:How to add test classes in JAR with Maven project
但是当我运行 maven install 时出现以下错误:
Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.3:single (make-assembly) on project formulas: Failed to create assembly: Unable to resolve dependencies for assembly 'fat-tests': Failed to resolve dependencies for assembly: Missing:
[ERROR] ----------
[ERROR] 1) org.eclipse.jetty:jetty-servlet:jar:7.6.16
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=org.eclipse.jetty -DartifactId=jetty-servlet -Dversion=7.6.16 -Dpackaging=jar -Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=org.eclipse.jetty -DartifactId=jetty-servlet -Dversion=7.6.16 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Outout 很清楚我缺少 jar,但我不明白为什么要面对它。