views:

52

answers:

2

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.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?

+1  A: 

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>
bmargulies
Which samples are you referring to?
Jared
The samples in the CXF distribution. I recommend downloading a CXF release even if you use maven to plug it in.
bmargulies
A: 

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