Package org.apache.maven.settings.io.xpp3

Examples of org.apache.maven.settings.io.xpp3.SettingsXpp3Writer


        if ( localRepo == null )
        {
            File settingsFile = new File( System.getProperty( "user.home" ), ".m2/settings.xml" );
            if ( settingsFile.exists() )
            {
                Settings settings = new SettingsXpp3Reader().read( ReaderFactory.newXmlReader( settingsFile ) );
                localRepo = settings.getLocalRepository();
            }
        }
        if ( localRepo == null )
        {
View Full Code Here


        assertTrue( globalSettingsFile.getAbsolutePath(), globalSettingsFile.isFile() );

        Reader reader = new InputStreamReader( new FileInputStream( globalSettingsFile ), "UTF-8" );
        try
        {
            new SettingsXpp3Reader().read( reader );
        }
        finally
        {
            reader.close();
        }
View Full Code Here

        throws IOException
    {
        Random entropy = new Random();
        try
        {
            Settings settings = new SettingsXpp3Reader().read( ReaderFactory.newXmlReader( originalSettingsXml ) );

            String localRepo = System.getProperty( "maven.repo.local" );

            if ( localRepo == null )
            {
View Full Code Here

        File m2Dir = new File( System.getProperty( "user.home" ), ".m2" );
        File settingsFile = new File( m2Dir, "settings.xml" );
        String localRepo = null;
        if ( settingsFile.exists() )
        {
            Settings settings = new SettingsXpp3Reader().read( new FileReader( settingsFile ) );
            localRepo = settings.getLocalRepository();
        }
        if ( localRepo == null )
        {
            localRepo = System.getProperty( "user.home" ) + "/.m2/repository";
View Full Code Here

        if ( localRepo == null )
        {
            File settingsFile = new File( System.getProperty( "user.home" ), ".m2/settings.xml" );
            if ( settingsFile.exists() )
            {
                Settings settings = new SettingsXpp3Reader().read( ReaderFactory.newXmlReader( settingsFile ) );
                localRepo = settings.getLocalRepository();
            }
        }
        if ( localRepo == null )
        {
View Full Code Here

        assertTrue( globalSettingsFile.getAbsolutePath(), globalSettingsFile.isFile() );

        Reader reader = new InputStreamReader( new FileInputStream( globalSettingsFile ), "UTF-8" );
        try
        {
            new SettingsXpp3Reader().read( reader );
        }
        finally
        {
            reader.close();
        }
View Full Code Here

                log( "Failed to initialize environment variable resolver. Skipping environment substitution in settings." );
            }

            StringReader sReader = new StringReader( rawInput );

            SettingsXpp3Reader modelReader = new SettingsXpp3Reader();

            settings = modelReader.read( sReader );

            RuntimeInfo rtInfo = new RuntimeInfo( settings );

            rtInfo.setFile( settingsFile );
View Full Code Here

                    getLogger().debug( "Failed to initialize envar resolver. Skipping resolution.", e );
                }

                StringReader sReader = new StringReader( rawInput );

                SettingsXpp3Reader modelReader = new SettingsXpp3Reader();

                settings = modelReader.read( sReader );

                RuntimeInfo rtInfo = new RuntimeInfo( settings );

                rtInfo.setFile( settingsFile );
View Full Code Here

                    getLogger().debug( "Failed to initialize envar resolver. Skipping resolution.", e );
                }

                StringReader sReader = new StringReader( rawInput );

                SettingsXpp3Reader modelReader = new SettingsXpp3Reader();

                settings = modelReader.read( sReader, true );

                RuntimeInfo rtInfo = new RuntimeInfo( settings );

                rtInfo.setFile( settingsFile );
View Full Code Here

            throw new IllegalArgumentException( "input reader missing" );
        }

        try
        {
            SettingsXpp3Reader r = new SettingsXpp3Reader();
            return r.read( input, isStrict( options ) );
        }
        catch ( XmlPullParserException e )
        {
            throw new SettingsParseException( e.getMessage(), e.getLineNumber(), e.getColumnNumber(), e );
        }
View Full Code Here

TOP

Related Classes of org.apache.maven.settings.io.xpp3.SettingsXpp3Writer

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.