I have a dependency which I have installed in Maven local repository and is being used locally but is not available on deployment server. I use that dependency using Class.forName(...)
so there will be no problem if it's missed from classpath on deployment server.
Is there any way to tell Maven to ignore a dependency if it failed to resolve it?
I doesn't seem that <scope>
or <optional>
can solve this problem, but it may be possible to do it with <profiles>
if there is any way to activate/deactivate a profile based on dependencies availability.