Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

updated CXF and Spring for java-jaxrs-cxf sample to latest version #88

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions java/java-jaxrs-cxf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@ to reflect over property packages to discover swagger-enabled resources.
This was originally contributed by [chadhahn](https://github.com/chadhahn) and adapted
by [rvullriede](https://github.com/rvullriede). Thank you for your contributions!

Please note that in the meantime Swagger has been integrated into CXF which simplifies the setup.
Take a look at the [CXF Documentation](http://cxf.apache.org/docs/swagger2feature.html)
or [one of the samples](https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/spring_boot)
to get more information.

### To run (with Maven)
To run the server, run this task:

```
mvn package tomcat6:run
mvn package tomcat7:run
```

This will start Tomcat 6 embedded on port 8002.
This will start Tomcat 7 embedded on port 8002.

### Testing the server
Once started, you can navigate to http://localhost:8002/api/swagger.json to view the Swagger Resource Listing.
Expand Down
18 changes: 9 additions & 9 deletions java/java-jaxrs-cxf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
<artifactId>swagger-java-cxf-sample</artifactId>
<packaging>war</packaging>
<name>swagger-java-cxf-sample</name>
<version>1.0.0</version>
<version>1.1.0-SNAPSHOT</version>

<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat6-maven-plugin</artifactId>
<version>2.1</version>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<warSourceDirectory>target/${project.artifactId}-${project.version}</warSourceDirectory>
<port>8002</port>
Expand All @@ -40,7 +40,7 @@
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.6</version>
<version>2.20</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -108,7 +108,7 @@
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<version>3.0.2</version>
<executions>
<execution>
<id>copy-resources</id>
Expand Down Expand Up @@ -208,7 +208,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.9</version>
<version>1.2.3</version>
<scope>runtime</scope>
</dependency>

Expand Down Expand Up @@ -265,8 +265,8 @@
</dependencies>

<properties>
<java-version>1.6</java-version>
<springframework-version>3.2.1.RELEASE</springframework-version>
<cxf-version>2.7.15</cxf-version>
<java-version>1.7</java-version>
<springframework-version>4.3.16.RELEASE</springframework-version>
<cxf-version>3.1.15</cxf-version>
</properties>
</project>

This file was deleted.

7 changes: 3 additions & 4 deletions java/java-jaxrs-cxf/src/main/resources/applicationContext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:util="http://www.springframework.org/schema/util"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">

<import resource="classpath:META-INF/cxf/cxf.xml" />

Expand Down