【发布时间】:2016-12-15 19:17:18
【问题描述】:
我正在研究一个自动生成类,它从给定的模式生成 jsonObjects。这个想法是有一个包含所有模式的文件夹,然后能够根据需要浏览所有模式和过程。我的问题是如何将 pom 中定义的 sourceDirectory 作为参数传入。以及如何访问 outputDirectory 。 例如,我有一个这样的类
public void generateJSONOrder() throws JSONException, IOException
{
File folder = <sourceDirecotry>; // how do I get this ?
// other code here and then write output
FileWriter fileWriter = new FileWriter(new File(<outputDirectory>)); //how to get this too?
}
【问题讨论】:
-
你应该可以找到你的答案:maven.apache.org/examples/… 看看应用程序主页是如何设置和检索的。
标签: java rest api maven pom.xml