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());
}
Aggregations