use of org.codehaus.plexus.logging.console.ConsoleLogger in project maven-plugins by apache.
the class ModuleSetAssemblyPhaseTest method testIsDeprecatedModuleSourcesConfigPresent_ShouldNotCatchFileMode.
public void testIsDeprecatedModuleSourcesConfigPresent_ShouldNotCatchFileMode() {
final ModuleSources sources = new ModuleSources();
sources.setFileMode("777");
final ModuleSetAssemblyPhase phase = createPhase(new ConsoleLogger(Logger.LEVEL_DEBUG, "test"), null);
assertFalse(phase.isDeprecatedModuleSourcesConfigPresent(sources));
}
use of org.codehaus.plexus.logging.console.ConsoleLogger in project maven-plugins by apache.
the class ModuleSetAssemblyPhaseTest method testIsDeprecatedModuleSourcesConfigPresent_ShouldCatchExclude.
public void testIsDeprecatedModuleSourcesConfigPresent_ShouldCatchExclude() {
final ModuleSources sources = new ModuleSources();
sources.addExclude("**/excluded.txt");
final ModuleSetAssemblyPhase phase = createPhase(new ConsoleLogger(Logger.LEVEL_DEBUG, "test"), null);
assertTrue(phase.isDeprecatedModuleSourcesConfigPresent(sources));
}
use of org.codehaus.plexus.logging.console.ConsoleLogger in project maven-plugins by apache.
the class DefaultShaderTest method newShader.
private static DefaultShader newShader() {
DefaultShader s = new DefaultShader();
s.enableLogging(new ConsoleLogger(Logger.LEVEL_INFO, "TEST"));
return s;
}
use of org.codehaus.plexus.logging.console.ConsoleLogger in project xwiki-platform by xwiki.
the class PackageMojo method unzip.
private void unzip(File source, File targetDirectory) throws MojoExecutionException {
createDirectory(targetDirectory);
try {
ZipUnArchiver unArchiver = new ZipUnArchiver();
unArchiver.enableLogging(new ConsoleLogger(Logger.LEVEL_ERROR, "Package"));
unArchiver.setSourceFile(source);
unArchiver.setDestDirectory(targetDirectory);
unArchiver.setOverwrite(true);
unArchiver.extract();
} catch (Exception e) {
throw new MojoExecutionException(String.format("Error unpacking file [%s] into [%s]", source, targetDirectory), e);
}
}
use of org.codehaus.plexus.logging.console.ConsoleLogger in project maven-plugins by apache.
the class ModuleSetAssemblyPhaseTest method testAddModuleBinaries_ShouldFilterPomModule.
public void testAddModuleBinaries_ShouldFilterPomModule() throws ArchiveCreationException, AssemblyFormattingException, IOException, InvalidAssemblerConfigurationException, DependencyResolutionException {
final EasyMockSupport mm = new EasyMockSupport();
final MockAndControlForAddArtifactTask macTask = new MockAndControlForAddArtifactTask(mm);
final ModuleBinaries binaries = new ModuleBinaries();
binaries.setUnpack(false);
binaries.setFileMode("777");
binaries.setOutputDirectory("out");
binaries.setOutputFileNameMapping("artifact");
final MavenProject project = createProject("group", "artifact", "version", null);
project.setPackaging("pom");
final ArtifactMock artifactMock = new ArtifactMock(mm, "group", "artifact", "version", "pom", false);
project.setArtifact(artifactMock.getArtifact());
final Set<MavenProject> projects = singleton(project);
mm.replayAll();
createPhase(new ConsoleLogger(Logger.LEVEL_DEBUG, "test"), null).addModuleBinaries(null, null, binaries, projects, macTask.archiver, macTask.configSource);
mm.verifyAll();
}
Aggregations