in src/main/java/org/apache/maven/plugins/assembly/archive/phase/ModuleSetAssemblyPhase.java [175:208]
private void validate(final ModuleSet moduleSet, final AssemblerConfigurationSource configSource) {
if ((moduleSet.getSources() == null) && (moduleSet.getBinaries() == null)) {
LOGGER.warn("Encountered ModuleSet with no sources or binaries specified. Skipping.");
}
if (moduleSet.isUseAllReactorProjects() && !moduleSet.isIncludeSubModules()) {
LOGGER.warn("includeSubModules == false is incompatible with useAllReactorProjects. Ignoring."
+ "\n\nTo refactor, remove the <includeSubModules/> flag, and use the <includes/> "
+ "and <excludes/> sections to fine-tune the modules included.");
}
final List<MavenProject> projects = configSource.getReactorProjects();
if (projects != null
&& projects.size() > 1
&& projects.indexOf(configSource.getProject()) == 0
&& moduleSet.getBinaries() != null) {
LOGGER.warn("[DEPRECATION] moduleSet/binaries section detected in root-project assembly."
+ "\n\nMODULE BINARIES MAY NOT BE AVAILABLE FOR THIS ASSEMBLY!"
+ "\n\n To refactor, move this assembly into a child project and use the flag "
+ "<useAllReactorProjects>true</useAllReactorProjects> in each moduleSet.");
}
if (moduleSet.getSources() != null) {
final ModuleSources sources = moduleSet.getSources();
if (isDeprecatedModuleSourcesConfigPresent(sources)) {
LOGGER.warn("[DEPRECATION] Use of <moduleSources/> as a file-set is deprecated. "
+ "Please use the <fileSets/> sub-element of <moduleSources/> instead.");
} else if (!sources.isUseDefaultExcludes()) {
LOGGER.warn("[DEPRECATION] Use of directoryMode, fileMode, or useDefaultExcludes "
+ "elements directly within <moduleSources/> are all deprecated. "
+ "Please use the <fileSets/> sub-element of <moduleSources/> instead.");
}
}
}