org.apache.maven.plugin.assembly.utils
Class AssemblyFormatUtils

java.lang.Object
  extended by org.apache.maven.plugin.assembly.utils.AssemblyFormatUtils

public final class AssemblyFormatUtils
extends Object

Version:
$Id: AssemblyFormatUtils.java 1675144 2015-04-21 16:05:16Z krosenvold $

Method Summary
static org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator artifactInterpolator(Artifact artifact)
           
static org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator artifactProjectInterpolator(MavenProject artifactProject)
           
static org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator classifierRules(Artifact artifact)
           
static String evaluateFileNameMapping(String expression, Artifact artifact, MavenProject mainProject, Artifact moduleArtifact, AssemblerConfigurationSource configSource, org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator moduleProjectInterpolator, org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator artifactProjectInterpolator)
          ORDER OF INTERPOLATION PRECEDENCE: prefixed with "module
static org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator finalNameInterpolator(String finalName)
           
static String fixRelativeRefs(String src)
          ORDER OF INTERPOLATION PRECEDENCE: prefixed with "module
static String getDistributionName(Assembly assembly, AssemblerConfigurationSource configSource)
          Get the full name of the distribution artifact
static String getOutputDirectory(String output, MavenProject artifactProject, String finalName, AssemblerConfigurationSource configSource)
          ORDER OF INTERPOLATION PRECEDENCE: Support for special expressions, like ${finalName} (use the assembly plugin configuration not the build config) prefixed with "module." if moduleProject is non-null MavenProject instance for module being assembled prefixed with "artifact." if artifactProject is non-null MavenProject instance for artifact user-defined properties from the command line prefixed with "pom." or "project
static String getOutputDirectory(String output, String finalName, AssemblerConfigurationSource configSource, org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator moduleProjectIntrpolator, org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator artifactProjectInterpolator)
          ORDER OF INTERPOLATION PRECEDENCE: Support for special expressions, like ${finalName} (use the assembly plugin configuration not the build config) prefixed with "module." if moduleProject is non-null MavenProject instance for module being assembled prefixed with "artifact." if artifactProject is non-null MavenProject instance for artifact user-defined properties from the command line prefixed with "pom." or "project
static org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator moduleArtifactInterpolator(Artifact moduleArtifact)
           
static org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator moduleProjectInterpolator(MavenProject moduleProject)
           
static void warnForPlatformSpecifics(org.codehaus.plexus.logging.Logger logger, String destDirectory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDistributionName

public static String getDistributionName(Assembly assembly,
                                         AssemblerConfigurationSource configSource)
Get the full name of the distribution artifact

Parameters:
assembly - the assembly
Returns:
the distribution name

finalNameInterpolator

@Nonnull
public static org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator finalNameInterpolator(String finalName)

moduleProjectInterpolator

@Nonnull
public static org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator moduleProjectInterpolator(MavenProject moduleProject)

moduleArtifactInterpolator

public static org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator moduleArtifactInterpolator(Artifact moduleArtifact)

artifactProjectInterpolator

@Nonnull
public static org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator artifactProjectInterpolator(MavenProject artifactProject)

artifactInterpolator

@Nonnull
public static org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator artifactInterpolator(@Nonnull
                                                                                                                 Artifact artifact)

classifierRules

@Nonnull
public static org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator classifierRules(Artifact artifact)

getOutputDirectory

public static String getOutputDirectory(String output,
                                        MavenProject artifactProject,
                                        String finalName,
                                        AssemblerConfigurationSource configSource)
                                 throws AssemblyFormattingException
ORDER OF INTERPOLATION PRECEDENCE:
  1. Support for special expressions, like ${finalName} (use the assembly plugin configuration not the build config)
  2. prefixed with "module." if moduleProject is non-null
    1. MavenProject instance for module being assembled
  3. prefixed with "artifact." if artifactProject is non-null
    1. MavenProject instance for artifact
  4. user-defined properties from the command line
  5. prefixed with "pom." or "project.", or no prefix at all
    1. MavenProject instance from current build
  6. properties from main project
  7. system properties, from the MavenSession instance (to support IDEs)
  8. environment variables.

Throws:
AssemblyFormattingException

fixRelativeRefs

@Nonnull
public static String fixRelativeRefs(@Nonnull
                                             String src)
ORDER OF INTERPOLATION PRECEDENCE:
  1. prefixed with "module.", if moduleProject != null
    1. Artifact instance for module, if moduleArtifact != null
    2. ArtifactHandler instance for module, if moduleArtifact != null
    3. MavenProject instance for module
  2. prefixed with "artifact."
    1. Artifact instance
    2. ArtifactHandler instance for artifact
    3. MavenProject instance for artifact
  3. prefixed with "pom." or "project."
    1. MavenProject instance from current build
  4. no prefix, using main project instance
    1. MavenProject instance from current build
  5. Support for special expressions, like ${dashClassifier?}
  6. user-defined properties from the command line
  7. properties from main project
  8. system properties, from the MavenSession instance (to support IDEs)
  9. environment variables.


evaluateFileNameMapping

public static String evaluateFileNameMapping(String expression,
                                             @Nonnull
                                             Artifact artifact,
                                             @Nullable
                                             MavenProject mainProject,
                                             @Nullable
                                             Artifact moduleArtifact,
                                             @Nonnull
                                             AssemblerConfigurationSource configSource,
                                             org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator moduleProjectInterpolator,
                                             org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator artifactProjectInterpolator)
                                      throws AssemblyFormattingException
ORDER OF INTERPOLATION PRECEDENCE:
  1. prefixed with "module.", if moduleProject != null
    1. Artifact instance for module, if moduleArtifact != null
    2. ArtifactHandler instance for module, if moduleArtifact != null
    3. MavenProject instance for module
  2. prefixed with "artifact."
    1. Artifact instance
    2. ArtifactHandler instance for artifact
    3. MavenProject instance for artifact
  3. prefixed with "pom." or "project."
    1. MavenProject instance from current build
  4. no prefix, using main project instance
    1. MavenProject instance from current build
  5. Support for special expressions, like ${dashClassifier?}
  6. user-defined properties from the command line
  7. properties from main project
  8. system properties, from the MavenSession instance (to support IDEs)
  9. environment variables.

Throws:
AssemblyFormattingException

getOutputDirectory

public static String getOutputDirectory(String output,
                                        String finalName,
                                        AssemblerConfigurationSource configSource,
                                        org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator moduleProjectIntrpolator,
                                        org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator artifactProjectInterpolator)
                                 throws AssemblyFormattingException
ORDER OF INTERPOLATION PRECEDENCE:
  1. Support for special expressions, like ${finalName} (use the assembly plugin configuration not the build config)
  2. prefixed with "module." if moduleProject is non-null
    1. MavenProject instance for module being assembled
  3. prefixed with "artifact." if artifactProject is non-null
    1. MavenProject instance for artifact
  4. user-defined properties from the command line
  5. prefixed with "pom." or "project.", or no prefix at all
    1. MavenProject instance from current build
  6. properties from main project
  7. system properties, from the MavenSession instance (to support IDEs)
  8. environment variables.

Throws:
AssemblyFormattingException

warnForPlatformSpecifics

public static void warnForPlatformSpecifics(org.codehaus.plexus.logging.Logger logger,
                                            String destDirectory)


Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.