in src/main/java/org/apache/maven/plugins/assembly/io/DefaultAssemblyReader.java [255:296]
public Assembly readAssembly(
Reader reader,
final String locationDescription,
final File assemblyDir,
final AssemblerConfigurationSource configSource)
throws AssemblyReadException, InvalidAssemblerConfigurationException {
Assembly assembly;
final MavenProject project = configSource.getProject();
try {
InterpolationState is = new InterpolationState();
final RecursionInterceptor interceptor =
new PrefixAwareRecursionInterceptor(InterpolationConstants.PROJECT_PREFIXES, true);
is.setRecursionInterceptor(interceptor);
FixedStringSearchInterpolator interpolator =
AssemblyInterpolator.fullInterpolator(project, createProjectInterpolator(project), configSource);
AssemblyXpp3Reader.ContentTransformer transformer =
AssemblyInterpolator.assemblyInterpolator(interpolator, is, LOGGER);
final AssemblyXpp3Reader r = new AssemblyXpp3Reader(transformer);
assembly = r.read(reader);
ComponentXpp3Reader.ContentTransformer ctrans =
AssemblyInterpolator.componentInterpolator(interpolator, is, LOGGER);
mergeComponentsWithMainAssembly(assembly, assemblyDir, configSource, ctrans);
debugPrintAssembly("After assembly is interpolated:", assembly);
AssemblyInterpolator.checkErrors(AssemblyId.createAssemblyId(assembly), is, LOGGER);
} catch (final IOException | XmlPullParserException e) {
throw new AssemblyReadException(
"Error reading descriptor: " + locationDescription + ": " + e.getMessage(), e);
}
if (assembly.isIncludeSiteDirectory()) {
includeSiteInAssembly(assembly, configSource);
}
return assembly;
}