Yes, I think this fits with the way phases are designed now. I do think
that it should only happen if both an executeBefore and an executeAfter
are specified, though.
On 01/29/2015 09:15 AM, Ondrej Zizka wrote:
In other words:
It is a bit useless to figure out what phase it is in case you know both
bounds, and find the right phase to fit it in.
Sometimes the bounds span over multiple phases.
Even if you do not have the upper (execute before) bound, we could just
set ReportingPhase as the upper bound automatically.
IIUC, the phases now can be used in getBefore() and getAfter().
Correct me please if I get that incorrectly.
Thanks,
Ondra
On 29.1.2015 15:08, Ondrej Zizka wrote:
> (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(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/windup-dev
> _______________________________________________
> windup-dev mailing list
> windup-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/windup-dev
_______________________________________________
windup-dev mailing list
windup-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/windup-dev