CARGO-396 system-properties issue, but jetty ignores the embeddedClasspath it properly sets. That is why (I believe) AbstractCargoMojo.java called Thread.currentThread().setContextClassLoader(...). So anyway, using cargo_maven2plugin_C-396_and_C-397.patch did not expand jetty's classpath appropriately when I added <configuration><container><dependencies><dependency>....
So the bug COULD be considered to be both in cargo-maven2-plugin (for not setting the embedded classpath) properly and in the jetty portion of cargo for not using the embedded classpath. Or, we could consider it to be entirely in the cargo-maven2-plugin for both not setting the embedded classpath and using it before jetty is launched. I prefer the second option because it makes fixing it for me easier. (Although I'd rather see a mechanism other than Thread.currentThread().setContextClassLoader(...) to add the classpath as with more work, I think there are better ways. It is just I think that could be a future ticket/improvement. I and hopefully others can use this sooner.)
The attached patch moves Thread.currentThread().setContextClassLoader() to a place where it will be used by the code that sets the embedded classpath. Appropriate unit tests have also been included (for both 396 and 397).