
Originally Posted by
scotthamilton77
If I use the maven PAR plugin, the same basic thing happens - per its documentation it will only include in the PAR those dependencies I explicitly refer to, it will not deal with transitive dependencies.
This is something that could be added to the maven PAR plugin. I say could as there would be some downsides to this approach that would limit its usefulness. If you packaged all of your dependencies in the PAR, they'd become scoped, and would only be available to the other bundles in the PAR, i.e. you'd lose one of the benefits of OSGi where you can share dependencies between applications.
Am I missing something? Or do I need to bite the bullet and either do this manually (copying my dependencies somewhere or writing my own automation for this)?
As you've mentioned, one solution for this sort of case is to configure your dm Server instances to access a hosted repository that contains all of the dependencies that you need. This means that you only have one repository that you need to keep up-to-date with your dependencies.
Another solution would be to collect together all of the dependencies using Maven, (as described in one of the posts above, and also covered in our GreenPages sample application) and then to also use Maven to copy these to the dm Server instance's repository. This would, however, require your build to know where the instance was.
I can see another solution here (that isn't supported at the moment) where dm Server would understand a deployment unit that was basically a collection of artifacts to be deployed, and a collection of artifacts to be added to its repository. There would be some problems to solve with this, e.g. how would dm Server know / be told to which repository it should add the artifacts but this approach may warrant some more thought. If this solution is of interest, please open a story describing your requirements so we can track it and think it through in detail to see if it makes sense.
Andy Wilkinson
SpringSource