i activate in parent pom.xml spring support using
<activation> <file> <exists>src/main/resources/*beans.xml</exists> </file> </activation> this works fine.
when try activate cucumberjvm stuff in profile using
<activation> <file> <exists>src/test/resources/**/*.feature</exists> </file> </activation> however refuses work. guess ** wildcard ignored in context.
is normal, there workaround profile activated when .feature files present?
i'm surprised *beans.xml works.
as far can see, wildcards not supported in file activation. source code calculates profile activation based on <file> can found in fileprofileactivator. core logic goes this:
string path = //<file><exists> ... regexbasedinterpolator interpolator = new regexbasedinterpolator(); interpolator.addvaluesource(/* ${basedir} suppert */) interpolator.addvaluesource( new mapbasedvaluesource( context.getprojectproperties() ) ); interpolator.addvaluesource( new mapbasedvaluesource( context.getuserproperties() ) ); interpolator.addvaluesource( new mapbasedvaluesource( context.getsystemproperties() ) ); path = interpolator.interpolate( path, "" ); path = pathtranslator.aligntobasedirectory( path, basedir ); file f = new file( path ); if ( !f.isabsolute() ){ return false; } boolean isactive = f.exists(); and neither interpolate(...) nor aligntobasedirectory(...) process wildcards.
as workaround can try gimick <activation><property>, require calling maven build shell script.
Comments
Post a Comment