org.apache.maven.dotnet.artifact.impl
Class ArtifactInstallerImpl

java.lang.Object
  extended by org.apache.maven.dotnet.artifact.impl.ArtifactInstallerImpl
All Implemented Interfaces:
ArtifactInstaller, org.codehaus.plexus.logging.LogEnabled

public class ArtifactInstallerImpl
extends java.lang.Object
implements ArtifactInstaller, org.codehaus.plexus.logging.LogEnabled

Provides an implementation of the ArtifactInstaller interface.

Author:
Shane Isbell

Field Summary
 
Fields inherited from interface org.apache.maven.dotnet.artifact.ArtifactInstaller
ROLE
 
Constructor Summary
ArtifactInstallerImpl()
          Constructor.
 
Method Summary
 void enableLogging(org.codehaus.plexus.logging.Logger logger)
           
 void init(ArtifactContext artifactContext, java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> remoteArtifactRepositories, java.io.File localRepository)
          Initializes the installer.
protected  void initTest(org.apache.maven.artifact.factory.ArtifactFactory artifactFactory, org.codehaus.plexus.logging.Logger logger)
           
 void installArtifactAndDependenciesIntoPrivateApplicationBase(java.io.File localRepository, org.apache.maven.artifact.Artifact artifact, java.util.List<org.apache.maven.model.Dependency> dependencies)
          Installs both the artifact and all of its dependencies into the private application base.
 void installArtifactWithPom(org.apache.maven.artifact.Artifact artifact, java.io.File pomFile, boolean modifyProjectMetadata)
          Installs artifacts into the local Maven repository.
 void installFileWithoutPom(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String packaging, java.io.File artifactFile)
          Installs a non-maven artifact into the local maven repository so that the artifact can be used within a Maven build process.
 void resolveAndInstallNetDependenciesForProfile(java.lang.String profile, java.util.List<org.apache.maven.model.Dependency> netDependencies, java.util.List<org.apache.maven.model.Dependency> javaDependencies)
          Resolves and installs the .NET artifacts (as given in the net-dependencies.xml file) and the specified .NET and java dependencies.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArtifactInstallerImpl

public ArtifactInstallerImpl()
Constructor. This method is intended to by invoked by the plexus-container, not by the application developer.

Method Detail

initTest

protected void initTest(org.apache.maven.artifact.factory.ArtifactFactory artifactFactory,
                        org.codehaus.plexus.logging.Logger logger)

enableLogging

public void enableLogging(org.codehaus.plexus.logging.Logger logger)
Specified by:
enableLogging in interface org.codehaus.plexus.logging.LogEnabled
See Also:
LogEnabled.enableLogging(org.codehaus.plexus.logging.Logger)

resolveAndInstallNetDependenciesForProfile

public void resolveAndInstallNetDependenciesForProfile(java.lang.String profile,
                                                       java.util.List<org.apache.maven.model.Dependency> netDependencies,
                                                       java.util.List<org.apache.maven.model.Dependency> javaDependencies)
                                                throws java.io.IOException
Description copied from interface: ArtifactInstaller
Resolves and installs the .NET artifacts (as given in the net-dependencies.xml file) and the specified .NET and java dependencies. If a profile is specified, this method will includes dependencies with that profile.

Specified by:
resolveAndInstallNetDependenciesForProfile in interface ArtifactInstaller
Parameters:
profile - the specified profile to resolve. This value may be null.
netDependencies - additional .NET artifacts to resolve and install.
javaDependencies - the Java Dependencies to resolve. Typically these should be the java bindings for the .NET plugins.
Throws:
java.io.IOException - if there is a problem with installation
See Also:
org.apache.maven.dotnet.artifact.ArtifactInstaller#resolveAndInstallNetDependenciesForProfile(String, java.util.List, java.util.List)

installArtifactAndDependenciesIntoPrivateApplicationBase

public void installArtifactAndDependenciesIntoPrivateApplicationBase(java.io.File localRepository,
                                                                     org.apache.maven.artifact.Artifact artifact,
                                                                     java.util.List<org.apache.maven.model.Dependency> dependencies)
                                                              throws java.io.IOException
Description copied from interface: ArtifactInstaller
Installs both the artifact and all of its dependencies into the private application base.

Specified by:
installArtifactAndDependenciesIntoPrivateApplicationBase in interface ArtifactInstaller
Parameters:
localRepository - the root directory of the private application base
artifact - the artifact to install
dependencies - the dependencies to install
Throws:
java.io.IOException - if there is a problem installing any of the artifacts into the private application base
See Also:
org.apache.maven.dotnet.artifact.ArtifactInstaller#installArtifactAndDependenciesIntoPrivateApplicationBase(java.io.File, org.apache.maven.artifact.Artifact, java.util.List)

installArtifactWithPom

public void installArtifactWithPom(org.apache.maven.artifact.Artifact artifact,
                                   java.io.File pomFile,
                                   boolean modifyProjectMetadata)
                            throws org.apache.maven.artifact.installer.ArtifactInstallationException
Description copied from interface: ArtifactInstaller
Installs artifacts into the local Maven repository. Unlike the installFile method, this method will also check whether an exe.config file is associated with the artifact and install the exe.config into the local maven repository. This will allow installed artifacts, with their associated configuration information, to be directly executed from the local maven repository.

Typically the artifact parameter will be obtained directly through the maven project: MavenProject.getArtifact. In those cases where the MavenProject object is unavailable, then you can use the installFile method from this interface.

Specified by:
installArtifactWithPom in interface ArtifactInstaller
Parameters:
artifact - the artifact to install
pomFile - the pom file of the installed artifact
Throws:
org.apache.maven.artifact.installer.ArtifactInstallationException - if there is a problem installing the artifact
See Also:
ArtifactInstaller.installArtifactWithPom(org.apache.maven.artifact.Artifact,java.io.File,boolean)

installFileWithoutPom

public void installFileWithoutPom(java.lang.String groupId,
                                  java.lang.String artifactId,
                                  java.lang.String version,
                                  java.lang.String packaging,
                                  java.io.File artifactFile)
                           throws org.apache.maven.artifact.installer.ArtifactInstallationException
Description copied from interface: ArtifactInstaller
Installs a non-maven artifact into the local maven repository so that the artifact can be used within a Maven build process.

Specified by:
installFileWithoutPom in interface ArtifactInstaller
Parameters:
groupId - the group id of the artifact to install
artifactId - the artifact id of the artifact to install
version - the version of the artifact to install
packaging - the packaging type of the artifact to install
artifactFile - the artifact to install
Throws:
org.apache.maven.artifact.installer.ArtifactInstallationException - if there is a problem installing the artifact
See Also:
ArtifactInstaller.installFileWithoutPom(String, String, String, String, java.io.File)

init

public void init(ArtifactContext artifactContext,
                 java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> remoteArtifactRepositories,
                 java.io.File localRepository)
Description copied from interface: ArtifactInstaller
Initializes the installer.

Specified by:
init in interface ArtifactInstaller
Parameters:
artifactContext - the artifact context associated with this installer
remoteArtifactRepositories - the list of remote artifact repositories
localRepository - the location of the local maven repository
See Also:
org.apache.maven.dotnet.artifact.ArtifactInstaller#init(org.apache.maven.dotnet.artifact.ArtifactContext, java.util.List, java.io.File)


Copyright © 2007 NMaven. All Rights Reserved.