Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WINDUPRULE-370: resteasy resource method algorithm changes (#367)
* WINDUPRULE-370: resteasy resource method algorithm changes * WINDUPRULE-370: resteasy resource method algorithm changes - changes as requested in review * WINDUPRULE-370: resteasy resource method algorithm changes - changes as requested in review * Update rules-reviewed/eap7/eap71/resteasy30-36.windup.xml Co-Authored-By: m-brophy <36955467+m-brophy@users.noreply.github.com>
- Loading branch information
Showing
3 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0"?> | ||
<ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="resteasy30-36" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd"> | ||
<metadata> | ||
<description> | ||
This ruleset provides analysis of applications that use RESTEasy 3.0 and may require | ||
individual attention when migrating to RESTEasy 3.6. | ||
</description> | ||
<dependencies> | ||
<addon id="org.jboss.windup.rules,windup-rules-javaee,3.0.0.Final" /> | ||
<addon id="org.jboss.windup.rules,windup-rules-java,3.0.0.Final" /> | ||
</dependencies> | ||
<targetTechnology id="eap" versionRange="[7,8)" /> | ||
<targetTechnology id="resteasy" versionRange="[3,)" /> | ||
</metadata> | ||
<rules> | ||
<!--https://issues.jboss.org/browse/WINDUPRULE-370 --> | ||
<rule id="resteasy30-36-00001"> | ||
<when> | ||
<project> | ||
<artifact groupId="org.jboss.spec.javax.ws.rs" artifactId="jboss-jaxrs-api_2.0_spec" /> | ||
</project> | ||
</when> | ||
<perform> | ||
<hint title="RESTEasy 3.6 - Resource Method Algorithm Switch changes" effort="1" category-id="potential"> | ||
<message>If you migrate your application from JBoss EAP from 7.1.1 to 7.2.x and want to retain the stricter behavior as defined in the JAX-RS 2.0 specification, set the `jaxrs.2.0.request.matching` option to `true`.</message> | ||
<link title="Red Hat JBoss EAP 7.2: RESTEasy Resource Method Algorithm Switch changes" href=" https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.2/html-single/migration_guide/index#migrate_resteasy_resource_method_algoritm_switch"/> | ||
<tag>resteasy</tag> | ||
</hint> | ||
</perform> | ||
</rule> | ||
</rules> | ||
</ruleset> |
26 changes: 26 additions & 0 deletions
26
rules-reviewed/eap7/eap71/tests/data/data-resteasy30-36/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.jboss.windup.rules.test</groupId> | ||
<artifactId>windup-rulesets-test-pom</artifactId> | ||
<version>4.2.1_SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>hibernate</artifactId> | ||
<name>Windup - JPA Data Models</name> | ||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>org.jboss.spec.javax.ws.rs</groupId> | ||
<artifactId>jboss-jaxrs-api_2.0_spec</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
|
||
</dependencies> | ||
|
||
|
||
</project> |
24 changes: 24 additions & 0 deletions
24
rules-reviewed/eap7/eap71/tests/resteasy30-36.windup.test.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0"?> | ||
<ruletest xmlns="http://windup.jboss.org/schema/jboss-ruleset" | ||
id="resteasy30-36-test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd"> | ||
<testDataPath>data/data-resteasy30-36/</testDataPath> | ||
<rulePath>../resteasy30-36.windup.xml</rulePath> | ||
<ruleset> | ||
<rules> | ||
<!--https://issues.jboss.org/browse/WINDUPRULE-370 --> | ||
<rule id="resteasy30-36-00001-test"> | ||
<when> | ||
<not> | ||
<iterable-filter size="1"> | ||
<hint-exists message="If you migrate your application from JBoss EAP from 7.1.1 to 7.2.x and want to retain the stricter behavior as defined in the JAX-RS 2.0 specification" /> | ||
</iterable-filter> | ||
</not> | ||
</when> | ||
<perform> | ||
<fail message="No reference to jboss-jaxrs-api_2.0_spec found in pom.xml" /> | ||
</perform> | ||
</rule> | ||
</rules> | ||
</ruleset> | ||
</ruletest> |