Search in sources :

Example 16 with JibPluginExtensionException

use of com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException in project jib by google.

the class MavenProjectPropertiesExtensionTest method testRunPluginExtensions_exceptionFromExtension.

@Test
public void testRunPluginExtensions_exceptionFromExtension() {
    FileNotFoundException fakeException = new FileNotFoundException();
    FooExtension extension = new FooExtension((buildPlan, properties, extraConfig, mavenData, logger) -> {
        throw new JibPluginExtensionException(FooExtension.class, "exception from extension", fakeException);
    });
    loadedExtensions = Arrays.asList(extension);
    try {
        mavenProjectProperties.runPluginExtensions(Arrays.asList(new FooExtensionConfig()), containerBuilder);
        Assert.fail();
    } catch (JibPluginExtensionException ex) {
        Assert.assertEquals("exception from extension", ex.getMessage());
        Assert.assertSame(fakeException, ex.getCause());
    }
}
Also used : JibPluginExtensionException(com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException) FileNotFoundException(java.io.FileNotFoundException) Test(org.junit.Test)

Example 17 with JibPluginExtensionException

use of com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException in project jib by google.

the class BuildDockerMojo method execute.

@Override
public void execute() throws MojoExecutionException, MojoFailureException {
    checkJibVersion();
    if (MojoCommon.shouldSkipJibExecution(this)) {
        return;
    }
    Path dockerExecutable = getDockerClientExecutable();
    boolean isDockerInstalled = dockerExecutable == null ? DockerClient.isDefaultDockerInstalled() : DockerClient.isDockerInstalled(dockerExecutable);
    if (!isDockerInstalled) {
        throw new MojoExecutionException(HelpfulSuggestions.forDockerNotInstalled(HELPFUL_SUGGESTIONS_PREFIX));
    }
    MavenSettingsProxyProvider.activateHttpAndHttpsProxies(getSession().getSettings(), getSettingsDecrypter());
    TempDirectoryProvider tempDirectoryProvider = new TempDirectoryProvider();
    MavenProjectProperties projectProperties = MavenProjectProperties.getForProject(Preconditions.checkNotNull(descriptor), getProject(), getSession(), getLog(), tempDirectoryProvider, getInjectedPluginExtensions());
    Future<Optional<String>> updateCheckFuture = Futures.immediateFuture(Optional.empty());
    try {
        GlobalConfig globalConfig = GlobalConfig.readConfig();
        updateCheckFuture = MojoCommon.newUpdateChecker(projectProperties, globalConfig, getLog());
        PluginConfigurationProcessor.createJibBuildRunnerForDockerDaemonImage(new MavenRawConfiguration(this), new MavenSettingsServerCredentials(getSession().getSettings(), getSettingsDecrypter()), projectProperties, globalConfig, new MavenHelpfulSuggestions(HELPFUL_SUGGESTIONS_PREFIX)).runBuild();
    } catch (InvalidAppRootException ex) {
        throw new MojoExecutionException("<container><appRoot> is not an absolute Unix-style path: " + ex.getInvalidPathValue(), ex);
    } catch (InvalidContainerizingModeException ex) {
        throw new MojoExecutionException("invalid value for <containerizingMode>: " + ex.getInvalidContainerizingMode(), ex);
    } catch (InvalidWorkingDirectoryException ex) {
        throw new MojoExecutionException("<container><workingDirectory> is not an absolute Unix-style path: " + ex.getInvalidPathValue(), ex);
    } catch (InvalidPlatformException ex) {
        throw new MojoExecutionException("<from><platforms> contains a platform configuration that is missing required values or has invalid values: " + ex.getMessage() + ": " + ex.getInvalidPlatform(), ex);
    } catch (InvalidContainerVolumeException ex) {
        throw new MojoExecutionException("<container><volumes> is not an absolute Unix-style path: " + ex.getInvalidVolume(), ex);
    } catch (InvalidFilesModificationTimeException ex) {
        throw new MojoExecutionException("<container><filesModificationTime> should be an ISO 8601 date-time (see " + "DateTimeFormatter.ISO_DATE_TIME) or special keyword \"EPOCH_PLUS_SECOND\": " + ex.getInvalidFilesModificationTime(), ex);
    } catch (InvalidCreationTimeException ex) {
        throw new MojoExecutionException("<container><creationTime> should be an ISO 8601 date-time (see " + "DateTimeFormatter.ISO_DATE_TIME) or a special keyword (\"EPOCH\", " + "\"USE_CURRENT_TIMESTAMP\"): " + ex.getInvalidCreationTime(), ex);
    } catch (JibPluginExtensionException ex) {
        String extensionName = ex.getExtensionClass().getName();
        throw new MojoExecutionException("error running extension '" + extensionName + "': " + ex.getMessage(), ex);
    } catch (IncompatibleBaseImageJavaVersionException ex) {
        throw new MojoExecutionException(HelpfulSuggestions.forIncompatibleBaseImageJavaVersionForMaven(ex.getBaseImageMajorJavaVersion(), ex.getProjectMajorJavaVersion()), ex);
    } catch (InvalidImageReferenceException ex) {
        throw new MojoExecutionException(HelpfulSuggestions.forInvalidImageReference(ex.getInvalidReference()), ex);
    } catch (IOException | CacheDirectoryCreationException | MainClassInferenceException | InvalidGlobalConfigException ex) {
        throw new MojoExecutionException(ex.getMessage(), ex);
    } catch (BuildStepsExecutionException ex) {
        throw new MojoExecutionException(ex.getMessage(), ex.getCause());
    } catch (ExtraDirectoryNotFoundException ex) {
        throw new MojoExecutionException("<extraDirectories><paths> contain \"from\" directory that doesn't exist locally: " + ex.getPath(), ex);
    } finally {
        tempDirectoryProvider.close();
        MojoCommon.finishUpdateChecker(projectProperties, updateCheckFuture);
        projectProperties.waitForLoggingThread();
        getLog().info("");
    }
}
Also used : InvalidContainerVolumeException(com.google.cloud.tools.jib.plugins.common.InvalidContainerVolumeException) GlobalConfig(com.google.cloud.tools.jib.plugins.common.globalconfig.GlobalConfig) ExtraDirectoryNotFoundException(com.google.cloud.tools.jib.plugins.common.ExtraDirectoryNotFoundException) InvalidFilesModificationTimeException(com.google.cloud.tools.jib.plugins.common.InvalidFilesModificationTimeException) IncompatibleBaseImageJavaVersionException(com.google.cloud.tools.jib.plugins.common.IncompatibleBaseImageJavaVersionException) InvalidWorkingDirectoryException(com.google.cloud.tools.jib.plugins.common.InvalidWorkingDirectoryException) TempDirectoryProvider(com.google.cloud.tools.jib.filesystem.TempDirectoryProvider) InvalidContainerizingModeException(com.google.cloud.tools.jib.plugins.common.InvalidContainerizingModeException) InvalidPlatformException(com.google.cloud.tools.jib.plugins.common.InvalidPlatformException) Path(java.nio.file.Path) InvalidAppRootException(com.google.cloud.tools.jib.plugins.common.InvalidAppRootException) MojoExecutionException(org.apache.maven.plugin.MojoExecutionException) Optional(java.util.Optional) InvalidImageReferenceException(com.google.cloud.tools.jib.api.InvalidImageReferenceException) BuildStepsExecutionException(com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException) IOException(java.io.IOException) InvalidGlobalConfigException(com.google.cloud.tools.jib.plugins.common.globalconfig.InvalidGlobalConfigException) CacheDirectoryCreationException(com.google.cloud.tools.jib.api.CacheDirectoryCreationException) JibPluginExtensionException(com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException) InvalidCreationTimeException(com.google.cloud.tools.jib.plugins.common.InvalidCreationTimeException) MainClassInferenceException(com.google.cloud.tools.jib.plugins.common.MainClassInferenceException)

Example 18 with JibPluginExtensionException

use of com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException in project jib by google.

the class BuildImageMojo method execute.

@Override
public void execute() throws MojoExecutionException, MojoFailureException {
    checkJibVersion();
    if (MojoCommon.shouldSkipJibExecution(this)) {
        return;
    }
    // Validates 'format'.
    if (Arrays.stream(ImageFormat.values()).noneMatch(value -> value.name().equals(getFormat()))) {
        throw new MojoFailureException("<format> parameter is configured with value '" + getFormat() + "', but the only valid configuration options are '" + ImageFormat.Docker + "' and '" + ImageFormat.OCI + "'.");
    }
    // Parses 'to' into image reference.
    if (Strings.isNullOrEmpty(getTargetImage())) {
        throw new MojoFailureException(HelpfulSuggestions.forToNotConfigured("Missing target image parameter", "<to><image>", "pom.xml", "mvn compile jib:build -Dimage=<your image name>"));
    }
    MavenSettingsProxyProvider.activateHttpAndHttpsProxies(getSession().getSettings(), getSettingsDecrypter());
    TempDirectoryProvider tempDirectoryProvider = new TempDirectoryProvider();
    MavenProjectProperties projectProperties = MavenProjectProperties.getForProject(Preconditions.checkNotNull(descriptor), getProject(), getSession(), getLog(), tempDirectoryProvider, getInjectedPluginExtensions());
    Future<Optional<String>> updateCheckFuture = Futures.immediateFuture(Optional.empty());
    try {
        GlobalConfig globalConfig = GlobalConfig.readConfig();
        updateCheckFuture = MojoCommon.newUpdateChecker(projectProperties, globalConfig, getLog());
        PluginConfigurationProcessor.createJibBuildRunnerForRegistryImage(new MavenRawConfiguration(this), new MavenSettingsServerCredentials(getSession().getSettings(), getSettingsDecrypter()), projectProperties, globalConfig, new MavenHelpfulSuggestions(HELPFUL_SUGGESTIONS_PREFIX)).runBuild();
    } catch (InvalidAppRootException ex) {
        throw new MojoExecutionException("<container><appRoot> is not an absolute Unix-style path: " + ex.getInvalidPathValue(), ex);
    } catch (InvalidContainerizingModeException ex) {
        throw new MojoExecutionException("invalid value for <containerizingMode>: " + ex.getInvalidContainerizingMode(), ex);
    } catch (InvalidWorkingDirectoryException ex) {
        throw new MojoExecutionException("<container><workingDirectory> is not an absolute Unix-style path: " + ex.getInvalidPathValue(), ex);
    } catch (InvalidPlatformException ex) {
        throw new MojoExecutionException("<from><platforms> contains a platform configuration that is missing required values or has invalid values: " + ex.getMessage() + ": " + ex.getInvalidPlatform(), ex);
    } catch (InvalidContainerVolumeException ex) {
        throw new MojoExecutionException("<container><volumes> is not an absolute Unix-style path: " + ex.getInvalidVolume(), ex);
    } catch (InvalidFilesModificationTimeException ex) {
        throw new MojoExecutionException("<container><filesModificationTime> should be an ISO 8601 date-time (see " + "DateTimeFormatter.ISO_DATE_TIME) or special keyword \"EPOCH_PLUS_SECOND\": " + ex.getInvalidFilesModificationTime(), ex);
    } catch (InvalidCreationTimeException ex) {
        throw new MojoExecutionException("<container><creationTime> should be an ISO 8601 date-time (see " + "DateTimeFormatter.ISO_DATE_TIME) or a special keyword (\"EPOCH\", " + "\"USE_CURRENT_TIMESTAMP\"): " + ex.getInvalidCreationTime(), ex);
    } catch (JibPluginExtensionException ex) {
        String extensionName = ex.getExtensionClass().getName();
        throw new MojoExecutionException("error running extension '" + extensionName + "': " + ex.getMessage(), ex);
    } catch (IncompatibleBaseImageJavaVersionException ex) {
        throw new MojoExecutionException(HelpfulSuggestions.forIncompatibleBaseImageJavaVersionForMaven(ex.getBaseImageMajorJavaVersion(), ex.getProjectMajorJavaVersion()), ex);
    } catch (InvalidImageReferenceException ex) {
        throw new MojoExecutionException(HelpfulSuggestions.forInvalidImageReference(ex.getInvalidReference()), ex);
    } catch (IOException | CacheDirectoryCreationException | MainClassInferenceException | InvalidGlobalConfigException ex) {
        throw new MojoExecutionException(ex.getMessage(), ex);
    } catch (BuildStepsExecutionException ex) {
        throw new MojoExecutionException(ex.getMessage(), ex.getCause());
    } catch (ExtraDirectoryNotFoundException ex) {
        throw new MojoExecutionException("<extraDirectories><paths> contain \"from\" directory that doesn't exist locally: " + ex.getPath(), ex);
    } finally {
        tempDirectoryProvider.close();
        MojoCommon.finishUpdateChecker(projectProperties, updateCheckFuture);
        projectProperties.waitForLoggingThread();
        getLog().info("");
    }
}
Also used : InvalidContainerVolumeException(com.google.cloud.tools.jib.plugins.common.InvalidContainerVolumeException) GlobalConfig(com.google.cloud.tools.jib.plugins.common.globalconfig.GlobalConfig) ExtraDirectoryNotFoundException(com.google.cloud.tools.jib.plugins.common.ExtraDirectoryNotFoundException) InvalidFilesModificationTimeException(com.google.cloud.tools.jib.plugins.common.InvalidFilesModificationTimeException) IncompatibleBaseImageJavaVersionException(com.google.cloud.tools.jib.plugins.common.IncompatibleBaseImageJavaVersionException) InvalidWorkingDirectoryException(com.google.cloud.tools.jib.plugins.common.InvalidWorkingDirectoryException) TempDirectoryProvider(com.google.cloud.tools.jib.filesystem.TempDirectoryProvider) InvalidContainerizingModeException(com.google.cloud.tools.jib.plugins.common.InvalidContainerizingModeException) InvalidPlatformException(com.google.cloud.tools.jib.plugins.common.InvalidPlatformException) InvalidAppRootException(com.google.cloud.tools.jib.plugins.common.InvalidAppRootException) Optional(java.util.Optional) MojoExecutionException(org.apache.maven.plugin.MojoExecutionException) MojoFailureException(org.apache.maven.plugin.MojoFailureException) InvalidImageReferenceException(com.google.cloud.tools.jib.api.InvalidImageReferenceException) BuildStepsExecutionException(com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException) IOException(java.io.IOException) InvalidGlobalConfigException(com.google.cloud.tools.jib.plugins.common.globalconfig.InvalidGlobalConfigException) CacheDirectoryCreationException(com.google.cloud.tools.jib.api.CacheDirectoryCreationException) JibPluginExtensionException(com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException) InvalidCreationTimeException(com.google.cloud.tools.jib.plugins.common.InvalidCreationTimeException) MainClassInferenceException(com.google.cloud.tools.jib.plugins.common.MainClassInferenceException)

Example 19 with JibPluginExtensionException

use of com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException in project jib by google.

the class GradleProjectProperties method runPluginExtension.

// Unchecked casting: "getExtraConfiguration().get()" (Object) to Action<T> and "extension"
// (JibGradlePluginExtension<?>) to JibGradlePluginExtension<T> where T is the extension-defined
// config type (as requested by "JibGradlePluginExtension.getExtraConfigType()").
@SuppressWarnings({ "unchecked" })
private <T> ContainerBuildPlan runPluginExtension(Optional<Class<T>> extraConfigType, JibGradlePluginExtension<?> extension, ExtensionConfiguration config, ContainerBuildPlan buildPlan) throws JibPluginExtensionException {
    T extraConfig = null;
    Optional<Object> configs = config.getExtraConfiguration();
    if (configs.isPresent()) {
        if (!extraConfigType.isPresent()) {
            throw new IllegalArgumentException("extension " + extension.getClass().getSimpleName() + " does not expect extension-specific configuration; remove the inapplicable " + "'pluginExtension.configuration' from Gradle build script");
        } else {
            // configs.get() is of type Action, so this cast always succeeds.
            // (Note generic <T> is erased at runtime.)
            Action<T> action = (Action<T>) configs.get();
            extraConfig = project.getObjects().newInstance(extraConfigType.get(), project);
            action.execute(extraConfig);
        }
    }
    try {
        return ((JibGradlePluginExtension<T>) extension).extendContainerBuildPlan(buildPlan, config.getProperties(), Optional.ofNullable(extraConfig), () -> project, new PluginExtensionLogger(this::log));
    } catch (RuntimeException ex) {
        throw new JibPluginExtensionException(extension.getClass(), "extension crashed: " + ex.getMessage(), ex);
    }
}
Also used : PluginExtensionLogger(com.google.cloud.tools.jib.plugins.common.PluginExtensionLogger) Action(org.gradle.api.Action) JibPluginExtensionException(com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException) JibGradlePluginExtension(com.google.cloud.tools.jib.gradle.extension.JibGradlePluginExtension)

Example 20 with JibPluginExtensionException

use of com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException in project jib by google.

the class BuildTarTask method buildTar.

/**
 * Task Action, builds an image to tar file.
 *
 * @throws IOException if an error occurs creating the jib runner
 * @throws BuildStepsExecutionException if an error occurs while executing build steps
 * @throws CacheDirectoryCreationException if a new cache directory could not be created
 * @throws MainClassInferenceException if a main class could not be found
 * @throws InvalidGlobalConfigException if the global config file is invalid
 */
@TaskAction
public void buildTar() throws BuildStepsExecutionException, IOException, CacheDirectoryCreationException, MainClassInferenceException, InvalidGlobalConfigException {
    // Asserts required @Input parameters are not null.
    Preconditions.checkNotNull(jibExtension);
    TaskCommon.disableHttpLogging();
    TempDirectoryProvider tempDirectoryProvider = new TempDirectoryProvider();
    GradleProjectProperties projectProperties = GradleProjectProperties.getForProject(getProject(), getLogger(), tempDirectoryProvider, jibExtension.getConfigurationName().get());
    GlobalConfig globalConfig = GlobalConfig.readConfig();
    Future<Optional<String>> updateCheckFuture = TaskCommon.newUpdateChecker(projectProperties, globalConfig, getLogger());
    try {
        PluginConfigurationProcessor.createJibBuildRunnerForTarImage(new GradleRawConfiguration(jibExtension), ignored -> Optional.empty(), projectProperties, globalConfig, new GradleHelpfulSuggestions(HELPFUL_SUGGESTIONS_PREFIX)).runBuild();
    } catch (InvalidAppRootException ex) {
        throw new GradleException("container.appRoot is not an absolute Unix-style path: " + ex.getInvalidPathValue(), ex);
    } catch (InvalidContainerizingModeException ex) {
        throw new GradleException("invalid value for containerizingMode: " + ex.getInvalidContainerizingMode(), ex);
    } catch (InvalidWorkingDirectoryException ex) {
        throw new GradleException("container.workingDirectory is not an absolute Unix-style path: " + ex.getInvalidPathValue(), ex);
    } catch (InvalidPlatformException ex) {
        throw new GradleException("from.platforms contains a platform configuration that is missing required values or has invalid values: " + ex.getMessage() + ": " + ex.getInvalidPlatform(), ex);
    } catch (InvalidContainerVolumeException ex) {
        throw new GradleException("container.volumes is not an absolute Unix-style path: " + ex.getInvalidVolume(), ex);
    } catch (InvalidFilesModificationTimeException ex) {
        throw new GradleException("container.filesModificationTime should be an ISO 8601 date-time (see " + "DateTimeFormatter.ISO_DATE_TIME) or special keyword \"EPOCH_PLUS_SECOND\": " + ex.getInvalidFilesModificationTime(), ex);
    } catch (InvalidCreationTimeException ex) {
        throw new GradleException("container.creationTime should be an ISO 8601 date-time (see " + "DateTimeFormatter.ISO_DATE_TIME) or a special keyword (\"EPOCH\", " + "\"USE_CURRENT_TIMESTAMP\"): " + ex.getInvalidCreationTime(), ex);
    } catch (JibPluginExtensionException ex) {
        String extensionName = ex.getExtensionClass().getName();
        throw new GradleException("error running extension '" + extensionName + "': " + ex.getMessage(), ex);
    } catch (IncompatibleBaseImageJavaVersionException ex) {
        throw new GradleException(HelpfulSuggestions.forIncompatibleBaseImageJavaVersionForGradle(ex.getBaseImageMajorJavaVersion(), ex.getProjectMajorJavaVersion()), ex);
    } catch (InvalidImageReferenceException ex) {
        throw new GradleException(HelpfulSuggestions.forInvalidImageReference(ex.getInvalidReference()), ex);
    } catch (ExtraDirectoryNotFoundException ex) {
        throw new GradleException("extraDirectories.paths contain \"from\" directory that doesn't exist locally: " + ex.getPath(), ex);
    } finally {
        tempDirectoryProvider.close();
        TaskCommon.finishUpdateChecker(projectProperties, updateCheckFuture);
        projectProperties.waitForLoggingThread();
    }
}
Also used : BuildStepsExecutionException(com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException) InvalidAppRootException(com.google.cloud.tools.jib.plugins.common.InvalidAppRootException) MainClassInferenceException(com.google.cloud.tools.jib.plugins.common.MainClassInferenceException) JibPluginExtensionException(com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException) FileCollection(org.gradle.api.file.FileCollection) InputFiles(org.gradle.api.tasks.InputFiles) InvalidPlatformException(com.google.cloud.tools.jib.plugins.common.InvalidPlatformException) TaskAction(org.gradle.api.tasks.TaskAction) InvalidContainerizingModeException(com.google.cloud.tools.jib.plugins.common.InvalidContainerizingModeException) Future(java.util.concurrent.Future) CacheDirectoryCreationException(com.google.cloud.tools.jib.api.CacheDirectoryCreationException) DefaultTask(org.gradle.api.DefaultTask) Path(java.nio.file.Path) TempDirectoryProvider(com.google.cloud.tools.jib.filesystem.TempDirectoryProvider) Nullable(javax.annotation.Nullable) InvalidGlobalConfigException(com.google.cloud.tools.jib.plugins.common.globalconfig.InvalidGlobalConfigException) ExtraDirectoryNotFoundException(com.google.cloud.tools.jib.plugins.common.ExtraDirectoryNotFoundException) PluginConfigurationProcessor(com.google.cloud.tools.jib.plugins.common.PluginConfigurationProcessor) GlobalConfig(com.google.cloud.tools.jib.plugins.common.globalconfig.GlobalConfig) HelpfulSuggestions(com.google.cloud.tools.jib.plugins.common.HelpfulSuggestions) IOException(java.io.IOException) InvalidImageReferenceException(com.google.cloud.tools.jib.api.InvalidImageReferenceException) Collectors(java.util.stream.Collectors) List(java.util.List) OutputFile(org.gradle.api.tasks.OutputFile) GradleException(org.gradle.api.GradleException) InvalidWorkingDirectoryException(com.google.cloud.tools.jib.plugins.common.InvalidWorkingDirectoryException) Optional(java.util.Optional) Option(org.gradle.api.tasks.options.Option) InvalidContainerVolumeException(com.google.cloud.tools.jib.plugins.common.InvalidContainerVolumeException) Preconditions(com.google.common.base.Preconditions) Nested(org.gradle.api.tasks.Nested) InvalidFilesModificationTimeException(com.google.cloud.tools.jib.plugins.common.InvalidFilesModificationTimeException) IncompatibleBaseImageJavaVersionException(com.google.cloud.tools.jib.plugins.common.IncompatibleBaseImageJavaVersionException) InvalidCreationTimeException(com.google.cloud.tools.jib.plugins.common.InvalidCreationTimeException) InvalidAppRootException(com.google.cloud.tools.jib.plugins.common.InvalidAppRootException) Optional(java.util.Optional) InvalidContainerVolumeException(com.google.cloud.tools.jib.plugins.common.InvalidContainerVolumeException) GlobalConfig(com.google.cloud.tools.jib.plugins.common.globalconfig.GlobalConfig) InvalidImageReferenceException(com.google.cloud.tools.jib.api.InvalidImageReferenceException) ExtraDirectoryNotFoundException(com.google.cloud.tools.jib.plugins.common.ExtraDirectoryNotFoundException) InvalidFilesModificationTimeException(com.google.cloud.tools.jib.plugins.common.InvalidFilesModificationTimeException) IncompatibleBaseImageJavaVersionException(com.google.cloud.tools.jib.plugins.common.IncompatibleBaseImageJavaVersionException) JibPluginExtensionException(com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException) GradleException(org.gradle.api.GradleException) InvalidWorkingDirectoryException(com.google.cloud.tools.jib.plugins.common.InvalidWorkingDirectoryException) TempDirectoryProvider(com.google.cloud.tools.jib.filesystem.TempDirectoryProvider) InvalidContainerizingModeException(com.google.cloud.tools.jib.plugins.common.InvalidContainerizingModeException) InvalidPlatformException(com.google.cloud.tools.jib.plugins.common.InvalidPlatformException) InvalidCreationTimeException(com.google.cloud.tools.jib.plugins.common.InvalidCreationTimeException) TaskAction(org.gradle.api.tasks.TaskAction)

Aggregations

JibPluginExtensionException (com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException)45 ContainerBuildPlan (com.google.cloud.tools.jib.api.buildplan.ContainerBuildPlan)22 Optional (java.util.Optional)20 Test (org.junit.Test)18 InvalidImageReferenceException (com.google.cloud.tools.jib.api.InvalidImageReferenceException)16 IOException (java.io.IOException)14 CacheDirectoryCreationException (com.google.cloud.tools.jib.api.CacheDirectoryCreationException)12 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