< prev index next >

src/jdk.jlink/share/classes/jdk/tools/jlink/builder/DefaultImageBuilder.java

Print this page

        

@@ -93,43 +93,34 @@
         }
     }
 
     private final Path root;
     private final Path mdir;
-    private final boolean genBom;
     private final Set<String> modules = new HashSet<>();
 
     /**
      * Default image builder constructor.
      *
-     * @param genBom true, generates a bom file.
      * @param root The image root directory.
      * @throws IOException
      */
-    public DefaultImageBuilder(boolean genBom, Path root) throws IOException {
+    public DefaultImageBuilder(Path root) throws IOException {
         Objects.requireNonNull(root);
 
-        this.genBom = genBom;
-
         this.root = root;
         this.mdir = root.resolve("lib");
         Files.createDirectories(mdir);
     }
 
-    private void storeFiles(Set<String> modules, String bom, Properties release) throws IOException {
+    private void storeFiles(Set<String> modules, Properties release) throws IOException {
         if (release != null) {
             addModules(release, modules);
             File r = new File(root.toFile(), "release");
             try (FileOutputStream fo = new FileOutputStream(r)) {
                 release.store(fo, null);
             }
         }
-        // Generate bom
-        if (genBom) {
-            File bomFile = new File(root.toFile(), "bom");
-            createUtf8File(bomFile, bom);
-        }
     }
 
     private void addModules(Properties release, Set<String> modules) throws IOException {
         StringBuilder builder = new StringBuilder();
         int i = 0;

@@ -142,11 +133,11 @@
         }
         release.setProperty("MODULES", builder.toString());
     }
 
     @Override
-    public void storeFiles(Pool files, String bom, Properties release) {
+    public void storeFiles(Pool files, Properties release) {
         try {
             for (ModuleData f : files.getContent()) {
                if (!f.getType().equals(Pool.ModuleDataType.CLASS_OR_RESOURCE)) {
                     accept(f);
                 }

@@ -159,11 +150,11 @@
                        continue;
                     }
                     modules.add(m.getName());
                 }
             }
-            storeFiles(modules, bom, release);
+            storeFiles(modules, release);
 
             if (Files.getFileStore(root).supportsFileAttributeView(PosixFileAttributeView.class)) {
                 // launchers in the bin directory need execute permission
                 Path bin = root.resolve("bin");
                 if (Files.isDirectory(bin)) {

@@ -188,12 +179,12 @@
             throw new PluginException(ex);
         }
     }
 
     @Override
-    public void storeFiles(Pool files, String bom) {
-        storeFiles(files, bom, new Properties());
+    public void storeFiles(Pool files) {
+        storeFiles(files, new Properties());
     }
 
     /**
      * Generates launcher scripts.
      * @param imageContent The image content.
< prev index next >