[windup-dev] Phases, after, before

"Ing. Ondřej Žižka" zizka at seznam.cz
Thu Jan 29 09:07:24 EST 2015


Hi all,

see the code below.

Originally I thought that getPhase() was removed entirely.
Now I see that we have all of getExecuteAfter(), getExecuteBefore() and 
getPhase().

I suggest that we do NOT set the default phase MigrationRules in case 
both getExecuteAfter() and getExecuteBefore() are overriden (return 
something).
That will allow users to omit getPhase().
See the code and exception below for motivation.

WDYT?

===============================
public class SkipArchivesRules extends WindupRuleProvider
{
     @Override
     public List<Class<? extends WindupRuleProvider>> getExecuteAfter()
     {
         return asClassList(IdentifyArchivesRules.class, 
SkipArchivesLoadConfigRules.class);
     }

     @Override
     public List<Class<? extends WindupRuleProvider>> getExecuteBefore()
     {
         return asClassList(DecompileArchivesRuleProvider.class);
     }

java.lang.RuntimeException: Dependency cycles detected: Found dependency 
cycle involving: _DEFAULT_.SkipArchivesRules
     Subcycle: _DEFAULT_.SkipArchivesRules
     Subcycle: 
org.jboss.windup.rules.apps:rules-java.DecompileArchivesRuleProvider
     Subcycle: 
org.jboss.windup.quickstarts:windup-skiparchives.IdentifyArchivesRules
     Subcycle: InitialAnalysis
     Subcycle: 
org.jboss.windup.quickstarts:windup-skiparchives.SkipArchivesLoadConfigRules
     Subcycle: 
org.jboss.windup.quickstarts:windup-skiparchives.SkipArchivesRules
     Subcycle: MigrationRules
     Subcycle: 
org.jboss.windup.rules.apps:rules-java.AnalyzeJavaFilesRuleProvider



More information about the windup-dev mailing list