I am trying to set my dependencies in the external-dependencies.xml in Hybris extension. The problem is it just load the libraries I specified in there and doesn't load the dependencies that the libraries need to work with at run-time.
For example Aixs2-kernel loads Axiom-api and impl and adb and so on. And in a normal maven project I don't need to specify each of them one by one.
Is there any way to make Hybris understand to fetch the rest of them?
SAP Hybris 6.4+
Yes, you can do this in by overwriting the
maven.download.options
parameter in an extensionproject.properties
file. It's default value is equal to:If you add to your extension
project.properties
the line:SAP Hybris platform will download all dependencies (also transitive). Of course this change will work only for your extension (please don't change content of the
project.properties
file located in core extensions).SAP Hybris 6.3 and older
Exclusion of the transitive dependencies is hardcoded in the
hybris/bin/platform/resources/ant/mavenTasks.xml
file (macroupdateLibFolder
). The only possible solution is to do a patch in SAP Hybris platform. You can change this code:to:
next define a property
in the
hybris/bin/platform/project.properties
and finally do steps from the solution for 6.4+.Warning: SAP Hybris platform provides a lot of libraries, so probably some of your transitive dependencies are already available. That is the reason, why downloading of the transitive dependencies are disabled. I think it is a good idea to specify them manually instead of downloading everything (you will avoid problems with the differences of the version).