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

Commit de0ba86

Browse files
dekiDennis Kieselhorst
authored andcommitted
updated CXF and Spring for java-jaxrs-cxf sample to latest version
1 parent caffef5 commit de0ba86

File tree

4 files changed

+19
-115
lines changed

4 files changed

+19
-115
lines changed

java/java-jaxrs-cxf/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,19 @@ to reflect over property packages to discover swagger-enabled resources.
99
This was originally contributed by [chadhahn](https://github.com/chadhahn) and adapted
1010
by [rvullriede](https://github.com/rvullriede). Thank you for your contributions!
1111

12+
Please note that in the meantime Swagger has been integrated into CXF which simplifies the setup.
13+
Take a look at the [CXF Documentation](http://cxf.apache.org/docs/swagger2feature.html)
14+
or [one of the samples](https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/spring_boot)
15+
to get more information.
16+
1217
### To run (with Maven)
1318
To run the server, run this task:
1419

1520
```
16-
mvn package tomcat6:run
21+
mvn package tomcat7:run
1722
```
1823

19-
This will start Tomcat 6 embedded on port 8002.
24+
This will start Tomcat 7 embedded on port 8002.
2025

2126
### Testing the server
2227
Once started, you can navigate to http://localhost:8002/api/swagger.json to view the Swagger Resource Listing.

java/java-jaxrs-cxf/pom.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
<artifactId>swagger-java-cxf-sample</artifactId>
1212
<packaging>war</packaging>
1313
<name>swagger-java-cxf-sample</name>
14-
<version>1.0.0</version>
14+
<version>1.1.0-SNAPSHOT</version>
1515

1616
<build>
1717
<sourceDirectory>src/main/java</sourceDirectory>
1818
<plugins>
1919
<plugin>
2020
<groupId>org.apache.tomcat.maven</groupId>
21-
<artifactId>tomcat6-maven-plugin</artifactId>
22-
<version>2.1</version>
21+
<artifactId>tomcat7-maven-plugin</artifactId>
22+
<version>2.2</version>
2323
<configuration>
2424
<warSourceDirectory>target/${project.artifactId}-${project.version}</warSourceDirectory>
2525
<port>8002</port>
@@ -40,7 +40,7 @@
4040
</plugin>
4141
<plugin>
4242
<artifactId>maven-failsafe-plugin</artifactId>
43-
<version>2.6</version>
43+
<version>2.20</version>
4444
<executions>
4545
<execution>
4646
<goals>
@@ -108,7 +108,7 @@
108108
</plugin>
109109
<plugin>
110110
<artifactId>maven-resources-plugin</artifactId>
111-
<version>2.6</version>
111+
<version>3.0.2</version>
112112
<executions>
113113
<execution>
114114
<id>copy-resources</id>
@@ -208,7 +208,7 @@
208208
<dependency>
209209
<groupId>ch.qos.logback</groupId>
210210
<artifactId>logback-classic</artifactId>
211-
<version>1.0.9</version>
211+
<version>1.2.3</version>
212212
<scope>runtime</scope>
213213
</dependency>
214214

@@ -265,8 +265,8 @@
265265
</dependencies>
266266

267267
<properties>
268-
<java-version>1.6</java-version>
269-
<springframework-version>3.2.1.RELEASE</springframework-version>
270-
<cxf-version>2.7.15</cxf-version>
268+
<java-version>1.7</java-version>
269+
<springframework-version>4.3.9.RELEASE</springframework-version>
270+
<cxf-version>3.1.12</cxf-version>
271271
</properties>
272272
</project>

java/java-jaxrs-cxf/src/main/java/io/swagger/sample/resource/JavaRestResourceUtil.java

Lines changed: 0 additions & 100 deletions
This file was deleted.

java/java-jaxrs-cxf/src/main/resources/applicationContext.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:util="http://www.springframework.org/schema/util"
55
xmlns:context="http://www.springframework.org/schema/context"
66
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
7-
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
8-
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
9-
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
10-
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
7+
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
8+
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
9+
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
1110

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

0 commit comments

Comments
 (0)