1

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 Pre_Clean pre-clean exec env.bat maven-antrun-plugin Compile compile run

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.