MavenResourcesExecution如何获取变量而不是写入文件? [英] MavenResourcesExecution How to Get as Variable Instead of Writing to A File?

查看:98
本文介绍了MavenResourcesExecution如何获取变量而不是写入文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在插件上使用了

MavenResourcesExecution mavenResourcesExecution = new MavenResourcesExecution(resources, outputFileDirectory, project, encoding, buildFilters, Collections.<String>emptyList(), session);

    try {
        mavenResourcesFiltering.filterResources(mavenResourcesExecution);
    } catch (MavenFilteringException e) {
        e.printStackTrace();
    }

,它会将所有内容写入文件,但是我想将其作为变量来检索,而不是将其写入文件中.我该怎么办?

and it writes everyting into a file however I want to retrieve it as a variable instead of writing it into a file. How can I do it?

推荐答案

我已经实现了带有拦截器的插值器,并且可以检索变量的值.

I have implemented an interpolator with an interceptor and could retrieve the values of variables.

这篇关于MavenResourcesExecution如何获取变量而不是写入文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆