You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current signature: setExtraFiles(List<Path> extraFiles)
Currently, the source files (extraFiles) should be top-level files and directories. If a source path is a directory, JavaLayerConfiguration calls LayerConfiguration.Builder.addEntryRecursive() to add all the files and sub-directories in the directory recursively. That is, it is not possible to separate files in a directory into different layers (much like the problem of #957). This is also problematic in the WAR case. For example,
index.html --> to be placed in <appRoot>
WEB-INF/web.xml --> to be placed in <appRoot>
WEB-INF/classes/cool.properties --> to be placed in <appRoot>
which should be unpacked at the root of the application in an image, whereas the classes layer should have
WEB-INF/classes/HelloServlet.class --> to be placed in <appRoot>
or
HelloSevlet.class --> to be placed in <appRoot>/WEB-INF/classes
Fortunately, #956 is fixed, so we can now change setExtraFiles() to accept an explicit list of individual files to add. That is, instead of adding fiels with addEntryRecursive(), just add each file with addEntry(). However, it may be inconvenient for callers to always explicitly list all the files, so it'll be good to have setExtraFilesDirectory() and setExtraFilesDirectories() too.
The text was updated successfully, but these errors were encountered:
Current signature:
setExtraFiles(List<Path> extraFiles)
Currently, the source files (
extraFiles
) should be top-level files and directories. If a source path is a directory,JavaLayerConfiguration
callsLayerConfiguration.Builder.addEntryRecursive()
to add all the files and sub-directories in the directory recursively. That is, it is not possible to separate files in a directory into different layers (much like the problem of #957). This is also problematic in the WAR case. For example,The resources layer should have
which should be unpacked at the root of the application in an image, whereas the classes layer should have
or
Fortunately, #956 is fixed, so we can now change
setExtraFiles()
to accept an explicit list of individual files to add. That is, instead of adding fiels withaddEntryRecursive()
, just add each file withaddEntry()
. However, it may be inconvenient for callers to always explicitly list all the files, so it'll be good to havesetExtraFilesDirectory()
andsetExtraFilesDirectories()
too.The text was updated successfully, but these errors were encountered: