[英]How can I include apache-cxf as a dependency in my Maven pom?
Apache CXF "syncs" their releases to the Maven central repository. Apache CXF将其发布“同步”到Maven中央存储库。 When I look at the CXF entries , there are no jar files, just the pom.
当我查看CXF条目时 ,没有jar文件,只有pom。
If I include the following section in my pom, the build fails because it can't download the cxf dependency: 如果我在我的pom中包含以下部分,则构建失败,因为它无法下载cxf依赖项:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf</artifactId>
<version>2.1.3</version>
<type>jar</type>
</dependency>
If I change the type to "pom," the build succeeds, but the appropriate jars are not downloaded (and thus, obviously, not included in the package.) 如果我将类型更改为“pom”,则构建成功,但不会下载相应的jar(因此,显然,不包含在包中)。
What am I missing? 我错过了什么?
See the samples. 查看样本。 What you did was depend on the aggregate project, and that has no effect.
你所做的是取决于聚合项目,这没有任何效果。
Typical is : 典型的是:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version>
</dependency>
<!-- Jetty is needed if you're using the CXFServlet -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-jetty</artifactId>
<version>${cxf.version}</version>
</dependency>
Point to the artifacts you need: 指向您需要的工件:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-api</artifactId>
<version>2.1.3</version>
<type>jar</type>
</dependency>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.