0

Note: I'm asking/answering this question because I didn't find my solution anywhere else.

I am getting the following error message in my ServerMain.java file when I try running my maven project:

cannot access org.eclipse.jetty.util.thread.ThreadPool

I have the jar file, I added org.eclipse.jett:jetty-util in my pom.xml file but no matter how I add the library I still don't have access to it. Here is how it is included in my 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>
rhavelka
  • 2,283
  • 3
  • 22
  • 36

1 Answers1

0

I figured out what was going on. I needed to remove the <scope> tag from the xml. I'm not sure how it got on there in the first place since the maven site does not limit the scope for jetty-util. The dependency needs to be included like this

<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-util</artifactId>
    <version>9.1.5.v20140505</version>
</dependency>
rhavelka
  • 2,283
  • 3
  • 22
  • 36