I absolutely agree with @Torsten, but maybe there is something valid in your request:
when using IDE to develop the project, you can require it to stop offering your implementation classes in code completion lists.
If this is your reason, just add both dependencies, and for the implementation one, specify <scope>runtime</scope>
.
This ensures that:
- your
app
module get to classpath of javac, butapp-impl
does not - both
app
andapp-impl
will be placed underWEB-INF/lib/
in your war - IDE (if properly implemented) will not offer you completions from
app-impl
This definitely does not save you keystrokes, but gives you a better pom, carefully modelling the reality.