Note that there are some explanatory texts on larger screens.

plurals
  1. POMaven and optional runtime dependencies
    primarykey
    data
    text
    <p>I'm starting to fix a java project that has used maven and while I've got the project to build, at runtime it fails with missing dependencies. I've had a look and the errors are missing optional dependencies of included compile time dependencies. I can go through and add these but it seems to me that I can have everything building and running nicely only for some piece of code that I missed to use a missing dependency and the whole thing falls apart.</p> <p>What I really want to know is whether there is an automated way to find optional dependencies that I have chosen to not include. I have used <code>mvn dependency:tree</code> but this only shows the dependencies I have (not sure of the scope it checks) and I have tried <code>mvn dependency:analyze</code> but this seems to show dependencies it thinks I don't use and those that have been pulled down indirectly. What I cannot see is how to see a list of optionals I don't include.</p> <p>Currently my method of working around this is to read the poms and try to work it out from there, but I don't see this as particularly robust.</p> <p>For reference, I am fairly new to maven style dependency management and on the face of it like it, but this optional thing is a bit of a stumbling block for me. I understand that optionals stop me pullin down dependencies I won't be using, but it hasn't clicked for me how I can workout what optionals are available and that I do need.</p> <p>I am using Eclipse Juno, m2Eclipse (also have maven 3.0.5 cli), java 6/7.</p> <p>Anyone got any ideas of how I can do this better, or what I am completely overlooking?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload