79 public void setLimitModules(Set<String> value) { 80 limitModules = value; 81 } 82 83 public void setExcludeFileList(String value) { 84 excludeFileList = value; 85 } 86 87 public void setStripNativeCommands(boolean value) { 88 stripNativeCommands = value; 89 } 90 91 public void setUserArguments(Map<String, String> value) { 92 userArguments = value; 93 } 94 95 public void build() throws IOException { 96 // jlink main arguments 97 Jlink.JlinkConfiguration jlinkConfig = 98 new Jlink.JlinkConfiguration(new File("").toPath(), // Unused 99 modulePath, 100 addModules, 101 limitModules, 102 ByteOrder.nativeOrder()); 103 104 // plugin configuration 105 List<Plugin> plugins = new ArrayList<Plugin>(); 106 107 if (stripNativeCommands) { 108 plugins.add(Jlink.newPlugin( 109 "strip-native-commands", 110 Collections.singletonMap("strip-native-commands", "on"), 111 null)); 112 } 113 114 if (excludeFileList != null && !excludeFileList.isEmpty()) { 115 plugins.add(Jlink.newPlugin( 116 "exclude-files", 117 Collections.singletonMap("exclude-files", excludeFileList), 118 null)); 119 } 120 121 // add user supplied jlink arguments 122 for (Map.Entry<String, String> entry : userArguments.entrySet()) { | 79 public void setLimitModules(Set<String> value) { 80 limitModules = value; 81 } 82 83 public void setExcludeFileList(String value) { 84 excludeFileList = value; 85 } 86 87 public void setStripNativeCommands(boolean value) { 88 stripNativeCommands = value; 89 } 90 91 public void setUserArguments(Map<String, String> value) { 92 userArguments = value; 93 } 94 95 public void build() throws IOException { 96 // jlink main arguments 97 Jlink.JlinkConfiguration jlinkConfig = 98 new Jlink.JlinkConfiguration(new File("").toPath(), // Unused 99 addModules, 100 ByteOrder.nativeOrder(), 101 moduleFinder(modulePath, 102 limitModules, addModules)); 103 104 // plugin configuration 105 List<Plugin> plugins = new ArrayList<Plugin>(); 106 107 if (stripNativeCommands) { 108 plugins.add(Jlink.newPlugin( 109 "strip-native-commands", 110 Collections.singletonMap("strip-native-commands", "on"), 111 null)); 112 } 113 114 if (excludeFileList != null && !excludeFileList.isEmpty()) { 115 plugins.add(Jlink.newPlugin( 116 "exclude-files", 117 Collections.singletonMap("exclude-files", excludeFileList), 118 null)); 119 } 120 121 // add user supplied jlink arguments 122 for (Map.Entry<String, String> entry : userArguments.entrySet()) { |