public void execute()

in src/it/setup-custom-toolchain/src/main/java/org/apache/maven/plugins/toolchains/its/custom/CustomMojo.java [43:58]


    public void execute() throws MojoExecutionException {
        // get the custom toolchain
        CustomToolchain toolchain = (CustomToolchain) toolchainManager.getToolchainFromBuildContext("custom", session);

        if (toolchain == null) {
            throw new MojoExecutionException(
                    "Could not find 'custom' toolchain: please check maven-toolchains-plugin configuration.");
        }

        getLog().info("Found 'custom' toolchain in build context.");

        // get a tool from the toolchain
        String path = toolchain.findTool("tool");

        getLog().info("Found expected tool named 'tool' at following location: " + path);
    }