Maven 如何从Sonatype获取快照

Maven 如何从Sonatype获取快照,maven,atmosphere,Maven,Atmosphere,我正在尝试获取可用于org.atmosphere的atmosphere快照版本,但似乎无法获取它 <repositories> <!-- Added to get the Atmosphere 1.1.0-SNAPSHOT, can be removed when 1.1.0 is released --> <repository> <id>oss.sonatype.org-snapshot</id>

我正在尝试获取可用于
org.atmosphere
的atmosphere快照版本,但似乎无法获取它

<repositories>
    <!-- Added to get the Atmosphere 1.1.0-SNAPSHOT, can be removed when 1.1.0 is released -->
    <repository>
        <id>oss.sonatype.org-snapshot</id>
        <url>http://oss.sonatype.org/content/repositories/snapshots</url>
        <releases><enabled>false</enabled></releases>
        <snapshots><enabled>true</enabled></snapshots>
    </repository>
</repositories>

oss.sonatype.org-snapshot
http://oss.sonatype.org/content/repositories/snapshots
假的
真的
没有任何大气版本似乎是通过添加新存储库获得的

<dependency>
    <groupId>org.atmosphere</groupId>
    <artifactId>atmosphere-runtime</artifactId>
    <version>1.1.0-SNAPSHOT</version>
    <exclusions>
        <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </exclusion>
    </exclusions>
</dependency>

组织气氛

这对我来说很好。你犯了什么错误

pom.xml
删除
$HOME/.m2/repository/org/atmosphere/cpr的内容,然后重试:)

java:package org.atmosphere.cpr不存在
和其他atmosphere包。我确实“清理”了项目。@Webnet您必须有其他依赖项。我已经包括了依赖关系树,它不包括您缺少的依赖关系。尝试清除您的本地存储库(通常为:$HOME/.m2/repository),看看这是否解决了您的问题。快照总是在变化,所以另一个选项是使用“-U”选项运行Maven(假设您使用的是Maven 3)
<?xml version="1.0"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.example</groupId>
  <artifactId>example</artifactId>
  <version>1.0</version>
  <repositories>
    <!-- Added to get the Atmosphere 1.1.0-SNAPSHOT, can be removed when 1.1.0 is released -->
    <repository>
      <id>oss.sonatype.org-snapshot</id>
      <url>http://oss.sonatype.org/content/repositories/snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  <dependencies>
    <dependency>
      <groupId>org.atmosphere</groupId>
      <artifactId>atmosphere-runtime</artifactId>
      <version>1.1.0-SNAPSHOT</version>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</project>
$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building example 1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ example ---
[INFO] org.example:example:jar:1.0
[INFO] \- org.atmosphere:atmosphere-runtime:jar:1.1.0-SNAPSHOT:compile
[INFO]    +- org.atmosphere:atmosphere-compat-jbossweb:jar:1.1.0-SNAPSHOT:compile
[INFO]    +- org.atmosphere:atmosphere-compat-tomcat:jar:1.1.0-SNAPSHOT:compile
[INFO]    +- org.atmosphere:atmosphere-compat-tomcat7:jar:1.1.0-SNAPSHOT:compile
[INFO]    \- eu.infomas:annotation-detector:jar:3.0.1:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.044s
[INFO] Finished at: Mon Apr 29 21:46:45 IST 2013
[INFO] Final Memory: 9M/301M
[INFO] ------------------------------------------------------------------------