Saturday, 10 August 2013

How do I check if a environment variable exists in my pom.xml?

How do I check if a environment variable exists in my pom.xml?

If someone runs my pom.xml they get a nasty error because an environment
variable is not defined. I would like to trap this and show a more
straightforward error so that the problem can be easily fixed by defined
the environment variable. I know probably not a good idea to have an
environment variable in the pom, but this time I really need to. Any
clues?



The variable is JAVA_6_HOME, the path to JDK6 since my default one is JDK7

No comments:

Post a Comment