use of org.codehaus.plexus.logging.console.ConsoleLogger in project maven-plugins by apache.
the class DefaultAssemblyArchiverTest method createSubject.
private DefaultAssemblyArchiver createSubject(final MockAndControlForAssemblyArchiver macMgr, final List<AssemblyArchiverPhase> phases, Logger logger) {
final DefaultAssemblyArchiver subject = new DefaultAssemblyArchiver(macMgr.archiverManager, phases);
subject.setContainer(container);
if (logger == null) {
logger = new ConsoleLogger(Logger.LEVEL_DEBUG, "test");
}
subject.enableLogging(logger);
return subject;
}
use of org.codehaus.plexus.logging.console.ConsoleLogger in project maven-plugins by apache.
the class ProjectUtilsTest method testGetProjectModules_ShouldExcludeInDirectModuleOfMasterWhenIncludeSubModulesIsFalse.
public void testGetProjectModules_ShouldExcludeInDirectModuleOfMasterWhenIncludeSubModulesIsFalse() throws IOException {
final MavenProject master = createTestProject("test", "testGroup", "1.0");
master.setFile(new File("project/pom.xml"));
master.getModel().addModule("module");
final MavenProject module = createTestProject("module", "testGroup", "1.0");
module.getModel().addModule("submodule");
module.setFile(new File("project/module/pom.xml"));
final MavenProject subModule = createTestProject("sub-module", "testGroup", "1.0");
subModule.setFile(new File("project/module/submodule/pom.xml"));
final List<MavenProject> projects = new ArrayList<MavenProject>(3);
projects.add(master);
projects.add(module);
projects.add(subModule);
final Set<MavenProject> result = ProjectUtils.getProjectModules(master, projects, false, new ConsoleLogger(Logger.LEVEL_INFO, "test"));
assertNotNull(result);
assertEquals(1, result.size());
final List<MavenProject> verify = new ArrayList<MavenProject>(projects);
verify.remove(master);
verify.remove(subModule);
verifyProjectsPresent(verify, result);
}
use of org.codehaus.plexus.logging.console.ConsoleLogger in project maven-plugins by apache.
the class ProjectUtilsTest method testGetProjectModules_ShouldNotIncludeMasterProject.
public void testGetProjectModules_ShouldNotIncludeMasterProject() throws IOException {
final MavenProject master = createTestProject("test", "testGroup", "1.0");
final Set<MavenProject> result = ProjectUtils.getProjectModules(master, Collections.singletonList(master), true, new ConsoleLogger(Logger.LEVEL_INFO, "test"));
assertNotNull(result);
assertTrue(result.isEmpty());
}
use of org.codehaus.plexus.logging.console.ConsoleLogger in project maven-plugins by apache.
the class ProjectUtilsTest method testGetProjectModules_ShouldExcludeNonModuleOfMasterProject.
public void testGetProjectModules_ShouldExcludeNonModuleOfMasterProject() throws IOException {
final MavenProject master = createTestProject("test", "testGroup", "1.0");
master.setFile(new File("project/pom.xml"));
final MavenProject other = createTestProject("other", "testGroup", "1.0");
other.setFile(new File("other/pom.xml"));
final List<MavenProject> projects = new ArrayList<MavenProject>(3);
projects.add(master);
projects.add(other);
final Set<MavenProject> result = ProjectUtils.getProjectModules(master, projects, true, new ConsoleLogger(Logger.LEVEL_INFO, "test"));
assertNotNull(result);
assertTrue(result.isEmpty());
}
Aggregations