Search in sources :

Example 6 with PropertiesBasedValueSource

use of org.codehaus.plexus.interpolation.fixed.PropertiesBasedValueSource in project maven-plugins by apache.

the class AssemblyFormatUtils method finalNameInterpolator.

@Nonnull
public static FixedStringSearchInterpolator finalNameInterpolator(String finalName) {
    final Properties specialExpressionOverrides = new Properties();
    if (finalName != null) {
        specialExpressionOverrides.setProperty("finalName", finalName);
        specialExpressionOverrides.setProperty("build.finalName", finalName);
    } else {
        return FixedStringSearchInterpolator.empty();
    }
    return FixedStringSearchInterpolator.create(new PropertiesBasedValueSource(specialExpressionOverrides));
}
Also used : Properties(java.util.Properties) PropertiesBasedValueSource(org.codehaus.plexus.interpolation.fixed.PropertiesBasedValueSource) Nonnull(javax.annotation.Nonnull)

Aggregations

Properties (java.util.Properties)6 PropertiesBasedValueSource (org.codehaus.plexus.interpolation.fixed.PropertiesBasedValueSource)6 MavenSession (org.apache.maven.execution.MavenSession)4 Nonnull (javax.annotation.Nonnull)2 ArtifactRepository (org.apache.maven.artifact.repository.ArtifactRepository)2 Model (org.apache.maven.model.Model)2 MavenProject (org.apache.maven.project.MavenProject)2 EasyMockSupport (org.easymock.classextension.EasyMockSupport)2 AssemblerConfigurationSource (org.apache.maven.plugins.assembly.AssemblerConfigurationSource)1 Assembly (org.apache.maven.plugins.assembly.model.Assembly)1 PojoConfigSource (org.apache.maven.plugins.assembly.testutils.PojoConfigSource)1 IMocksControl (org.easymock.classextension.IMocksControl)1