Package org.apache.maven.project.artifact

Examples of org.apache.maven.project.artifact.ProjectArtifactMetadata


            // TODO use WriterFactory.newXmlWriter() when plexus-utils is upgraded to 1.4.5+
            fw = new OutputStreamWriter(new FileOutputStream(pomFile), "UTF-8"); //$NON-NLS-1$
            model.setModelEncoding("UTF-8"); // to be removed when encoding is detected instead of forced to UTF-8 //$NON-NLS-1$
            pomFile.deleteOnExit();
            new MavenXpp3Writer().write(fw, model);
            metadata = new ProjectArtifactMetadata(pomArtifact, pomFile);
            pomArtifact.addMetadata(metadata);
        } catch (IOException e) {
            throw new MojoExecutionException(
                    Messages.getString(
                            "EclipseToMavenMojo.errorwritingtemporarypom", e.getMessage()), e); //$NON-NLS-1$
View Full Code Here


            artifact.setFile( project.getFile() );
        }
        else
        {
            // Attach pom
            ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, project.getFile() );

            artifact.addMetadata( metadata );

            String finalName = project.getBuild().getFinalName();
View Full Code Here

            artifact.setFile( project.getFile() );
        }
        else
        {
            // Attach pom
            ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, project.getFile() );

            artifact.addMetadata( metadata );

            String finalName = project.getBuild().getFinalName();
View Full Code Here

        Artifact artifact = pom.getArtifact();

        boolean isPomArtifact = "pom".equals( pom.getPackaging() );
        if ( !isPomArtifact )
        {
            ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pom.getFile() );
            artifact.addMetadata( metadata );
        }

        ArtifactInstaller installer = (ArtifactInstaller) lookup( ArtifactInstaller.ROLE );
        try
View Full Code Here

        // Deploy the POM
        boolean isPomArtifact = "pom".equals( pom.getPackaging() );
        if ( !isPomArtifact )
        {
            ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pom.getFile() );
            artifact.addMetadata( metadata );
        }

        ArtifactRepository deploymentRepository = getDeploymentRepository( pom, artifact );
View Full Code Here

                                // item, then
                                // use that POM file instead of generating a new
                                // one
                                if (artifactItem.getPomFile() != null)
                                {
                                    ArtifactMetadata pomMetadata = new ProjectArtifactMetadata(
                                        artifact, artifactItem.getPomFile());
                                    getLog().debug(
                                        "installing defined POM file: "
                                            + artifactItem.getPomFile());
                                    artifact.addMetadata(pomMetadata);
                                }
                                else
                                {
                                    // dynamically create a new POM file for
                                    // this artifact
                                    generatedPomFile = generatePomFile(artifactItem);
                                    ArtifactMetadata pomMetadata = new ProjectArtifactMetadata(
                                        artifact, generatedPomFile);

                                    if (artifactItem.getGeneratePom() == true)
                                    {
                                        getLog().debug(
View Full Code Here

                            // if a POM file was provided for the artifact item,
                            // then
                            // use that POM file instead of generating a new one
                            if (artifactItem.getPomFile() != null)
                            {
                                ArtifactMetadata pomMetadata = new ProjectArtifactMetadata(
                                        artifact, artifactItem.getPomFile());
                                artifact.addMetadata(pomMetadata);
                            }
                            else
                            {
                                // dynamically create a new POM file for this
                                // artifact
                                generatedPomFile = generatePomFile(artifactItem);
                                ArtifactMetadata pomMetadata = new ProjectArtifactMetadata(
                                        artifact, generatedPomFile);

                                if (artifactItem.getGeneratePom() == true)
                                {
                                    artifact.addMetadata(pomMetadata);
View Full Code Here

        Artifact artifact = createArtifact( pom );

        boolean isPomArtifact = "pom".equals( pom.getPackaging() );
        if ( !isPomArtifact )
        {
            ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pom.getFile() );
            artifact.addMetadata( metadata );
        }

        ArtifactInstaller installer = (ArtifactInstaller) lookup( ArtifactInstaller.ROLE );
        try
View Full Code Here

            artifact.setFile( project.getFile() );
        }
        else
        {
            // Attach pom
            ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, project.getFile() );

            artifact.addMetadata( metadata );

            String finalName = project.getBuild().getFinalName();
View Full Code Here

        // Deploy the POM
        boolean isPomArtifact = "pom".equals( pom.getPackaging() );
        if ( !isPomArtifact )
        {
            ArtifactMetadata metadata = new ProjectArtifactMetadata( artifact, pom.getFile() );
            artifact.addMetadata( metadata );
        }

        ArtifactRepository deploymentRepository = getDeploymentRepository( pom, artifact );
View Full Code Here

TOP

Related Classes of org.apache.maven.project.artifact.ProjectArtifactMetadata

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.