Class JdkAotCacheDockerContext
java.lang.Object
io.micronaut.maven.jdkaotcache.JdkAotCacheDockerContext
Writes the files that a Dockerfile generated with
micronaut.docker.jdkAotCache copies from the build
context: an application JAR, the class path argument file and the training script. A JDK AOT cache cannot record
classes from a non-empty directory on the class path, so the classes go into a JAR, listed after the dependencies,
as the classes directory is in the default Dockerfile. The dependencies are listed one by one, in the order of the
Maven class path, because the JDK leaves the expansion order of * entries unspecified.- Since:
- 5.1.0
- Author:
- Álvaro Sánchez-Mariscal
-
Method Summary
-
Method Details
-
write
public static void write(Path buildDirectory, Path classesDirectory, List<String> dependencies) throws IOException Writes the application JAR, the class path argument file and the training script tojdk-aot-cachein the build context.- Parameters:
buildDirectory- the build context, usuallytargetclassesDirectory- the compiled classes and resourcesdependencies- the dependency JARs in class path order, as paths relative to the directory that the generated Dockerfile copies them to, such asrelease/foo.jar- Throws:
IOException- if a file cannot be written
-