Package org.apache.maven.model.v3_0_0.io.xpp3

Examples of org.apache.maven.model.v3_0_0.io.xpp3.MavenXpp3Reader


    }

    private org.apache.maven.model.v300.Model loadV3Pom( File inputFile )
        throws Exception
    {
        MavenXpp3Reader v3Reader = new MavenXpp3Reader();

        org.apache.maven.model.v300.Model model;

        model = v3Reader.read( new FileReader( inputFile ) );

        SAXReader r = new SAXReader();

        Document d = r.read( new FileReader( inputFile ) );
View Full Code Here


            build.setSourceDirectory( v3Build.getSourceDirectory() );
            build.setTestSourceDirectory( v3Build.getUnitTestSourceDirectory() );

            build.setResources( translateResources( v3Build.getResources() ) );

            UnitTest unitTest = v3Build.getUnitTest();
            if ( unitTest != null )
            {
                build.setTestResources( translateResources( unitTest.getResources() ) );

                List testIncludes = unitTest.getIncludes();

                List testExcludes = new ArrayList( unitTest.getExcludes() );

                if ( notEmpty( testIncludes ) || notEmpty( testExcludes ) )
                {
                    Plugin plugin = new Plugin();
                    plugin.setGroupId( "org.apache.maven.plugins" );
View Full Code Here

            build.setSourceDirectory( v3Build.getSourceDirectory() );
            build.setTestSourceDirectory( v3Build.getUnitTestSourceDirectory() );

            build.setResources( translateResources( v3Build.getResources() ) );

            UnitTest unitTest = v3Build.getUnitTest();
            if ( unitTest != null )
            {
                build.setTestResources( translateResources( unitTest.getResources() ) );

                List testIncludes = unitTest.getIncludes();

                List testExcludes = new ArrayList( unitTest.getExcludes() );

                if ( notEmpty( testIncludes ) || notEmpty( testExcludes ) )
                {
                    Plugin plugin = new Plugin();
                    plugin.setGroupId( "org.apache.maven.plugins" );
View Full Code Here

    }

    private org.apache.maven.model.v3_0_0.Model loadV3Pom( File inputFile )
        throws Exception
    {
        MavenXpp3Reader v3Reader = new MavenXpp3Reader();

        org.apache.maven.model.v3_0_0.Model model;

        model = v3Reader.read( new FileReader( inputFile ) );

        SAXReader r = new SAXReader();

        Document d = r.read( new FileReader( inputFile ) );
View Full Code Here

    {
        Model v4Model;

        if ( from != null )
        {
            MavenXpp3Reader v3Reader = new MavenXpp3Reader();

            StringWriter w = new StringWriter();
            IOUtil.copy( from, w );
            String content = StringUtils.replace( w.toString(), "${pom.currentVersion}", "${project.version}" );

            org.apache.maven.model.v3_0_0.Model v3Model = v3Reader.read( new StringReader( content ) );
            v4Model = translator.translate( v3Model );
        }
        else
        {
            v4Model = new Model();
View Full Code Here

                // v3 POM
                StringReader stringReader = new StringReader( contents );
                StringWriter writer = null;
                try
                {
                    MavenXpp3Reader v3Reader = new MavenXpp3Reader();
                    org.apache.maven.model.v3_0_0.Model v3Model = v3Reader.read( stringReader );

                    if ( doRelocation( artifact, v3Model, targetRepository, transaction ) )
                    {
                        Artifact relocatedPom = artifactFactory.createProjectArtifact( artifact.getGroupId(), artifact
                            .getArtifactId(), artifact.getVersion() );
View Full Code Here

    {
        Model v4Model;

        if ( from != null )
        {
            MavenXpp3Reader v3Reader = new MavenXpp3Reader();

            StringWriter w = new StringWriter();
            IOUtil.copy( from, w );
            String content = StringUtils.replace( w.toString(), "${pom.currentVersion}", "${project.version}" );

            org.apache.maven.model.v3_0_0.Model v3Model = v3Reader.read( new StringReader( content ) );
            v4Model = translator.translate( v3Model );
        }
        else
        {
            v4Model = new Model();
View Full Code Here

     * @todo should not have to throw Exception
     */
    public Project( Reader in )
        throws Exception
    {
        MavenXpp3Reader reader = new MavenXpp3Reader();
        model = reader.read( in );
        resolveDependencies();
        resolveVersions();
    }
View Full Code Here

            getLog().info("");
        }
    }

    private BundleList readBundleList(File file) throws IOException, XmlPullParserException {
        BundleListXpp3Reader reader = new BundleListXpp3Reader();
        FileInputStream fis = new FileInputStream(file);
        try {
            return reader.read(fis);
        } finally {
            fis.close();
        }
    }
View Full Code Here

    public static boolean isCurrentArtifact(MavenProject project, ArtifactDefinition def) {
        return (def.getGroupId().equals(project.getGroupId()) && def.getArtifactId().equals(project.getArtifactId()));
    }
   
    public static BundleList readBundleList(File file) throws IOException, XmlPullParserException {
        BundleListXpp3Reader reader = new BundleListXpp3Reader();
        FileInputStream fis = new FileInputStream(file);
        try {
            return reader.read(fis);
        } finally {
            fis.close();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.model.v3_0_0.io.xpp3.MavenXpp3Reader

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.