Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法访问Java库_Java_Maven_Jetty_Pom.xml - Fatal编程技术网

无法访问Java库

无法访问Java库,java,maven,jetty,pom.xml,Java,Maven,Jetty,Pom.xml,注意:我之所以问/回答这个问题,是因为我在其他地方没有找到解决方案 尝试运行maven项目时,我在ServerMain.java文件中收到以下错误消息: 无法访问org.eclipse.jetty.util.thread.ThreadPool 我有jar文件,我在pom.xml文件中添加了org.eclipse.jett:jetty util,但无论我如何添加库,我仍然无法访问它。下面是如何将其包含在我的pom.xml中的 <!-- https://mvnrepository.com/ar

注意:我之所以问/回答这个问题,是因为我在其他地方没有找到解决方案

尝试运行maven项目时,我在ServerMain.java文件中收到以下错误消息:

无法访问org.eclipse.jetty.util.thread.ThreadPool

我有jar文件,我在pom.xml文件中添加了
org.eclipse.jett:jetty util
,但无论我如何添加库,我仍然无法访问它。下面是如何将其包含在我的pom.xml中的

<!-- https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-util -->
<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-util</artifactId>
    <version>9.1.5.v20140505</version>
    <scope>test</scope>
</dependency>

org.eclipse.jetty
码头
9.1.5.v20140505
测试

我知道发生了什么。我需要从xml中删除
标记。我不确定它一开始是如何出现的,因为maven站点并没有限制它的应用范围。需要像这样包含依赖项

<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-util</artifactId>
    <version>9.1.5.v20140505</version>
</dependency>

org.eclipse.jetty
码头
9.1.5.v20140505