cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Maven (external-dependencies.xml) web modules doesn't work for web moduls inHybris 1808

Former Member
2,626

Hi there! Recently I noticed that external-dependencies.xml web modules doesn't work for web moduls in Hybris 1808. Has anybody faced with such isuue and maybe have approach how to fix it.

Thanks in advance for your answers!

Accepted Solutions (1)

Accepted Solutions (1)

mpern
Product and Topic Expert
Product and Topic Expert

To make it work (just tested with a fresh custom extension on 1808) make sure that usemaven="true" in the file customextension/extensioninfo.xml

Then add all external dependencies in customextension/web/webroot/WEB-INF/external-dependencies.xml

And they will be downloaded into the customextension/web/webroot/WEB-INF/lib folder during the next build ( ant all or ant build)

But beware:

  • transitive dependencies are NOT downloaded. You have to declare them, too.

  • the content of lib folders is deleted before downloading the dependencies. so make sure to declare all dependencies in the respective external-dependencies.xml files

  • Since all extensions share a common classpath ( basically all extension/lib folders), make sure you don't accidently introduce an incompatible version of a library.

    • But the customextension/web/webroot/WEB-INF/lib folder is not shared. Here you can do whatever you want

Answers (1)

Answers (1)

Former Member
0 Likes

thanks for the answer! I've just figured out why it was not working for me. It was due to not passing conditions in makrodef "updateLibFolder" in mavenTasks.xml

0 Likes

hi Dmytro, What you had to change in mavenTasks.xml file?

  1. I have added a external-depencies.xml file within customextension/web/webroot/WEB-INF/external-dependencies.xml.

  2. Changed the flag, useMaven=true.

  3. Build is successful. Downloading all required jar files into customextension/web/webroot/WEB-INF/lib directory.

  4. when I try to use the desired class, I am getting following error:

    EnableWebSocketMessageBroker cannot be resolved to a type

  5. i didn't modify anything in mavenTasks.xml

let me know your settings.

thanks.