Search in sources :

Example 21 with CacheDirectoryCreationException

use of com.google.cloud.tools.jib.api.CacheDirectoryCreationException in project geronimo-arthur by apache.

the class JibMojo method execute.

@Override
public void execute() {
    final JibContainerBuilder prepared = prepare();
    withExecutor(es -> {
        try {
            final Containerizer containerizer = createContainer();
            final JibContainer container = prepared.containerize(configure(containerizer, es));
            if (propertiesPrefix != null) {
                project.getProperties().setProperty(propertiesPrefix + "image.imageId", container.getImageId().getHash());
                project.getProperties().setProperty(propertiesPrefix + "image.digest", container.getDigest().getHash());
            }
            getLog().info("Built '" + to + "'");
        } catch (final InterruptedException e) {
            Thread.currentThread().interrupt();
        } catch (final RegistryException | IOException | CacheDirectoryCreationException | ExecutionException | InvalidImageReferenceException e) {
            throw new IllegalStateException(e);
        }
    });
}
Also used : CacheDirectoryCreationException(com.google.cloud.tools.jib.api.CacheDirectoryCreationException) JibContainer(com.google.cloud.tools.jib.api.JibContainer) InvalidImageReferenceException(com.google.cloud.tools.jib.api.InvalidImageReferenceException) Containerizer(com.google.cloud.tools.jib.api.Containerizer) JibContainerBuilder(com.google.cloud.tools.jib.api.JibContainerBuilder) IOException(java.io.IOException) ExecutionException(java.util.concurrent.ExecutionException) RegistryException(com.google.cloud.tools.jib.api.RegistryException)

Aggregations

CacheDirectoryCreationException (com.google.cloud.tools.jib.api.CacheDirectoryCreationException)21 IOException (java.io.IOException)19 InvalidImageReferenceException (com.google.cloud.tools.jib.api.InvalidImageReferenceException)16 TempDirectoryProvider (com.google.cloud.tools.jib.filesystem.TempDirectoryProvider)12 BuildStepsExecutionException (com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException)12 ExtraDirectoryNotFoundException (com.google.cloud.tools.jib.plugins.common.ExtraDirectoryNotFoundException)12 IncompatibleBaseImageJavaVersionException (com.google.cloud.tools.jib.plugins.common.IncompatibleBaseImageJavaVersionException)12 InvalidAppRootException (com.google.cloud.tools.jib.plugins.common.InvalidAppRootException)12 InvalidContainerVolumeException (com.google.cloud.tools.jib.plugins.common.InvalidContainerVolumeException)12 InvalidContainerizingModeException (com.google.cloud.tools.jib.plugins.common.InvalidContainerizingModeException)12 InvalidCreationTimeException (com.google.cloud.tools.jib.plugins.common.InvalidCreationTimeException)12 InvalidFilesModificationTimeException (com.google.cloud.tools.jib.plugins.common.InvalidFilesModificationTimeException)12 InvalidPlatformException (com.google.cloud.tools.jib.plugins.common.InvalidPlatformException)12 InvalidWorkingDirectoryException (com.google.cloud.tools.jib.plugins.common.InvalidWorkingDirectoryException)12 MainClassInferenceException (com.google.cloud.tools.jib.plugins.common.MainClassInferenceException)12 GlobalConfig (com.google.cloud.tools.jib.plugins.common.globalconfig.GlobalConfig)12 InvalidGlobalConfigException (com.google.cloud.tools.jib.plugins.common.globalconfig.InvalidGlobalConfigException)12 JibPluginExtensionException (com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException)12 Optional (java.util.Optional)12 Path (java.nio.file.Path)8