I'm building an Apache Spark application that can both be debugged locally and deployed to cluster. To do this, I have to define its dependency to spark-core (a Java/scala library) to fulfil the following requirement.
Included in in compile (other wise the compilation fails) Included in run and test (for local debugging and unit test) Excluded in assembly (for deployment to a cluster with provided spark-core, this decrease jar size by 70M, I'm using maven-shade plugin to generate the all-inclusive jar as there are some jar hell issues that cannot be resolved using maven-assembly)
Unfortunately it looks like custom scope wasn't natively supported by maven. Is there a way to enable it using some plugins?