File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
native-maven-plugin/src/main/java/org/graalvm/buildtools/maven Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ public class MergeAgentFilesMojo extends AbstractMergeAgentFilesMojo {
75
75
76
76
private static int numberOfExecutions = 0 ;
77
77
78
+ private static final List <String > DEFAULT_DIRS = Arrays .asList ("main" , "test" );
79
+
78
80
@ Override
79
81
public void execute () throws MojoExecutionException {
80
82
// we need this mojo to be executed only once
@@ -96,15 +98,14 @@ public void execute() throws MojoExecutionException {
96
98
}
97
99
98
100
List <String > disabledPhases = agentConfiguration .getMetadataCopyConfiguration ().getDisabledStages ();
99
- if (disabledPhases .size () == 2 ) {
101
+
102
+ Set <String > dirs = new HashSet <>(DEFAULT_DIRS );
103
+ dirs .removeAll (disabledPhases );
104
+ if (dirs .isEmpty ()) {
100
105
logger .info ("Both phases are skipped." );
101
106
return ;
102
107
}
103
108
104
- Set <String > dirs = new HashSet (2 );
105
- dirs .addAll (Arrays .asList ("main" , "test" ));
106
- dirs .removeAll (disabledPhases );
107
-
108
109
for (String dir : dirs ) {
109
110
String agentOutputDirectory = (target + "/native/agent-output/" + dir ).replace ('/' , File .separatorChar );
110
111
mergeForGivenDir (agentOutputDirectory );
You can’t perform that action at this time.
0 commit comments