Search in sources :

Example 6 with AssemblyFormattingException

use of org.apache.maven.plugins.assembly.format.AssemblyFormattingException in project maven-plugins by apache.

the class TypeConversionUtils method modeToInt.

public static int modeToInt(final String mode, final Logger logger) throws AssemblyFormattingException {
    if (mode == null || mode.trim().length() < 1) {
        return -1;
    }
    try {
        final int value = Integer.parseInt(mode, 8);
        // discard sanity assessment here; we're pushing ahead.
        verifyModeSanity(value, logger);
        return value;
    } catch (final NumberFormatException e) {
        throw new AssemblyFormattingException("Failed to parse mode as an octal number: \'" + mode + "\'.", e);
    }
}
Also used : AssemblyFormattingException(org.apache.maven.plugins.assembly.format.AssemblyFormattingException)

Aggregations

AssemblyFormattingException (org.apache.maven.plugins.assembly.format.AssemblyFormattingException)6 File (java.io.File)3 MojoExecutionException (org.apache.maven.plugin.MojoExecutionException)3 InvalidAssemblerConfigurationException (org.apache.maven.plugins.assembly.InvalidAssemblerConfigurationException)3 ArchiveCreationException (org.apache.maven.plugins.assembly.archive.ArchiveCreationException)3 Assembly (org.apache.maven.plugins.assembly.model.Assembly)2 AssemblyConfiguration (io.fabric8.maven.docker.config.AssemblyConfiguration)1 AssemblyMode (io.fabric8.maven.docker.config.AssemblyMode)1 MojoFailureException (org.apache.maven.plugin.MojoFailureException)1 AssemblyReadException (org.apache.maven.plugins.assembly.io.AssemblyReadException)1 MavenProject (org.apache.maven.project.MavenProject)1 InputStreamTransformer (org.codehaus.plexus.components.io.functions.InputStreamTransformer)1 ConsoleLogger (org.codehaus.plexus.logging.console.ConsoleLogger)1