Examples of MavenExecutionException


Examples of org.apache.maven.MavenExecutionException

                                session, project, plugin);
                    }
                }
            }
        } catch (final Exception e) {
            throw new MavenExecutionException("Unable to determine plugin-based dependencies", e);
        }
    }
View Full Code Here

Examples of org.apache.maven.MavenExecutionException

                d.getClassifier(),
                artifactHandlerManager.getArtifactHandler(d.getType()));
        try {
            resolver.resolve(prjArtifact, project.getRemoteArtifactRepositories(), session.getLocalRepository());
        } catch (final ArtifactResolutionException e) {
            throw new MavenExecutionException("Unable to get artifact for " + d, e);
        } catch (final ArtifactNotFoundException e) {
            throw new MavenExecutionException("Unable to get artifact for " + d, e);
        }
        return prjArtifact.getFile();
    }
View Full Code Here

Examples of org.apache.maven.MavenExecutionException

                        performer.addDependencies();
                    }
                }
            }
        } catch (Exception e) {
            throw new MavenExecutionException("Unable to determine launchpad plugin-based dependencies", e);
        }
        super.afterProjectsRead(session);
    }
View Full Code Here

Examples of org.apache.maven.MavenExecutionException

                    }
                    String errorMsg = String.format("there is a snapshot dependency (%s) in %s (%s)", dep, model, pomFilePath);
                    if (failOnError == Boolean.TRUE) {
                        logger.warn(errorMsg);
                        // wrap in a IOException as this one is thrown in the signature
                        throw new IOException(new MavenExecutionException(errorMsg, model.getPomFile()));
                    } else {
                        logger.warn(errorMsg);
                    }
                }
            }
View Full Code Here

Examples of org.apache.maven.MavenExecutionException

                unArchiver.setSourceFile(artifact.getFile());
                unArchiver.setDestDirectory(p2Directory.getParentFile());
                try {
                    unArchiver.extract();
                } catch (ArchiverException e) {
                    throw new MavenExecutionException("Failed to unpack P2 runtime: " + e.getMessage(), e);
                }

                p2Directory.setLastModified(artifact.getFile().lastModified());
            }
View Full Code Here

Examples of org.apache.maven.MavenExecutionException

        ArtifactResolutionResult result = repositorySystem.resolve(request);

        try {
            resolutionErrorHandler.throwErrors(request, result);
        } catch (ArtifactResolutionException e) {
            throw new MavenExecutionException("Could not resolve tycho-p2-runtime", e);
        }

        return artifact.getFile();
    }
View Full Code Here

Examples of org.apache.maven.MavenExecutionException

        try {
            return location.getRuntimeLocations();
        } catch (MavenExecutionException e) {
            throw e;
        } catch (Exception e) {
            throw new MavenExecutionException("Could not resolve Tycho P2 runtime", e);
        } finally {
            sessionContext.setSession(oldSession);
        }
    }
View Full Code Here

Examples of org.apache.maven.MavenExecutionException

                unArchiver.setSourceFile(artifact.getFile());
                unArchiver.setDestDirectory(p2Directory.getParentFile());
                try {
                    unArchiver.extract();
                } catch (ArchiverException e) {
                    throw new MavenExecutionException("Failed to unpack P2 runtime: " + e.getMessage(), e);
                }

                p2Directory.setLastModified(artifact.getFile().lastModified());
            }
View Full Code Here

Examples of org.apache.maven.reactor.MavenExecutionException

            stats( request.getStartTime() );

            line();

            throw new MavenExecutionException( e.getMessage(), e );
        }
        catch ( BuildFailureException e )
        {
            dispatcher.dispatchError( event, request.getBaseDirectory(), e );

            logFailure( e, request.isShowErrors() );

            stats( request.getStartTime() );

            line();

            throw new MavenExecutionException( e.getMessage(), e );
        }
        catch ( Throwable t )
        {
            dispatcher.dispatchError( event, request.getBaseDirectory(), t );

            logFatal( t );

            stats( request.getStartTime() );

            line();

            throw new MavenExecutionException( "Error executing project within the reactor", t );
        }

        // Either the build was successful, or it was a fail_at_end/fail_never reactor build

        // TODO: should all the logging be left to the CLI?
        logReactorSummary( rm );

        if ( rm.hasBuildFailures() )
        {
            logErrors( rm, request.isShowErrors() );

            if ( !ReactorManager.FAIL_NEVER.equals( rm.getFailureBehavior() ) )
            {
                dispatcher.dispatchError( event, request.getBaseDirectory(), null );

                getLogger().info( "BUILD ERRORS" );

                line();

                stats( request.getStartTime() );

                line();

                throw new MavenExecutionException( "Some builds failed" );
            }
            else
            {
                getLogger().info( " + Ignoring failures" );
            }
View Full Code Here

Examples of org.apache.maven.reactor.MavenExecutionException

                wagonManager.setOnline( false );
            }
            catch ( ComponentLookupException e )
            {
                throw new MavenExecutionException( "Cannot retrieve WagonManager in order to set offline mode.", e );
            }
            finally
            {
                try
                {
                    container.release( wagonManager );
                }
                catch ( ComponentLifecycleException e )
                {
                    getLogger().warn( "Cannot release WagonManager.", e );
                }
            }
        }

        try
        {
            resolveParameters( request.getSettings() );
        }
        catch ( ComponentLookupException e )
        {
            throw new MavenExecutionException( "Unable to configure Maven for execution", e );
        }
        catch ( ComponentLifecycleException e )
        {
            throw new MavenExecutionException( "Unable to configure Maven for execution", e );
        }
        catch ( SettingsConfigurationException e )
        {
            throw new MavenExecutionException( "Unable to configure Maven for execution", e );
        }

        ProfileManager globalProfileManager = request.getGlobalProfileManager();

        globalProfileManager.loadSettingsProfiles( request.getSettings() );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.