maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bentmann <benjamin.bentm...@udo.edu>
Subject [DISCUCSS] Make ToolchainManagerPrivate session-aware
Date Tue, 04 Aug 2009 08:49:39 GMT
Hi,

in the interface ToolchainManagerPrivate, i.e. the one used by the 
maven-toolchain-plugin to setup the toolchains for a build, we currently 
have the method

     ToolchainPrivate[] getToolchainsForType( String type )

The impl of this method processes the toolchains.xml. Given the above 
method signature, there is currently no way to configure the path to the 
toolchains.xml without using global state in the component. This is 
troublesome for multi-threaded Maven executions, say during embedded usage.

Hence I suggest to extend the method to

     ToolchainPrivate[] getToolchainsForType( String type, MavenSession 
session )

i.e. additionally passing in the session. This is one way to allow the 
impl to query per-session config like the path to the toolchains.xml.

The maven-toolchain-plugin is the only client of the 
ToolchainManagerPrivate interface and was not released yet. However, 
changing the interface means the next plugin version can only be used 
with a new Maven version, say 2.3+.

Any other ideas?


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message