maven-artifact-transfer/src/it/maven-artifact-deployer-plugin/src/main/java/org/apache/maven/plugin/artifact/deployer/ArtifactDeployerMojo.java [135:209]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            throw new MojoExecutionException( e.getClass().getName(), e );
        }
    }

    private class CustomArtifactMetadata extends AbstractArtifactMetadata implements ArtifactMetadata
    {
        private final File file;

        private final boolean storedInArtifactVersionDirectory;
        
        protected CustomArtifactMetadata( Artifact artifact, File file, boolean storedInArtifactVersionDirectory ) 
        {
            super( artifact );   
            this.file = file;
            this.storedInArtifactVersionDirectory = storedInArtifactVersionDirectory;
        }
        
        @Override
        public File getFile() 
        {
            return file;
        }
        
        @Override
        public String getRemoteFilename()
        {
            return artifact.getArtifactId() + '-' + artifact.getVersion() + getDotExtension();
        }
        
        @Override
        public String getLocalFilename( ArtifactRepository repository )
        {
            return artifact.getArtifactId() + '-' + artifact.getVersion() + getDotExtension();
        }
        
        @Override
        public void storeInLocalRepository( ArtifactRepository localRepository, ArtifactRepository remoteRepository )
            throws RepositoryMetadataStoreException
        {
            throw new UnsupportedOperationException("ArtifactDeployerMojo.CustomArtifactMetadata.storeInLocalRepository(ArtifactRepository, ArtifactRepository)");   
        }
        
        @Override
        public boolean storedInArtifactVersionDirectory()
        {
            return storedInArtifactVersionDirectory;
        }
        
        @Override
        public void merge( org.apache.maven.artifact.metadata.ArtifactMetadata metadata )
        {
            throw new UnsupportedOperationException("ArtifactDeployerMojo.CustomArtifactMetadata.merge(ArtifactMetadata)");
        }

        @Override
        public void merge( org.apache.maven.repository.legacy.metadata.ArtifactMetadata metadata )
        {
            throw new UnsupportedOperationException("ArtifactDeployerMojo.CustomArtifactMetadata.merge(ArtifactMetadata)");
        }
        
        @Override
        public String getBaseVersion()
        {
            return artifact.getBaseVersion();
        }

        @Override
        public Object getKey()
        {
            return artifact.getId() + getDotExtension();
        }
        
        private String getDotExtension() 
        {
            return file.getName().substring( file.getName().lastIndexOf( '.' ) );
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



maven-artifact-transfer/src/it/maven-artifact-installer-plugin/src/main/java/org/apache/maven/plugin/artifact/installer/ArtifactInstallerMojo.java [131:206]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            throw new MojoExecutionException( e.getClass().getName(), e );
        }

    }

    private class CustomArtifactMetadata extends AbstractArtifactMetadata implements ArtifactMetadata
    {
        private final File file;

        private final boolean storedInArtifactVersionDirectory;
        
        protected CustomArtifactMetadata( Artifact artifact, File file, boolean storedInArtifactVersionDirectory ) 
        {
            super( artifact );   
            this.file = file;
            this.storedInArtifactVersionDirectory = storedInArtifactVersionDirectory;
        }
        
        @Override
        public File getFile() 
        {
            return file;
        }
        
        @Override
        public String getRemoteFilename()
        {
            return artifact.getArtifactId() + '-' + artifact.getVersion() + getDotExtension();
        }
        
        @Override
        public String getLocalFilename( ArtifactRepository repository )
        {
            return artifact.getArtifactId() + '-' + artifact.getVersion() + getDotExtension();
        }
        
        @Override
        public void storeInLocalRepository( ArtifactRepository localRepository, ArtifactRepository remoteRepository )
            throws RepositoryMetadataStoreException
        {
            throw new UnsupportedOperationException("ArtifactDeployerMojo.CustomArtifactMetadata.storeInLocalRepository(ArtifactRepository, ArtifactRepository)");   
        }
        
        @Override
        public boolean storedInArtifactVersionDirectory()
        {
            return storedInArtifactVersionDirectory;
        }
        
        @Override
        public void merge( org.apache.maven.artifact.metadata.ArtifactMetadata metadata )
        {
            throw new UnsupportedOperationException("ArtifactDeployerMojo.CustomArtifactMetadata.merge(ArtifactMetadata)");
        }

        @Override
        public void merge( org.apache.maven.repository.legacy.metadata.ArtifactMetadata metadata )
        {
            throw new UnsupportedOperationException("ArtifactDeployerMojo.CustomArtifactMetadata.merge(ArtifactMetadata)");
        }
        
        @Override
        public String getBaseVersion()
        {
            return artifact.getBaseVersion();
        }

        @Override
        public Object getKey()
        {
            return artifact.getId() + getDotExtension();
        }
        
        private String getDotExtension() 
        {
            return file.getName().substring( file.getName().lastIndexOf( '.' ) );
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



