【发布时间】:2017-04-03 14:52:38
【问题描述】:
当我在 Eclipse 中启动我的应用程序时,在 src/main/resources 文件夹中有一个属性文件是没有问题的。然后当我运行maven install 时,这个属性文件在maven 程序集的帮助下被放入config 文件夹中。所以以下问题:
在 Eclipse 中工作时,我只需使用以下命令访问属性文件:
File propsFile = new File( "src/main/resources/settings.properties" );
在maven install 之后,我当然不能再访问这个文件了。但是哪个工作流程最好,在我的 Eclipse 开发期间和 maven install 之后访问文件而不用两次?!
maven install 之后我的装配结构如下所示:
application folder
|----bin
|----batch file to start my application
|----lib
|----my application jar
|----other dependencies jars
|----config
|----settings.properties
提前非常感谢:)
【问题讨论】:
-
您的应用程序组装完成后是如何启动的?通过马文?通过一个简单的系统脚本?
-
是的,使用 .cmd 文件 ...
标签: java eclipse maven properties maven-assembly-plugin