11package com .devonfw .sample .archunit ;
22
33import static com .tngtech .archunit .lang .syntax .ArchRuleDefinition .noClasses ;
4+ import static com .tngtech .archunit .lang .syntax .ArchRuleDefinition .priority ;
45
56import java .util .Arrays ;
67import java .util .HashSet ;
1415import com .tngtech .archunit .lang .ArchCondition ;
1516import com .tngtech .archunit .lang .ArchRule ;
1617import com .tngtech .archunit .lang .ConditionEvents ;
18+ import com .tngtech .archunit .lang .Priority ;
1719import com .tngtech .archunit .lang .SimpleConditionEvent ;
1820
1921@ AnalyzeClasses (packages = "com.devonfw.sample.archunit" , importOptions = ImportOption .DoNotIncludeTests .class )
@@ -39,7 +41,7 @@ public class ThirdPartyRulesTest {
3941 + " which implements the javax.persistence.AttributeConverter instead of the 'javax.persistance.Convert' annotation" );
4042
4143 @ ArchTest
42- public static ArchRule check_mysema_dependency = noClasses ().should ().dependOnClassesThat ()
44+ public static ArchRule check_mysema_dependency = priority ( Priority . HIGH ). noClasses ().should ().dependOnClassesThat ()
4345 .resideInAPackage ("com.mysema.query.." )
4446 .because ("Use official QueryDSL (com.querydsl.* e.g. from com.querydsl:querydsl-jpa)." );
4547
@@ -62,7 +64,8 @@ public void check(JavaClass source, ConditionEvents events) {
6264 String targetFullName = dependency .getTargetClass ().getFullName ();
6365 String targetClassDescription = dependency .getDescription ();
6466 /*
65- * In case the project has a classic architecture using scopes, check that no API scoped class is using
67+ * In case the project has a classic architecture using scopes, check that no
68+ * API scoped class is using
6669 * 'javax.transaction.Transactional'
6770 */
6871 if (isApiScopedClassUsingTransactional (source , targetFullName ) == true ) {
@@ -204,8 +207,10 @@ public void check(JavaClass source, ConditionEvents events) {
204207 events .add (new SimpleConditionEvent (source , true , message ));
205208 }
206209 /*
207- * In case the project has a classic architecture that uses scopes, check that Hibernate.Envers are only
208- * utilized inside the impl scope of the dataaccess layer. In addition, Hibernate internals also need to be
210+ * In case the project has a classic architecture that uses scopes, check that
211+ * Hibernate.Envers are only
212+ * utilized inside the impl scope of the dataaccess layer. In addition,
213+ * Hibernate internals also need to be
209214 * used inside the impl scope of the dataaccess layer.
210215 */
211216 if (isNotImplementingHibernateEnversInImplScope (source , targetClass ) == true ) {
0 commit comments