Package org.apache.maven

Examples of org.apache.maven.MavenException


        setUserPluginsDir( new File( mavenSession.getRootContext().getUserPluginsDir() ) );

        if ( !getPluginsDir().isDirectory()
            || ( getPluginsDir().listFiles() != null && getPluginsDir().listFiles().length == 0 ) )
        {
            throw new MavenException( "Maven was badly installed. Please reinstall it." );
        }

        if ( log.isDebugEnabled() )
        {
            log.debug( "Set plugin source directory to " + getPluginsDir().getAbsolutePath() );
View Full Code Here


            jellyScriptHousing.setScript( script );
        }
        catch ( Exception e )
        {
            // FIXME: exception? Yuck!
            throw new MavenException( "Error parsing driver.jelly", e );
        }

        return jellyScriptHousing;
    }
View Full Code Here

                    mapArtifactIdToPluginHousing( artifactId, housing );
                }
                else
                {
                    throw new MavenException( "Not a valid plugin file: " + file );
                }

                log.debug( "Installing plugin: " + housing );
                // By default, not caching the plugin - its a per execution installation
                housing.parse( transientMapper );
                // Should only be putting in the transientMapper - but it is not consistent with isLoaded
                housing.parse( mapper );
                if ( cache )
                {
                    FileUtils.copyFileToDirectory( file, userPluginsDir );
                    cacheManager.registerPlugin( pluginName, housing );
                    housing.parse( cacheManager );
                    cacheManager.saveCache( unpackedPluginsDir );
                }
            }
            else
            {
                throw new MavenException( "Not a valid JAR file: " + file );
            }
        }
        catch ( IOException e )
        {
            throw new MavenException( "Error installing plugin", e );
        }
    }
View Full Code Here

                {
                    return initialiseHousingPluginContext( housing, baseContext );
                }
                catch ( Exception e )
                {
                    throw new MavenException( "Error initialising plugin context", e );
                }
            }
        }
        throw new UnknownPluginException( id );
    }
View Full Code Here

                unzipper.setDest( unzipDir );
                unzipper.execute();
            }
            catch ( IOException e )
            {
                throw new MavenException( "Unable to extract plugin: " + jarFile, e );
            }
        }
        return unzipDir;
    }
View Full Code Here

            return script;
        }
        catch ( Exception e )
        {
            // FIXME: exception? Yuck!
            throw new MavenException( "Error parsing: " + jellyScriptHousing.getSource(), e );
        }
    }
View Full Code Here

            is.setSystemId( systemId );
            parser.parse( is, new PluginScriptParser( handler, this ) );
        }
        catch ( ParserConfigurationException e )
        {
            throw new MavenException( "Error parsing plugin script", e );
        }
        catch ( SAXException e )
        {
            throw new MavenException( "Error parsing plugin script", e );
        }
        catch ( IOException e )
        {
            throw new MavenException( "Error reading plugin script", e );
        }
    }
View Full Code Here

            fis = new FileInputStream( source );
            parse( handler, source.getAbsolutePath(), fis );
        }
        catch ( FileNotFoundException e )
        {
            throw new MavenException( "Error reading plugin script", e );
        }
        finally
        {
            if ( fis != null )
            {
View Full Code Here

            is.setSystemId( systemId );
            parser.parse( is, new PluginScriptParser( handler, this ) );
        }
        catch ( ParserConfigurationException e )
        {
            throw new MavenException( systemId + " : Error parsing plugin script", e );
        }
        catch ( SAXException e )
        {
            throw new MavenException( systemId + " : Error parsing plugin script", e );
        }
        catch ( IOException e )
        {
            throw new MavenException( systemId + " : Error reading plugin script", e );
        }
    }
View Full Code Here

            fis = new FileInputStream( source );
            parse( handler, source.getAbsolutePath(), fis );
        }
        catch ( FileNotFoundException e )
        {
            throw new MavenException( source + " : Error reading plugin script", e );
        }
        finally
        {
            if ( fis != null )
            {
View Full Code Here

TOP

Related Classes of org.apache.maven.MavenException

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.