我在这里下载了示例大气jax-rs源代码- http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.atmosphere.samples%22%20AND%20a%3A%22atmosphere-jaxrs2-chat%22
我下载了war和sources.jar。并且可以在browser - http://search.maven.org/remotecontent?filepath=org/atmosphere/samples/atmosphere-jaxrs2-chat/1.0.7/atmosphere-jaxrs2-chat-1.0.7.pom中查看pom.xml
我想将这个pom.xml中的一些依赖项复制到我自己的pom.xml中,但我看到了如下内容-
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback-version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>${jersey-version}</version>
</dependency>我假设${logback-version}和${jersey-version}是占位符,但它们实际上设置在哪里?
发布于 2012-12-22 01:42:00
在父pom中。在pom的顶部,有一个对parent pom的引用,它保存了这些值。
this thread中的更多原理--基本上,它使多模块项目中的版本保持同步。
父定义如下所示:
<parent>
<groupId>org.codehaus.mojo</groupId>
<artifactId>my-parent</artifactId>
<version>2.0</version>
<relativePath>../my-parent</relativePath>
</parent>如在pom文档页面的inheritance section中所解释的。
https://stackoverflow.com/questions/13994679
复制相似问题