org.apache.maven.dotnet.executable.compiler
Interface CompilerContext

All Superinterfaces:
NMavenContext
All Known Implementing Classes:
CompilerContextImpl

public interface CompilerContext
extends NMavenContext

Interface defining compiler services.

Author:
Shane Isbell

Field Summary
static java.lang.String ROLE
          Role used to register component implementations with the container.
 
Method Summary
 java.io.File getArtifact()
          Returns the artifact that the compiler generated.
 CommandFilter getCommandFilter()
          Creates a command filter.
 CompilerCapability getCompilerCapability()
          Return the CompilerCapability associated with this context.
 CompilerExecutable getCompilerExecutable()
          Returns an instance of the NetExecutable appropriate for given language/vendor/OS.
 CompilerRequirement getCompilerRequirement()
          Requirements used to match the compiler plugin associated with this context.
 java.util.List<java.lang.String> getCoreAssemblyNames()
          Returns assembly names that should be referenced by the compiler.
 java.util.List<org.apache.maven.artifact.Artifact> getDirectModuleDependencies()
          Returns a list of module (netmodule) dependencies that exist directly within the invoking projects pom (no transitive module dependencies).
 java.util.List<java.io.File> getEmbeddedResources()
          Returns a list of resources that the compiler should embed in the compiled assembly.
 KeyInfo getKeyInfo()
           
 java.util.List<org.apache.maven.artifact.Artifact> getLibraryDependencies()
          Returns a list of library (dll) dependencies of the class files.
 java.util.List<java.io.File> getLinkedResources()
          Returns a list of resources that the compiler should link to the compiled assembly
 java.util.List<org.apache.maven.artifact.Artifact> getModuleDependencies()
          Returns a list of module (netmodule) dependencies of the class files.
 CompilerConfig getNetCompilerConfig()
          Returns the user provided configuration associated to this context.
 java.lang.String getSourceDirectoryName()
          Returns the source directory (or test source directory) path of the class files.
 java.io.File getTargetDirectory()
           
 java.io.File getWin32Icon()
          Returns the icon that the assembly should display when viewed.
 java.util.List<java.io.File> getWin32Resources()
          Returns a list of win32 resources.
 void init(CompilerRequirement compilerRequirement, CompilerConfig config, org.apache.maven.project.MavenProject project, CapabilityMatcher capabilityMatcher)
          Initializes the context
 
Methods inherited from interface org.apache.maven.dotnet.NMavenContext
find, getLogger
 

Field Detail

ROLE

static final java.lang.String ROLE
Role used to register component implementations with the container.

Method Detail

getArtifact

java.io.File getArtifact()
                         throws InvalidArtifactException
Returns the artifact that the compiler generated. Typically, this is needed by a plugin to attach to the project for installation in the local repo. Example:

project.getArtifact().setFile(compilerContext.getArtifact());

Returns:
the artifact that the compiler generated.
Throws:
InvalidArtifactException

getCompilerCapability

CompilerCapability getCompilerCapability()
Return the CompilerCapability associated with this context.

Returns:
the CompilerCapability associated with this context.

getCoreAssemblyNames

java.util.List<java.lang.String> getCoreAssemblyNames()
Returns assembly names that should be referenced by the compiler. If the List is emtpy, then all core assemblies should be includes. These are assemblies that are not standard dependencies, but are system assemblies that replace the core .NET framework assemblies (used to create profiles)

Returns:
assembly names that should be referenced by the compiler.

getDirectModuleDependencies

java.util.List<org.apache.maven.artifact.Artifact> getDirectModuleDependencies()
Returns a list of module (netmodule) dependencies that exist directly within the invoking projects pom (no transitive module dependencies).

Returns:
a list of module (netmodule) dependencies of the class files.

getKeyInfo

KeyInfo getKeyInfo()

getLibraryDependencies

java.util.List<org.apache.maven.artifact.Artifact> getLibraryDependencies()
Returns a list of library (dll) dependencies of the class files.

Returns:
a list of library (dll) dependencies of the class files.

getModuleDependencies

java.util.List<org.apache.maven.artifact.Artifact> getModuleDependencies()
Returns a list of module (netmodule) dependencies of the class files.

Returns:
a list of module (netmodule) dependencies of the class files.

getNetCompilerConfig

CompilerConfig getNetCompilerConfig()
Returns the user provided configuration associated to this context. This is a live copy, so any changes to the config will be reflected during compilation.

Returns:
the user provided configuration associated to this context

getCompilerRequirement

CompilerRequirement getCompilerRequirement()
Requirements used to match the compiler plugin associated with this context.

Returns:
Requirements used to match the compiler plugin associated with this context.

getSourceDirectoryName

java.lang.String getSourceDirectoryName()
Returns the source directory (or test source directory) path of the class files. These are defined in the pom.xml by the properties ${build.sourceDirectory} or ${build.testSourceDirectory}.

Returns:
Returns the source directory (or test source directory) path of the class files.

getTargetDirectory

java.io.File getTargetDirectory()

getCompilerExecutable

CompilerExecutable getCompilerExecutable()
                                         throws ExecutionException
Returns an instance of the NetExecutable appropriate for given language/vendor/OS.

Returns:
an instance of the NetExecutable appropriate for given language/vendor/OS.
Throws:
ExecutionException - if there is a problem finding an appropriate executable.

getCommandFilter

CommandFilter getCommandFilter()
Creates a command filter. If the includes parameter is null, then the filter will return all commands that are not in the exlude filters. If the excludes parameter is null, then the filter will only return what is in the includes list. If both parameters are null...


getLinkedResources

java.util.List<java.io.File> getLinkedResources()
Returns a list of resources that the compiler should link to the compiled assembly

Returns:
a list of resources that the compiler should link to the compiled assembly

getEmbeddedResources

java.util.List<java.io.File> getEmbeddedResources()
Returns a list of resources that the compiler should embed in the compiled assembly. These may of any mime-type or it may be a generated .resource file.

Returns:
a list of resources that the compiler should embed in the compiled assembly.

getWin32Icon

java.io.File getWin32Icon()
Returns the icon that the assembly should display when viewed. Should not be used in conjunction with win32res.

Returns:
the icon that the assembly should display when viewed.

getWin32Resources

java.util.List<java.io.File> getWin32Resources()
Returns a list of win32 resources. Should not be used in conjunction with win32icon.

Returns:
a list of win32 resources.

init

void init(CompilerRequirement compilerRequirement,
          CompilerConfig config,
          org.apache.maven.project.MavenProject project,
          CapabilityMatcher capabilityMatcher)
          throws PlatformUnsupportedException
Initializes the context

Parameters:
compilerRequirement -
config -
project -
capabilityMatcher -
Throws:
PlatformUnsupportedException


Copyright © 2007 NMaven. All Rights Reserved.