Package org.apache.maven.artifact

Examples of org.apache.maven.artifact.Artifact.addMetadata()


        if ( !"pom".equals( packaging ) )
        {
            if ( pomFile != null )
            {
                ArtifactMetadata pomMetadata = new ProjectArtifactMetadata( artifact, pomFile );
                artifact.addMetadata( pomMetadata );
            }
            else
            {
                generatedPomFile = generatePomFile();
                ArtifactMetadata pomMetadata = new ProjectArtifactMetadata( artifact, generatedPomFile );
View Full Code Here


                ArtifactMetadata pomMetadata = new ProjectArtifactMetadata( artifact, generatedPomFile );
                if ( Boolean.TRUE.equals( generatePom ) || ( generatePom == null && !getLocalRepoFile(
                    pomMetadata ).exists() ) )
                {
                    getLog().debug( "Installing generated POM" );
                    artifact.addMetadata( pomMetadata );
                }
                else if ( generatePom == null )
                {
                    getLog().debug( "Skipping installation of generated POM, already present in local repository" );
                }
View Full Code Here

        if ( !"pom".equals( packaging ) )
        {
            if ( pomFile != null )
            {
                ArtifactMetadata pomMetadata = new ProjectArtifactMetadata( artifact, pomFile );
                artifact.addMetadata( pomMetadata );
            }
            else
            {
                generatedPomFile = generatePomFile();
                ArtifactMetadata pomMetadata = new ProjectArtifactMetadata( artifact, generatedPomFile );
View Full Code Here

                ArtifactMetadata pomMetadata = new ProjectArtifactMetadata( artifact, generatedPomFile );
                if ( Boolean.TRUE.equals( generatePom )
                    || ( generatePom == null && !getLocalRepoFile( pomMetadata ).exists() ) )
                {
                    getLog().debug( "Installing generated POM" );
                    artifact.addMetadata( pomMetadata );
                }
                else if ( generatePom == null )
                {
                    getLog().debug( "Skipping installation of generated POM, already present in local repository" );
                }
View Full Code Here

            }

            if ( !firstPass )
            {
                Artifact pomArtifact = artifactFactory.createProjectArtifact( pomGroupId, pomArtifactId, pomVersion );
                pomArtifact.addMetadata( new ProjectArtifactMetadata( pomArtifact, currentPom ) );

                try
                {
                    artifactInstaller.install( currentPom, pomArtifact, localRepo );
                }
View Full Code Here

    File pomFile = new File(properties.getProperty("pomFile"));

    ArtifactMetadata metadata = new ProjectArtifactMetadata(artifact, pomFile);

    artifact.addMetadata(metadata);

    return artifact;
  }

  /**
 
View Full Code Here

        snapshot.setTimestamp( tr.getDeploymentTimestamp() );
        snapshot.setBuildNumber( 1 );
        RepositoryMetadata metadata = new SnapshotArtifactRepositoryMetadata( expandedSnapshot, snapshot );
        String newVersion = snapshot.getTimestamp() + "-" + snapshot.getBuildNumber();
        expandedSnapshot.setResolvedVersion( StringUtils.replace( baseVersion, Artifact.SNAPSHOT_VERSION, newVersion ) );
        expandedSnapshot.addMetadata( metadata );
    return expandedSnapshot;
  }

  private void assertArtifactExists( Artifact artifact, ArtifactRepository targetRepository ) {
    File file = new File( targetRepository.getBasedir(),
View Full Code Here

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

            artifact.addMetadata( metadata );

            String finalName = project.getBuild().getFinalName();

            String filename = finalName + "." + artifact.getArtifactHandler().getExtension();
View Full Code Here

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

            artifact.addMetadata( metadata );

            String finalName = project.getBuild().getFinalName();

            String filename = finalName + "." + artifact.getArtifactHandler().getExtension();
View Full Code Here

        Versioning versioning = new Versioning();
        versioning.setLatest( projectArtifact.getVersion() );
        versioning.updateTimestamp();
        ArtifactRepositoryMetadata metadata = new ArtifactRepositoryMetadata( projectArtifact, versioning );
        projectArtifact.addMetadata( metadata );

        GroupRepositoryMetadata groupMetadata = new GroupRepositoryMetadata( project.getGroupId() );
        groupMetadata.addPluginMapping( getGoalPrefix(), project.getArtifactId(), project.getName() );

        projectArtifact.addMetadata( groupMetadata );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.