Package org.apache.maven

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


                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

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

                    }
                    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

                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

        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

        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

                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

        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

                // No need to filter our search. We want to resolve all artifacts.
                dependencyGraphBuilder.buildDependencyGraph( project, null, projects );
            }
            catch ( DependencyGraphBuilderException e )
            {
                throw new MavenExecutionException( "Could not resolve dependencies for project: " + project, e );
            }

            try
            {
                log.info( "building without reactor projects" );
                // resolution without reactor projects, to check that it is not possible at this point
                dependencyGraphBuilder.buildDependencyGraph( project, null );
            }
            catch ( DependencyGraphBuilderException e )
            {
                log.info( "expected resolution failure: " + e.getMessage() );

                try
                {
                    FileUtils.fileWrite( resolved.getAbsolutePath(), e.getMessage() );
                }
                catch ( IOException ioe )
                {
                    throw new MavenExecutionException( "Could not write " + resolved, ioe );
                }
            }
        }

        log.info( "" );
View Full Code Here

TOP

Related Classes of org.apache.maven.MavenExecutionException

Copyright © 2018 www.massapicom. 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.