12
12
import io .cucumber .core .plugin .PrettyFormatter ;
13
13
import io .cucumber .core .plugin .ProgressFormatter ;
14
14
import io .cucumber .core .plugin .RerunFormatter ;
15
+ import io .cucumber .core .plugin .TeamCityPlugin ;
15
16
import io .cucumber .core .plugin .TestNGFormatter ;
16
17
import io .cucumber .core .plugin .TimelineFormatter ;
17
18
import io .cucumber .core .plugin .UnusedStepsSummaryPrinter ;
@@ -44,15 +45,16 @@ public class PluginOption implements Options.Plugin {
44
45
put ("timeline" , TimelineFormatter .class );
45
46
put ("unused" , UnusedStepsSummaryPrinter .class );
46
47
put ("usage" , UsageFormatter .class );
48
+ put ("teamcity" , UsageFormatter .class );
47
49
}};
48
50
49
51
// Refuse plugins known to implement the old API
50
- private static final HashMap <String , Class <? extends Plugin >> OLD_INTELLIJ_IDEA_PLUGIN_CLASSES = new HashMap <String , Class <? extends Plugin >>() {{
51
- put ("org.jetbrains.plugins.cucumber.java.run.CucumberJvmSMFormatter" , PrettyFormatter .class );
52
- put ("org.jetbrains.plugins.cucumber.java.run.CucumberJvm2SMFormatter" , PrettyFormatter .class );
53
- put ("org.jetbrains.plugins.cucumber.java.run.CucumberJvm3SMFormatter" , PrettyFormatter .class );
54
- put ("org.jetbrains.plugins.cucumber.java.run.CucumberJvm4SMFormatter" , PrettyFormatter .class );
55
- put ("org.jetbrains.plugins.cucumber.java.run.CucumberJvm5SMFormatter" , PrettyFormatter .class );
52
+ private static final HashMap <String , Class <? extends Plugin >> INCOMPATIBLE_INTELLIJ_IDEA_PLUGIN_CLASSES = new HashMap <String , Class <? extends Plugin >>() {{
53
+ put ("org.jetbrains.plugins.cucumber.java.run.CucumberJvmSMFormatter" , TeamCityPlugin .class );
54
+ put ("org.jetbrains.plugins.cucumber.java.run.CucumberJvm2SMFormatter" , TeamCityPlugin .class );
55
+ put ("org.jetbrains.plugins.cucumber.java.run.CucumberJvm3SMFormatter" , TeamCityPlugin .class );
56
+ put ("org.jetbrains.plugins.cucumber.java.run.CucumberJvm4SMFormatter" , TeamCityPlugin .class );
57
+ put ("org.jetbrains.plugins.cucumber.java.run.CucumberJvm5SMFormatter" , TeamCityPlugin .class );
56
58
}};
57
59
58
60
private final String pluginString ;
@@ -76,9 +78,9 @@ public static PluginOption parse(String pluginArgumentPattern) {
76
78
}
77
79
78
80
private static Class <? extends Plugin > parsePluginName (String pluginName ) {
79
- Class <? extends Plugin > oldApiPlugin = OLD_INTELLIJ_IDEA_PLUGIN_CLASSES .get (pluginName );
81
+ Class <? extends Plugin > oldApiPlugin = INCOMPATIBLE_INTELLIJ_IDEA_PLUGIN_CLASSES .get (pluginName );
80
82
if (oldApiPlugin != null ) {
81
- log .warn (() -> "Incompatible IntelliJ IDEA Plugin detected. Falling back to pretty formatter " );
83
+ log .debug (() -> "Incompatible IntelliJ IDEA Plugin detected. Falling back to teamcity plugin " );
82
84
return oldApiPlugin ;
83
85
}
84
86
0 commit comments