Package org.sonatype.security.legacy.model.v1_0_0.io.xpp3

Examples of org.sonatype.security.legacy.model.v1_0_0.io.xpp3.SecurityLegacyConfigurationXpp3Reader


    }

    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


    }

    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

            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

        "someFile.properties"
    };
   
    @BeforeClass
    public static void parseBundleList() throws Exception {
        final BundleListXpp3Reader reader = new BundleListXpp3Reader();
        final InputStream is = BundleListContentProviderTest.class.getClassLoader().getResourceAsStream(TEST_BUNDLE_LIST);
        assertNotNull("Expecting " + TEST_BUNDLE_LIST + " to be found", is);
        try {
            bundleList = reader.read(is);
        } finally {
            is.close();
        }
    }
View Full Code Here

            throw new MojoFailureException(String.format("Bundle list file %s does not exist.", bundleListFile.getAbsolutePath()));
        }

        interpolateProperties(initializedBundleList, this.project, this.mavenSession);

        final BundleListXpp3Writer writer = new BundleListXpp3Writer();
        try {
            this.bundleListOutput.getParentFile().mkdirs();
            writer.write(new FileWriter(bundleListOutput), initializedBundleList);
        } catch (IOException e) {
            throw new MojoExecutionException("Unable to write bundle list", e);
        }

        // if this project is a partial bundle list, it's the main artifact
View Full Code Here

*/
public class OutputBundleListMojo extends AbstractUsingBundleListMojo {

    @Override
    protected void executeWithArtifacts() throws MojoExecutionException, MojoFailureException {
        BundleListXpp3Writer writer = new BundleListXpp3Writer();
        try {
            writer.write(new OutputStreamWriter(System.out), getInitializedBundleList());
        } catch (IOException e) {
            throw new MojoExecutionException("Unable to write bundle list", e);
        }
    }
View Full Code Here

TOP

Related Classes of org.sonatype.security.legacy.model.v1_0_0.io.xpp3.SecurityLegacyConfigurationXpp3Reader

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.