开发者

How can I include apache-cxf as a dependency in my Maven pom?

开发者 https://www.devze.com 2022-12-18 02:25 出处:网络
Apache CXF \"syncs\" their releases to the Maven central repository.When I look at the CXF entries, there are no jar files, just the pom.

Apache CXF "syncs" their releases to the Maven central repository. When I look at the CXF entries, there are no jar files, just the pom.

If I include the following section in my pom, the build fails because it can't download the cxf dependency:

<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf</artifactId>
    <version>2开发者_StackOverflow社区.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.)

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号