-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WINDUPRULE-1043][WINDUPRULE-1044] EAP XP5 rules wrt MP Metrics and O…
…penTracing support removal (#1063) (#1064) (cherry picked from commit 284aa84) Co-authored-by: Eduardo Martins <emartins@redhat.com>
- Loading branch information
1 parent
d804a27
commit bbb1c2c
Showing
8 changed files
with
179 additions
and
0 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
rules/rules-reviewed/eapxp/eapxp5/eapxp_microprofile_metrics_not_supported.mta.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,42 @@ | ||
<?xml version="1.0"?> | ||
<ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="eapxp_microprofile_metrics_not_supported" | ||
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 identifies JBoss EAP XP 3.x/4.x applications that uses MicroProfile Metrics, which is not supported on JBoss EAP XP 5.x or later.</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" /> | ||
<addon id="org.jboss.windup.rules,windup-rules-xml,3.0.0.Final" /> | ||
</dependencies> | ||
<sourceTechnology id="eapxp" versionRange="(3,4)" /> | ||
<targetTechnology id="eapxp" versionRange="[5,)" /> | ||
<tag>JBossEAP</tag> | ||
<tag>EAPXP</tag> | ||
</metadata> | ||
<rules> | ||
<!-- https://issues.redhat.com/browse/WINDUPRULE-1043 --> | ||
<rule id="eapxp_microprofile_metrics_not_supported-00001"> | ||
<when> | ||
<or> | ||
<project> | ||
<artifact groupId="org.eclipse.microprofile.metrics" artifactId="microprofile-metrics-api"/> | ||
</project> | ||
<javaclass references="org.eclipse.microprofile.metric.{*}"> | ||
<location>IMPORT</location> | ||
</javaclass> | ||
</or> | ||
</when> | ||
<perform> | ||
<hint title="MicroProfile Metrics not supported" effort="1" category-id="mandatory"> | ||
<message>If you migrate your application to JBoss EAP XP 5.0 (or later), please note that MicroProfile Metrics is not supported.</message> | ||
<!-- | ||
FIXME uncomment this link when XP5 docs are published | ||
<link title="JBoss EAP XP upgrade and migration guide: MicroProfile Metrics not supported" href="https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/8.0/html-single/jboss_eap_xp_upgrade_and_migration_guide/index#microprofile_metrics_not_supported"/> | ||
--> | ||
<tag>EAPXP</tag> | ||
</hint> | ||
</perform> | ||
</rule> | ||
</rules> | ||
</ruleset> |
40 changes: 40 additions & 0 deletions
40
rules/rules-reviewed/eapxp/eapxp5/eapxp_microprofile_opentracing_not_supported.mta.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,40 @@ | ||
<?xml version="1.0"?> | ||
<ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="eapxp_microprofile_opentracing_not_supported" | ||
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 identifies JBoss EAP XP 3.x/4.x applications that uses MicroProfile OpenTracing, which is not supported on JBoss EAP XP 5.x or later.</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" /> | ||
<addon id="org.jboss.windup.rules,windup-rules-xml,3.0.0.Final" /> | ||
</dependencies> | ||
<sourceTechnology id="eapxp" versionRange="(3,4)" /> | ||
<targetTechnology id="eapxp" versionRange="[5,)" /> | ||
<tag>JBossEAP</tag> | ||
<tag>EAPXP</tag> | ||
</metadata> | ||
<rules> | ||
<!-- https://issues.redhat.com/browse/WINDUPRULE-1044 --> | ||
<rule id="eapxp_microprofile_opentracing_not_supported-00001"> | ||
<when> | ||
<or> | ||
<project> | ||
<artifact groupId="org.eclipse.microprofile.opentracing" artifactId="microprofile-opentracing-api"/> | ||
</project> | ||
<javaclass references="org.eclipse.microprofile.opentracing.{*}"/> | ||
</or> | ||
</when> | ||
<perform> | ||
<hint title="MicroProfile OpenTracing not supported" effort="1" category-id="mandatory"> | ||
<message>If you migrate your application to JBoss EAP XP 5.0 (or later), please note that MicroProfile OpenTracing is not supported.</message> | ||
<!-- | ||
FIXME uncomment this link when XP5 docs are published | ||
<link title="JBoss EAP XP upgrade and migration guide: MicroProfile OpenTracing not supported" href="https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/8.0/html-single/jboss_eap_xp_upgrade_and_migration_guide/index#microprofile_opentracing_not_supported"/> | ||
--> | ||
<tag>EAPXP</tag> | ||
</hint> | ||
</perform> | ||
</rule> | ||
</rules> | ||
</ruleset> |
5 changes: 5 additions & 0 deletions
5
...xp5/tests/data/data-eapxp_microprofile_metrics_not_supported/MicroProfileApplication.java
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,5 @@ | ||
package org.jboss.eap.xp.test; | ||
|
||
import org.eclipse.microprofile.metric.*; | ||
public class MicroProfileApplication { | ||
} |
20 changes: 20 additions & 0 deletions
20
...es-reviewed/eapxp/eapxp5/tests/data/data-eapxp_microprofile_metrics_not_supported/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,20 @@ | ||
<?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>1.0.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>eapxp_application</artifactId> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.eclipse.microprofile.metrics</groupId> | ||
<artifactId>microprofile-metrics-api</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
6 changes: 6 additions & 0 deletions
6
...tests/data/data-eapxp_microprofile_opentracing_not_supported/MicroProfileApplication.java
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,6 @@ | ||
package org.jboss.eap.xp.test; | ||
|
||
import org.eclipse.microprofile.opentracing.*; | ||
|
||
public class MicroProfileApplication { | ||
} |
20 changes: 20 additions & 0 deletions
20
...eviewed/eapxp/eapxp5/tests/data/data-eapxp_microprofile_opentracing_not_supported/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,20 @@ | ||
<?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>1.0.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>eapxp_application</artifactId> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.eclipse.microprofile.opentracing</groupId> | ||
<artifactId>microprofile-opentracing-api</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
23 changes: 23 additions & 0 deletions
23
...s/rules-reviewed/eapxp/eapxp5/tests/eapxp_microprofile_metrics_not_supported.mta.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,23 @@ | ||
<?xml version="1.0"?> | ||
<ruletest xmlns="http://windup.jboss.org/schema/jboss-ruleset" | ||
id="eapxp_microprofile_metrics_not_supported-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-eapxp_microprofile_metrics_not_supported/</testDataPath> | ||
<rulePath>../eapxp_microprofile_metrics_not_supported.mta.xml</rulePath> | ||
<ruleset> | ||
<rules> | ||
<rule id="eapxp_microprofile_metrics_not_supported-00001-test"> | ||
<when> | ||
<not> | ||
<iterable-filter size="2"> | ||
<hint-exists message="If you migrate your application to JBoss EAP XP 5.0 \(or later\), please note that MicroProfile Metrics is not supported." /> | ||
</iterable-filter> | ||
</not> | ||
</when> | ||
<perform> | ||
<fail message="[eapxp_microprofile_metrics_not_supported-00001] The hint was not found!" /> | ||
</perform> | ||
</rule> | ||
</rules> | ||
</ruleset> | ||
</ruletest> |
23 changes: 23 additions & 0 deletions
23
...les-reviewed/eapxp/eapxp5/tests/eapxp_microprofile_opentracing_not_supported.mta.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,23 @@ | ||
<?xml version="1.0"?> | ||
<ruletest xmlns="http://windup.jboss.org/schema/jboss-ruleset" | ||
id="eapxp_microprofile_opentracing_not_supported-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-eapxp_microprofile_opentracing_not_supported/</testDataPath> | ||
<rulePath>../eapxp_microprofile_opentracing_not_supported.mta.xml</rulePath> | ||
<ruleset> | ||
<rules> | ||
<rule id="eapxp_microprofile_opentracing_not_supported-00001-test"> | ||
<when> | ||
<not> | ||
<iterable-filter size="2"> | ||
<hint-exists message="If you migrate your application to JBoss EAP XP 5.0 \(or later\), please note that MicroProfile OpenTracing is not supported." /> | ||
</iterable-filter> | ||
</not> | ||
</when> | ||
<perform> | ||
<fail message="[eapxp_microprofile_opentracing_not_supported-00001] The hint was not found!" /> | ||
</perform> | ||
</rule> | ||
</rules> | ||
</ruleset> | ||
</ruletest> |