我试图从下面的链接创建一个基本的气氛测试。我已经从 pom 文件中下载了它所要求的所有内容。但由于某种原因,日食无法识别“@MeteorService(path = "/*", interceptors = {AtmosphereResourceLifecycleInterceptor.class})”
https://github.com/Atmosphere/atmosphere/blob/master/samples/meteor-chat/src/main/java/org/atmosphere/samples/chat/MeteorChat.java
有任何想法吗?我用的是大气0.9.7版本
Maven 安装
=======================
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building atmosphere-meteor-chat 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ atmosphere-meteor-chat ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ atmosphere-meteor-chat ---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 1 source file to Q:\myEdu\atmosphere-meteor-chat\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] \myEdu\atmosphere-meteor-chat\src\main\java\org\atmosphere\samples\chat\MeteorChat.java:[31,1] cannot find symbol
symbol: class MeteorService
@MeteorService(path = "/*", interceptors = {AtmosphereResourceLifecycleInterceptor.class})
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.542s
[INFO] Finished at: Tue Jul 24 23:10:57 EDT 2012
[INFO] Final Memory: 7M/121M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project atmosphere-meteor-chat: Compilation failure
[ERROR] \myEdu\atmosphere-meteor-chat\src\main\java\org\atmosphere\samples\chat\MeteorChat.java:[31,1] cannot find symbol
[ERROR] symbol: class MeteorService
[ERROR] @MeteorService(path = "/*", interceptors = {AtmosphereResourceLifecycleInterceptor.class})
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
POM XML
<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>org.atmosphere.samples</groupId>
<artifactId>atmosphere-meteor-chat</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>atmosphere-meteor-chat</name>
<properties>
<atmosphere.version>0.9.7</atmosphere.version>
<jersey.version>1.10</jersey.version>
<nettosphere.version>1.3.1</nettosphere.version>
<ahc.version>1.7.4</ahc.version>
<javaee.version>6.0</javaee.version>
<testng.version>6.5.2</testng.version>
<logback.version>1.0.6</logback.version>
<maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
<maven-war-plugin.version>2.1.1</maven-war-plugin.version>
<jetty.version>8.1.1.v20120215</jetty.version>
</properties>
<repositories>
<repository>
<id>Sonatype snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
<repository>
<id>Sonatype releases</id>
<url>https://oss.sonatype.org/content/repositories/releases</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-jquery</artifactId>
<version>${atmosphere.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
<version>${atmosphere.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<!-- This is ONLY required if you use Atmosphere's annotation -->
<dependency>
<groupId>eu.infomas</groupId>
<artifactId>annotation-detector</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-servlet_3.0_spec</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</project>