Hello,

I am wondering what is the proper/best way to make sure a certain
(executable) file exists on a system.

I am working with a service that executes a certain command (pw.x) when
nicely asked to.  I'm finding that it is quite a pain to make sure that
everything is setup correctly for the service (paths, working directories,
etc).  It would be easier if there was an automatic way to check the setup
is correct. What is the best way to do that?  I see a few options:

1)  a unit-test that asserts that a path defined in the pom.xml (or
settings.xml, or profiles.xml) exists

2)  using the maven-enforcer-plugin to assert the existence of that
directory before building (this involves writing a custom enforcer rule I
think).

3)  same as 2) except writing an ant script to be executed by the
maven-antrun-plugin that checks the same thing


Has anyone encountered this decision before?  (Or have any thoughts on the
issue?)

I'm thinking #2 (or #3 for laziness/proof-of-concept) would be best, but
there could be other issues, like building on one system and deploying on
another...

Suggestions and ideas would be much appreciated!

Thank you,

-- Dan Kigelman

Reply via email to