org.apache.maven.toolchain.ToolchainManager Java Examples
The following examples show how to use
org.apache.maven.toolchain.ToolchainManager.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ExecMojo.java From exec-maven-plugin with Apache License 2.0 | 6 votes |
private Toolchain getToolchain() { Toolchain tc = null; try { if ( session != null ) // session is null in tests.. { ToolchainManager toolchainManager = (ToolchainManager) session.getContainer().lookup( ToolchainManager.ROLE ); if ( toolchainManager != null ) { tc = toolchainManager.getToolchainFromBuildContext( toolchain, session ); } } } catch ( ComponentLookupException componentLookupException ) { // just ignore, could happen in pre-2.0.9 builds.. } return tc; }