Package org.apache.maven.plugin

Examples of org.apache.maven.plugin.MojoExecutionException


                }
            }
        }
        catch (final Throwable throwable)
        {
            throw new MojoExecutionException("Failed to inject script wrappers", throwable);
        }
    }
View Full Code Here


        if (this.configurationUri != null && this.configurationUri.trim().length() > 0)
        {
            final URL configuration = ResourceUtils.toURL(this.configurationUri);
            if (configuration == null)
            {
                throw new MojoExecutionException("No configuration could be loaded from --> '" + this.configurationUri + "'");
            }
            contents = this.replaceProperties(ResourceUtils.getContents(configuration));
        }
        return contents;
    }
View Full Code Here

        {
            AndroMDApp andromdapp = new AndroMDApp();
            final URL internalConfiguration = ResourceUtils.getResource(INTERNAL_CONFIGURATION_URI);
            if (internalConfiguration == null)
            {
                throw new MojoExecutionException("No configuration could be loaded from --> '" +
                    INTERNAL_CONFIGURATION_URI + "'");
            }
            andromdapp.addConfigurationUri(internalConfiguration.toString());
            final String configuration = this.getConfigurationContents();
            if (configuration != null)
            {
                andromdapp.addConfiguration(this.getConfigurationContents());
            }
            andromdapp.run();
        }
        catch (final Throwable throwable)
        {
            if (throwable instanceof MojoExecutionException)
            {
                throw (MojoExecutionException)throwable;
            }
            throw new MojoExecutionException("An error occurred while attempting to generate an application", throwable);
        }
    }
View Full Code Here

                Runtime.getRuntime().exec(command);
            }
        }
        catch (Exception exception)
        {
            throw new MojoExecutionException("A failure occured while trying to link the ear", exception);
        }
    }
View Full Code Here

            {
                ;
            }
            if (root == null)
            {
                throw new MojoExecutionException("No parent could be retrieved for project --> " +
                    this.project.getId() + "', you must specify a parent project");
            }
            this.rootProject = root;
        }
        return this.rootProject;
View Full Code Here

                    }
                }
            }
            catch (final Throwable throwable)
            {
                throw new MojoExecutionException("Execution failed", throwable);
            }
            Projects.instance().add(this.project.getId());
        }
    }
View Full Code Here

                        }
                    }
                }
                catch (ProjectBuildingException exception)
                {
                    throw new MojoExecutionException("Error loading POM --> '" + pom + "'", exception);
                }
            }
        }
        return projects;
    }
View Full Code Here

            try
            {
                final File installDirectory = new File(this.installDirectory);
                if (!installDirectory.exists() || !installDirectory.isDirectory())
                {
                    throw new MojoExecutionException("'" + installDirectory + "' is not a valid install directory");
                }
                Artifact artifact = this.project.getArtifact();

                final String path = this.replaceExtension(
                        artifact,
                        JAR_EXTENSION);
                final String localRepositoryDirectory = this.localRepository.getBasedir();
                final File existingFile = new File(localRepositoryDirectory, path);
                final String bootstrapGroupId = this.getBootstrapGroupId(artifact);
                final String bootstrapPath = bootstrapGroupId.replace(
                        '.',
                        '/') + '/' + artifact.getArtifactId();
                final File bootstrapFile = new File(installDirectory, bootstrapPath + '.' + JAR_EXTENSION);
                this.getLog().info("Installing bootstrap artifact: " + bootstrapFile);
                FileUtils.copyFile(
                    existingFile,
                    bootstrapFile);
                final File bootstrapPomFile = new File(installDirectory, bootstrapPath + '.' + POM_EXTENSION);
                this.writeMinimalPom(bootstrapPomFile);
            }
            catch (final Throwable throwable)
            {
                throw new MojoExecutionException("Error creating bootstrap artifact", throwable);
            }
        }
    }
View Full Code Here

        if (this.project != null)
        {
            Model model = this.project.getModel();
            if (model == null)
            {
                throw new MojoExecutionException("Model could not be retrieved from current project");
            }

            // - remove the parent
            final Parent parent = model.getParent();
            final List dependencies = new ArrayList(model.getDependencies());
View Full Code Here

                    deployFile.delete();
                }
            }
            catch (final Throwable throwable)
            {
                throw new MojoExecutionException("An error occurred while attempting to undeploy artifact", throwable);
            }
        }
        else
        {
            this.getLog().warn(
View Full Code Here

TOP

Related Classes of org.apache.maven.plugin.MojoExecutionException

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.