Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WINDUPRULE-1043][WINDUPRULE-1044] EAP XP5 rules wrt MP Metrics and O… #1063

Merged
merged 1 commit into from
Mar 6, 2024
Merged
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
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>
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>
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 {
}
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>
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 {
}
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>
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>
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>
Loading