开发者

Setting environment variables for application Maven

My question is i have a pom file which calls a bat file which sets environment variables for the application. Then i call the ant script which uses these environment variables to compile and execute. These environment variables cant be recognized by ant script and it fails. I believe its because both run in different context. Can you guys let me know how to link this together.

org.codehaus.mojo exec-maven-plugin 1.1 开发者_JAVA百科 Pre_Clean pre-clean exec env.bat maven-antrun-plugin Compile compile run


Yes. When the batch file ends the environment changes go out of scope. So, you need to call ant from within your .bat file OR set up the environment before starting maven OR set them up in the POM.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜