The only way to do this with Maven is to use 'optional'. Which is also what David recommends. However, imo it sends the wrong message to the user and is also not the intended use of 'optional'. Are you ok, if I make it optional?