[windup-dev] Phases, after, before

Ondrej Zizka ozizka at redhat.com
Thu Jan 29 09:08:35 EST 2015


(Re-sending from my RH account, pls reply to this, thx)


On 29.1.2015 15:07, "Ing. Ondřej Žižka" wrote:
> 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
>
> _______________________________________________
> windup-dev mailing list
> windup-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/windup-dev



More information about the windup-dev mailing list