mirror of
https://github.com/apache/maven.git
synced 2025-02-08 02:59:22 +00:00
turn on logging, resolve some issues surrounding test dependencies
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163473 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d514fff118
commit
1d615cd239
@ -57,7 +57,8 @@ public DefaultArtifact( String groupId, String artifactId, String version, Strin
|
||||
/** @todo this should be replaced by type handler */
|
||||
public DefaultArtifact( String groupId, String artifactId, String version, String type, String extension )
|
||||
{
|
||||
this( groupId, artifactId, version, SCOPE_RUNTIME, type, extension );
|
||||
// TODO: default should be runtime, except in currently building POM where it is compile.
|
||||
this( groupId, artifactId, version, SCOPE_COMPILE, type, extension );
|
||||
}
|
||||
|
||||
public DefaultArtifact( String groupId, String artifactId, String version, String type )
|
||||
|
@ -37,9 +37,11 @@
|
||||
import org.apache.maven.monitor.event.DefaultEventMonitor;
|
||||
import org.apache.maven.monitor.event.EventDispatcher;
|
||||
import org.apache.maven.monitor.logging.DefaultLog;
|
||||
import org.apache.maven.plugin.Plugin;
|
||||
import org.codehaus.classworlds.ClassWorld;
|
||||
import org.codehaus.plexus.embed.ArtifactEnabledEmbedder;
|
||||
import org.codehaus.plexus.logging.Logger;
|
||||
import org.codehaus.plexus.logging.LoggerManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@ -155,7 +157,14 @@ public static int main( String[] args, ClassWorld classWorld )
|
||||
|
||||
embedder.start( classWorld );
|
||||
|
||||
Logger logger = embedder.getContainer().getLogger();
|
||||
LoggerManager manager = (LoggerManager) embedder.lookup( LoggerManager.ROLE );
|
||||
if ( commandLine.hasOption( CLIManager.DEBUG ) )
|
||||
{
|
||||
manager.setThreshold( Logger.LEVEL_DEBUG );
|
||||
}
|
||||
|
||||
// TODO [BP]: do we set one per mojo? where to do it?
|
||||
Logger logger = manager.getLoggerForComponent( Plugin.ROLE );
|
||||
if ( logger != null )
|
||||
{
|
||||
request.setLog( new DefaultLog( logger ) );
|
||||
@ -163,9 +172,8 @@ public static int main( String[] args, ClassWorld classWorld )
|
||||
request.addEventMonitor( new DefaultEventMonitor( logger ) );
|
||||
}
|
||||
|
||||
// TODO [BP]: doing this here as it is CLI specific, though it doesn't feel like the right place.
|
||||
// TODO [BP]: doing this here as it is CLI specific, though it doesn't feel like the right place (likewise logger).
|
||||
WagonManager wagonManager = (WagonManager) embedder.lookup( WagonManager.ROLE );
|
||||
|
||||
wagonManager.setDownloadMonitor( new ConsoleDownloadMonitor() );
|
||||
|
||||
Maven maven = (Maven) embedder.lookup( Maven.ROLE );
|
||||
|
@ -807,7 +807,9 @@
|
||||
<version>4.0.0</version>
|
||||
<description>The scope of the dependency - build, compile, test, runtime</description>
|
||||
<type>String</type>
|
||||
<!-- TODO: set default value? see DefaultArtifact first
|
||||
<defaultValue>runtime</defaultValue>
|
||||
-->
|
||||
</field>
|
||||
</fields>
|
||||
<codeSegments>
|
||||
|
@ -108,6 +108,7 @@ public void execute( PluginExecutionRequest request, PluginExecutionResponse res
|
||||
|
||||
List messages = compiler.compile( compilerConfiguration );
|
||||
|
||||
// TODO: doesn't appear to be called
|
||||
if ( debug )
|
||||
{
|
||||
for ( Iterator i = classpathElements.iterator(); i.hasNext(); )
|
||||
|
Loading…
x
Reference in New Issue
Block a user