Search in sources :

Example 31 with JibPluginExtensionException

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

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 32 with JibPluginExtensionException

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

the class BuildImageTask method buildImage.

/**
 * Task Action, builds an image to remote registry.
 *
 * @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 buildImage() throws IOException, BuildStepsExecutionException, 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 {
        if (Strings.isNullOrEmpty(jibExtension.getTo().getImage())) {
            throw new GradleException(HelpfulSuggestions.forToNotConfigured("Missing target image parameter", "'jib.to.image'", "build.gradle", "gradle jib --image <your image name>"));
        }
        PluginConfigurationProcessor.createJibBuildRunnerForRegistryImage(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) InvalidPlatformException(com.google.cloud.tools.jib.plugins.common.InvalidPlatformException) Strings(com.google.common.base.Strings) 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) 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) 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)

Example 33 with JibPluginExtensionException

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

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)

Example 34 with JibPluginExtensionException

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

the class GradleProjectProperties method runPluginExtensions.

@Override
public JibContainerBuilder runPluginExtensions(List<? extends ExtensionConfiguration> extensionConfigs, JibContainerBuilder jibContainerBuilder) throws JibPluginExtensionException {
    if (extensionConfigs.isEmpty()) {
        log(LogEvent.debug("No Jib plugin extensions configured to load"));
        return jibContainerBuilder;
    }
    List<JibGradlePluginExtension<?>> loadedExtensions = extensionLoader.get();
    JibGradlePluginExtension<?> extension = null;
    ContainerBuildPlan buildPlan = jibContainerBuilder.toContainerBuildPlan();
    try {
        for (ExtensionConfiguration config : extensionConfigs) {
            extension = findConfiguredExtension(loadedExtensions, config);
            log(LogEvent.lifecycle("Running extension: " + config.getExtensionClass()));
            buildPlan = runPluginExtension(extension.getExtraConfigType(), extension, config, buildPlan);
            // to validate image reference
            ImageReference.parse(buildPlan.getBaseImage());
        }
        return jibContainerBuilder.applyContainerBuildPlan(buildPlan);
    } catch (InvalidImageReferenceException ex) {
        throw new JibPluginExtensionException(Verify.verifyNotNull(extension).getClass(), "invalid base image reference: " + buildPlan.getBaseImage(), ex);
    }
}
Also used : JibPluginExtensionException(com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException) JibGradlePluginExtension(com.google.cloud.tools.jib.gradle.extension.JibGradlePluginExtension) ExtensionConfiguration(com.google.cloud.tools.jib.plugins.common.RawConfiguration.ExtensionConfiguration) InvalidImageReferenceException(com.google.cloud.tools.jib.api.InvalidImageReferenceException) ContainerBuildPlan(com.google.cloud.tools.jib.api.buildplan.ContainerBuildPlan)

Example 35 with JibPluginExtensionException

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

the class JibLayerFilterExtension method moveParentDepsToNewLayers.

private ContainerBuildPlan moveParentDepsToNewLayers(ContainerBuildPlan buildPlan, MavenData mavenData, ExtensionLogger logger) throws JibPluginExtensionException {
    logger.log(LogLevel.INFO, "Moving parent dependencies to new layers.");
    // The key is the source file path for the parent dependency. We only consider artifacts that
    // have been resolved.
    Map<Path, Artifact> parentDependencies = getParentDependencies(mavenData).stream().map(Dependency::getArtifact).filter(artifact -> artifact.getFile() != null).collect(Collectors.toMap(artifact -> artifact.getFile().toPath(), artifact -> artifact));
    // Parent dependencies that have not been found in any layer (due to different version or
    // filtering). Only needed for logging.
    Map<Path, Artifact> parentDependenciesNotFound = new HashMap<>(parentDependencies);
    List<FileEntriesLayer.Builder> newLayerBuilders = new ArrayList<>();
    @SuppressWarnings("unchecked") List<FileEntriesLayer> originalLayers = ((List<FileEntriesLayer>) buildPlan.getLayers());
    for (FileEntriesLayer originalLayer : originalLayers) {
        String parentLayerName = originalLayer.getName() + "-parent";
        FileEntriesLayer.Builder parentLayerBuilder = FileEntriesLayer.builder().setName(parentLayerName);
        FileEntriesLayer.Builder layerBuilder = originalLayer.toBuilder().setEntries(Collections.emptyList());
        newLayerBuilders.add(parentLayerBuilder);
        newLayerBuilders.add(layerBuilder);
        for (FileEntry entry : originalLayer.getEntries()) {
            Path sourceFilePath = entry.getSourceFile();
            if (parentDependencies.containsKey(sourceFilePath)) {
                // move to parent layer
                logger.log(LogLevel.DEBUG, "Moving " + sourceFilePath + " to " + parentLayerName + ".");
                parentLayerBuilder.addEntry(entry);
                // mark parent dep as found
                parentDependenciesNotFound.remove(sourceFilePath);
            } else {
                // keep in original layer
                logger.log(LogLevel.DEBUG, "Keeping " + sourceFilePath + " in " + originalLayer.getName() + ".");
                layerBuilder.addEntry(entry);
            }
        }
    }
    logMissingParentDependencies(logger, parentDependenciesNotFound, originalLayers);
    List<FileEntriesLayer> newLayers = newLayerBuilders.stream().map(FileEntriesLayer.Builder::build).filter(layer -> !layer.getEntries().isEmpty()).collect(Collectors.toList());
    return buildPlan.toBuilder().setLayers(newLayers).build();
}
Also used : Path(java.nio.file.Path) JibMavenPluginExtension(com.google.cloud.tools.jib.maven.extension.JibMavenPluginExtension) DependencyResolutionException(org.apache.maven.project.DependencyResolutionException) DependencyResolutionResult(org.apache.maven.project.DependencyResolutionResult) Dependency(org.eclipse.aether.graph.Dependency) HashMap(java.util.HashMap) FileEntriesLayer(com.google.cloud.tools.jib.api.buildplan.FileEntriesLayer) ExtensionLogger(com.google.cloud.tools.jib.plugins.extension.ExtensionLogger) Singleton(javax.inject.Singleton) JibPluginExtensionException(com.google.cloud.tools.jib.plugins.extension.JibPluginExtensionException) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) Inject(javax.inject.Inject) Map(java.util.Map) PathMatcher(java.nio.file.PathMatcher) ProjectDependenciesResolver(org.apache.maven.project.ProjectDependenciesResolver) Named(javax.inject.Named) Path(java.nio.file.Path) Verify(com.google.common.base.Verify) Artifact(org.eclipse.aether.artifact.Artifact) Collectors(java.util.stream.Collectors) LogLevel(com.google.cloud.tools.jib.plugins.extension.ExtensionLogger.LogLevel) ScopeDependencyFilter(org.eclipse.aether.util.filter.ScopeDependencyFilter) List(java.util.List) LayerObject(com.google.cloud.tools.jib.api.buildplan.LayerObject) Paths(java.nio.file.Paths) FileEntry(com.google.cloud.tools.jib.api.buildplan.FileEntry) MavenData(com.google.cloud.tools.jib.maven.extension.MavenData) Optional(java.util.Optional) ContainerBuildPlan(com.google.cloud.tools.jib.api.buildplan.ContainerBuildPlan) DefaultDependencyResolutionRequest(org.apache.maven.project.DefaultDependencyResolutionRequest) VisibleForTesting(com.google.common.annotations.VisibleForTesting) Collections(java.util.Collections) FileSystems(java.nio.file.FileSystems) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) ArrayList(java.util.ArrayList) FileEntriesLayer(com.google.cloud.tools.jib.api.buildplan.FileEntriesLayer) Dependency(org.eclipse.aether.graph.Dependency) Artifact(org.eclipse.aether.artifact.Artifact) FileEntry(com.google.cloud.tools.jib.api.buildplan.FileEntry)

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