@Override public void close() { try { if ( this.zOut != null ) { this.zOut.close(); zOut = null; } } catch ( final IOException e ) { throw new ArchiverException( "Failure closing target.", e ); } }
+ ". Message: " + e.getLocalizedMessage(), e );
throw new IOException( "ArchiverException: " + e.getMessage() );
@Override public void execute() throws MojoExecutionException, MojoFailureException { try { packageAndAttachAppStoreMetaData(); } catch (IOException e) { throw new MojoExecutionException(e.getMessage(), e); } catch (NoSuchArchiverException e) { throw new MojoExecutionException(e.getMessage(), e); } catch (ArchiverException e) { throw new MojoExecutionException(e.getMessage(), e); } }
} catch (ArchiverException e) { getLog().warn( "Error unpacking file: " + archive + "\t" + e.toString());
public static FileInputStream fileInputStream( File file, String operation ) throws ArchiverException { try { return new FileInputStream( file ); } catch ( IOException e ) { throw new ArchiverException( "Problem reading input file for " + operation + " " + file.getParent() + ", " + e.getMessage() ); } }
/** * Executes the JarMojo on the current project. * * @throws MojoExecutionException if an error occurred while building the webapp */ public void execute() throws MojoExecutionException { try { performPackaging(); } catch (DependencyResolutionRequiredException e) { throw new MojoExecutionException("Error assembling jar: " + e.getMessage(), e); } catch (ManifestException e) { throw new MojoExecutionException("Error assembling jar", e); } catch (IOException e) { throw new MojoExecutionException("Error assembling jar", e); } catch (ArchiverException e) { throw new MojoExecutionException("Error assembling jar: " + e.getMessage(), e); } }
+ ". Message: " + e.getLocalizedMessage(), e );
public static FileOutputStream fileOutputStream( File file, String operation ) throws ArchiverException { try { return new FileOutputStream( file ); } catch ( IOException e ) { throw new ArchiverException( "Problem creating output file for " + operation + " " + file.getParent() + ", " + e.getMessage() ); } }
/** * Executes the WarMojo on the current project. * * @throws MojoExecutionException if an error occurred while building the webapp */ public void execute() throws MojoExecutionException { try { performPackaging(); } catch (DependencyResolutionRequiredException e) { throw new MojoExecutionException("Error assembling hpi: " + e.getMessage(), e); } catch (ManifestException e) { throw new MojoExecutionException("Error assembling hpi", e); } catch (IOException e) { throw new MojoExecutionException("Error assembling hpi", e); } catch (ArchiverException e) { throw new MojoExecutionException("Error assembling hpi: " + e.getMessage(), e); } }
+ ". Message: " + e.getLocalizedMessage(), e );
/** * The manifest file to use. This can be either the location of a manifest, or the name of a jar added through a * fileset. If its the name of an added jar, the task expects the manifest to be in the jar at META-INF/MANIFEST.MF. * * @param manifestFile the manifest file to use. * * @throws org.codehaus.plexus.archiver.ArchiverException * . */ @SuppressWarnings( { "UnusedDeclaration" } ) public void setManifest( File manifestFile ) throws ArchiverException { if ( !manifestFile.exists() ) { throw new ArchiverException( "Manifest file: " + manifestFile + " does not exist." ); } this.manifestFile = manifestFile; }
@Override public void execute() throws MojoExecutionException, MojoFailureException { for (final String sdk : getSDKs()) { for (final String config : getConfigurations()) { try { packageAndAttachDSym(sdk, config); } catch (IOException e) { throw new MojoExecutionException(e.getMessage(), e); } catch (NoSuchArchiverException e) { throw new MojoExecutionException(e.getMessage(), e); } catch (ArchiverException e) { throw new MojoExecutionException(e.getMessage(), e); } catch (XCodeException e) { throw new MojoExecutionException(e.getMessage(), e); } } } }
+ ". Message: " + e.getLocalizedMessage(), e );
throw new ArchiverException( "The source file isn't defined." ); throw new ArchiverException( "The source must not be a directory." ); throw new ArchiverException( "The source file " + sourceFile + " doesn't exist." ); throw new ArchiverException( "The destination isn't defined." ); throw new ArchiverException( "You must choose between a destination directory and a destination file." );
throw new IOException( "ArchiverException: " + e.getMessage() );
private InputStream getGzipInputStream( FileInputStream in ) throws ArchiverException { try { return Streams.bufferedInputStream( new GZIPInputStream( in ) ); } catch ( IOException e ) { throw new ArchiverException( "Problem creating GZIP input stream", e ); } }
throw new MojoExecutionException( "Error assembling WAR: " + e.getMessage(), e );
private Manifest getManifest( InputStream is ) throws ArchiverException { try { return new Manifest( is ); } catch ( IOException e ) { throw new ArchiverException( "Unable to read manifest file" + " (" + e.getMessage() + ")", e ); } }