存储库运作?

时间:2012-09-15 18:07:29

标签: maven repository

这个maven存储库是否可以从eclipse运行?

<repository>
  <id>tapx</id>
  <name>howard lewisship snapshot repository</name>
  <url>http://howardlewisship.com/snapshot-repository/</url>
  <snapshots>
    <enabled>true</enabled>
    <updatePolicy>never</updatePolicy>
    <checksumPolicy>fail</checksumPolicy>
  </snapshots>
</repository>

1 个答案:

答案 0 :(得分:2)

这个问题并没有特别与Eclipse有关,而是Maven。

假设您正在使用m2eclipse,您可以使用Browsing and Manipulating Maven Repositories docs中详述的存储库浏览器。由于我不是Eclipse用户,我更喜欢使用命令行。

要回答您的(非编程)问题,AFAICT,是的,存储库工作正常。

pom代码段 - 也适用于快照设置,但不是必需的。

  <repositories>
    <repository>
      <id>tapx</id>
      <name>howard lewisship snapshot repository</name>
      <url>http://howardlewisship.com/snapshot-repository/</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>com.howardlewisship</groupId>
      <artifactId>tapx-core</artifactId>
      <version>1.2-SNAPSHOT</version>
    </dependency>
  </dependencies>

依赖:树输出

[...maven/playground]$ mvn dependency:tree
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ test ---
[INFO] com.davelnewton:test:jar:1.0.0-SNAPSHOT
[INFO] \- com.howardlewisship:tapx-core:jar:1.2-SNAPSHOT:compile
[INFO]    \- org.apache.tapestry:tapestry-core:jar:5.3.4:compile
[INFO]       +- org.antlr:antlr-runtime:jar:3.3:compile
[INFO]       |  \- org.antlr:stringtemplate:jar:3.2.1:compile
[INFO]       |     \- antlr:antlr:jar:2.7.7:compile
[INFO]       +- commons-codec:commons-codec:jar:1.5:compile
[INFO]       +- org.apache.tapestry:tapestry-json:jar:5.3.4:compile
[INFO]       \- org.apache.tapestry:tapestry-ioc:jar:5.3.4:compile
[INFO]          +- org.slf4j:slf4j-api:jar:1.6.1:compile
[INFO]          +- org.apache.tapestry:tapestry-func:jar:5.3.4:compile
[INFO]          +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile
[INFO]          +- javax.inject:javax.inject:jar:1:compile
[INFO]          +- log4j:log4j:jar:1.2.14:compile
[INFO]          +- org.apache.tapestry:tapestry5-annotations:jar:5.3.4:compile
[INFO]          +- javassist:javassist:jar:3.12.1.GA:compile
[INFO]          \- org.apache.tapestry:plastic:jar:5.3.4:compile

You can also browse the repo from the web.