Package org.apache.maven.artifact.metadata

Examples of org.apache.maven.artifact.metadata.ArtifactMetadata


    }

    public void transformForDeployment( Artifact artifact, ArtifactRepository remoteRepository,
                                        ArtifactRepository localRepository )
    {
        ArtifactMetadata metadata = createMetadata( artifact );

        artifact.addMetadata( metadata );
    }
View Full Code Here


     */
    private void writeArtifact( EclipseOsgiPlugin plugin, Model model, ArtifactRepository remoteRepo )
        throws MojoExecutionException
    {
        Writer fw = null;
        ArtifactMetadata metadata = null;
        File pomFile = null;
        Artifact pomArtifact =
            artifactFactory.createArtifact( model.getGroupId(), model.getArtifactId(), model.getVersion(), null, "pom" ); //$NON-NLS-1$
        Artifact artifact =
            artifactFactory.createArtifact( model.getGroupId(), model.getArtifactId(), model.getVersion(), null,
View Full Code Here

    assertTrue( file.exists() );

    Iterator metaIter = artifact.getMetadataList().iterator();
        while ( metaIter.hasNext() )
        {
          ArtifactMetadata meta = (ArtifactMetadata) metaIter.next();
      File metaFile = new File( targetRepository.getBasedir(),
                    targetRepository.getLayout().pathOfLocalRepositoryMetadata( meta, targetRepository) );
      assertTrue( metaFile.exists() );
        }
  }
View Full Code Here

     */
    private void writeArtifact( EclipseOsgiPlugin plugin, Model model, ArtifactRepository remoteRepo )
        throws MojoExecutionException
    {
        Writer fw = null;
        ArtifactMetadata metadata = null;
        File pomFile = null;
        Artifact pomArtifact =
            artifactFactory.createArtifact( model.getGroupId(), model.getArtifactId(), model.getVersion(), null, "pom" ); //$NON-NLS-1$
        Artifact artifact =
            artifactFactory.createArtifact( model.getGroupId(), model.getArtifactId(), model.getVersion(), null,
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

    {
        List result = new ArrayList( delegate.getMetadataList() );
        boolean alreadySigned = false;
        for ( Iterator i = result.iterator(); i.hasNext() && !alreadySigned; )
        {
            ArtifactMetadata metadata = (ArtifactMetadata) i.next();
            alreadySigned = alreadySigned | signature.getKey().equals( metadata.getKey() );
        }
        if ( !alreadySigned )
        {
            result.add( signature );
        }
View Full Code Here

        {
            throw new MojoFailureException( "Cannot deploy artifact from the local repository: " + file );
        }

        File fileSig = signer.generateSignatureForArtifact( file );
        ArtifactMetadata metadata = new AscArtifactMetadata( artifact, fileSig, false );
        artifact.addMetadata( metadata );

        if ( !"pom".equals( packaging ) )
        {
            if ( pomFile == null && generatePom )
View Full Code Here

                        "Retrying deployment attempt " + ( count + 1 ) + " of " + retryFailedDeploymentCount );
                }
                deployer.deploy( source, artifact, deploymentRepository, localRepository );
                for ( Iterator i = artifact.getMetadataList().iterator(); i.hasNext(); )
                {
                    ArtifactMetadata metadata = (ArtifactMetadata) i.next();
                    getLog().info( "Metadata[" + metadata.getKey() + "].filename = " + metadata.getRemoteFilename());
                }
                exception = null;
                break;
            }
            catch ( ArtifactDeploymentException e )
View Full Code Here

            transformationManager.transformForResolve( artifact, remoteRepositories, localRepository );

            boolean localCopy = false;
            for ( Iterator i = artifact.getMetadataList().iterator(); i.hasNext(); )
            {
                ArtifactMetadata m = (ArtifactMetadata) i.next();
                if ( m instanceof SnapshotArtifactRepositoryMetadata )
                {
                    SnapshotArtifactRepositoryMetadata snapshotMetadata = (SnapshotArtifactRepositoryMetadata) m;

                    Metadata metadata = snapshotMetadata.getMetadata();
View Full Code Here

TOP

Related Classes of org.apache.maven.artifact.metadata.ArtifactMetadata

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.