1

is there a way to exclude both 'provided' and 'test' dependencies using maven dependency plug-in:

  1. with 'mvn dependency:tree | grep compiled' I'm getting one set of jars (which will be included into final war)

  2. and with 'mvn dependecy:build-classpath -DexcludeScope=provided' I'm getting different set jars for both 'test' & 'compile'

so is there a way to get 1st set of jars using dependency plugin options?

1
  • may be more correct question would be how to get exactly the same dependencies as ones used by war plugin (i.e. which are being copied to WEB-INF/lib) Commented Apr 29, 2015 at 3:27

1 Answer 1

1

'-Dscope=runtime' or '-DincludeScope=runtime' (depending on the goal being used) will restrict the plugin to examining dependencies used in the runtime scope

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.