Search in sources :

Example 1 with AssemblyInterpolator

use of org.apache.maven.plugins.assembly.interpolation.AssemblyInterpolator in project maven-plugins by apache.

the class AssemblyInterpolator2Test method testDependencyOutputFileNameMappingsAreNotInterpolated.

public void testDependencyOutputFileNameMappingsAreNotInterpolated() throws IOException, AssemblyInterpolationException {
    AssemblyInterpolator interpolator = new AssemblyInterpolator();
    Model model = new Model();
    model.setArtifactId("artifact-id");
    model.setGroupId("group.id");
    model.setVersion("1");
    Assembly assembly = new Assembly();
    DependencySet set = new DependencySet();
    set.setOutputFileNameMapping("${artifact.artifactId}.${artifact.extension}");
    assembly.addDependencySet(set);
    Assembly outputAssembly = interpolator.interpolate(assembly, model, Collections.EMPTY_MAP, DefaultAssemblyReader.create(model));
    List outputDependencySets = outputAssembly.getDependencySets();
    assertEquals(1, outputDependencySets.size());
    DependencySet outputSet = (DependencySet) outputDependencySets.get(0);
    assertEquals(set.getOutputFileNameMapping(), outputSet.getOutputFileNameMapping());
}
Also used : AssemblyInterpolator(org.apache.maven.plugins.assembly.interpolation.AssemblyInterpolator) Model(org.apache.maven.model.Model) DependencySet(org.apache.maven.plugins.assembly.model.DependencySet) List(java.util.List) Assembly(org.apache.maven.plugins.assembly.model.Assembly)

Aggregations

List (java.util.List)1 Model (org.apache.maven.model.Model)1 AssemblyInterpolator (org.apache.maven.plugins.assembly.interpolation.AssemblyInterpolator)1 Assembly (org.apache.maven.plugins.assembly.model.Assembly)1 DependencySet (org.apache.maven.plugins.assembly.model.DependencySet)1