Information:Using javac 1.8.0_45 to compile java sources Information:java: Errors occurred while compiling module 'java' Information:22.04.2016 2:37 - Compilation completed with 5 errors and 9 warnings in 1 sec Warning:java: Cannot find annotation method 'value()' in type 'org.eclipse.jetty.util.annotation.ManagedObject': class file for org.eclipse.jetty.util.annotation.ManagedObject not found Warning:java: Cannot find annotation method 'value()' in type 'org.eclipse.jetty.util.annotation.Name': class file for org.eclipse.jetty.util.annotation.Name not found Warning:java: Cannot find annotation method 'value()' in type 'org.eclipse.jetty.util.annotation.Name' Warning:java: Cannot find annotation method 'value()' in type 'org.eclipse.jetty.util.annotation.ManagedAttribute': class file for org.eclipse.jetty.util.annotation.ManagedAttribute not found Warning:java: Cannot find annotation method 'value()' in type 'org.eclipse.jetty.util.annotation.ManagedAttribute' Warning:java: Cannot find annotation method 'readonly()' in type 'org.eclipse.jetty.util.annotation.ManagedAttribute' Warning:java: Cannot find annotation method 'value()' in type 'org.eclipse.jetty.util.annotation.ManagedObject' Warning:java: Cannot find annotation method 'value()' in type 'org.eclipse.jetty.util.annotation.ManagedOperation': class file for org.eclipse.jetty.util.annotation.ManagedOperation not found Warning:java: Cannot find annotation method 'impact()' in type 'org.eclipse.jetty.util.annotation.ManagedOperation' E:\JAVAWEB\src\main\java\src\main\Main.java Error:(13, 16) java: cannot access org.eclipse.jetty.util.component.ContainerLifeCycle class file for org.eclipse.jetty.util.component.ContainerLifeCycle not found Error:(15, 25) java: cannot access org.eclipse.jetty.util.thread.ThreadPool class file for org.eclipse.jetty.util.thread.ThreadPool not found Error:(16, 15) java: cannot access org.eclipse.jetty.util.Attributes class file for org.eclipse.jetty.util.Attributes not found Error:(18, 15) java: cannot access org.eclipse.jetty.util.component.LifeCycle class file for org.eclipse.jetty.util.component.LifeCycle not found Error:(19, 15) java: cannot access org.eclipse.jetty.util.component.Destroyable class file for org.eclipse.jetty.util.component.Destroyable not found Main.class
package main; import servlets.MirrowServlet; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; public class Main { public static void main(String[] args) throws Exception { MirrowServlet allRequestsServlet = new MirrowServlet(); ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); context.addServlet(new ServletHolder(allRequestsServlet), "/*"); Server server = new Server(8080); server.setHandler(context); server.start(); server.join(); } } pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>java.webproject</groupId> <artifactId>new-web</artifactId> <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-server</artifactId> <version>9.3.8.v20160314</version> </dependency> <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-webapp</artifactId> <version>9.3.9.M1</version> </dependency> <dependency> <groupId>org.freemarker</groupId> <artifactId>freemarker</artifactId> <version>2.3.20</version> </dependency> </dependencies> </project>