Class ArtifactDeferrerImpl
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.sonatype.central.publisher.plugin.deffer.ArtifactDeferrerImpl
- All Implemented Interfaces:
org.codehaus.plexus.logging.LogEnabled,ArtifactDeferrer
@Component(role=ArtifactDeferrer.class)
public class ArtifactDeferrerImpl
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements ArtifactDeferrer
Implementation of
ArtifactDeferrer.
Highly inspired by the nexus-maven-plugin, specifically the DeferredDeployStrategy and the AbstractDeployStrategy classes
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classJust a "fake" synthetic handler, to overcome Maven2/3 differences (no extension setter in M2 but there is in M3 onDefaultArtifactHandler. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionArtifactDeferrerImpl(org.apache.maven.artifact.repository.ArtifactRepositoryFactory artifactRepositoryFactory, org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout artifactRepositoryLayout, org.apache.maven.artifact.installer.ArtifactInstaller artifactInstaller, org.apache.maven.artifact.deployer.ArtifactDeployer artifactDeployer) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.maven.artifact.repository.ArtifactRepositoryprotected org.apache.maven.artifact.repository.ArtifactRepositoryvoiddeployUp(org.apache.maven.execution.MavenSession mavenSession, File sourceDirectory, org.apache.maven.artifact.repository.ArtifactRepository remoteRepository) Deploy artifact.protected org.apache.maven.artifact.repository.ArtifactRepositorygetArtifactRepositoryForDirectory(File stagingDirectory) protected org.apache.maven.artifact.repository.ArtifactRepositorygetDeploymentRepository(org.apache.maven.execution.MavenSession mavenSession, String centralSnapshotsUrl, String publishingServerId) voidinstall(DeferArtifactRequest request) Installs the artifacts into the staging repository.Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
INDEX_FILE_NAME
- See Also:
-
INDEX_PROPS
-
INDEX_LINE_FORMAT
- See Also:
-
-
Constructor Details
-
ArtifactDeferrerImpl
@Inject public ArtifactDeferrerImpl(org.apache.maven.artifact.repository.ArtifactRepositoryFactory artifactRepositoryFactory, org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout artifactRepositoryLayout, org.apache.maven.artifact.installer.ArtifactInstaller artifactInstaller, org.apache.maven.artifact.deployer.ArtifactDeployer artifactDeployer)
-
-
Method Details
-
install
public void install(DeferArtifactRequest request) throws org.apache.maven.artifact.installer.ArtifactInstallationException, org.apache.maven.plugin.MojoExecutionException Installs the artifacts into the staging repository.- Specified by:
installin interfaceArtifactDeferrer- Parameters:
request- -DeferArtifactRequest- Throws:
org.apache.maven.artifact.installer.ArtifactInstallationException- - if the artifact installation failsorg.apache.maven.plugin.MojoExecutionException- - if the staging directory is null or the artifact repo cannot be created- See Also:
-
deployUp
public void deployUp(org.apache.maven.execution.MavenSession mavenSession, File sourceDirectory, org.apache.maven.artifact.repository.ArtifactRepository remoteRepository) throws org.apache.maven.artifact.deployer.ArtifactDeploymentException, IOException Description copied from interface:ArtifactDeferrerDeploy artifact.- Specified by:
deployUpin interfaceArtifactDeferrer- Parameters:
mavenSession- -MavenSessionsourceDirectory- -FileremoteRepository- -ArtifactRepository- Throws:
org.apache.maven.artifact.deployer.ArtifactDeploymentException- if deployment failsIOException- if reading of index fails
-
getArtifactRepositoryForDirectory
protected org.apache.maven.artifact.repository.ArtifactRepository getArtifactRepositoryForDirectory(File stagingDirectory) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
getDeploymentRepository
protected org.apache.maven.artifact.repository.ArtifactRepository getDeploymentRepository(org.apache.maven.execution.MavenSession mavenSession, String centralSnapshotsUrl, String publishingServerId) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
createStagingArtifactRepository
protected org.apache.maven.artifact.repository.ArtifactRepository createStagingArtifactRepository(String url) -
createDeploymentArtifactRepository
-