Hybris插件安装问题:执行ant addoninstall命令提示目标不存在
Hey there, I’ve run into this exact hiccup before—let’s break down what’s going wrong and fix it step by step:
The Core Issue
You’re running the ant addoninstall command from the platform directory, but this target doesn’t belong to the platform project. That’s why you’re getting the "target does not exist" error.
Step-by-Step Solutions
Run the command from the Hybris root directory
Navigate back to your main Hybris installation folder (the one containingbin,platform,configdirectories) and execute the command there instead. The corrected command should look like this:ant addoninstall -Daddonnames="hartest" -DaddonStorefront.yacceleratorstorefront="hartest"Quick note: The second parameter follows the format
-DaddonStorefront.<storefront-extension-name>="<your-addon-name>"—you had the storefront name repeated at the end, which could have caused extra issues.Validate your extension setup
- Confirm both
hartestandyacceleratorstorefrontare properly listed in yourconfig/localextensions.xmlfile. - Make sure your earlier
ant allcommand finished without errors. If it failed, some build targets might not have been generated correctly.
- Confirm both
Check your addon structure
Ensure yourhartestaddon was generated correctly viaant extgen—it should live inhybris/bin/custom/hartest, and itsbuild.xmlfile should include theaddoninstalltarget (this is standard for extgen-created addons, but a quick check never hurts).
If Problems Persist
- Try cleaning your build first with
ant clean allfrom the Hybris root, then re-run the addon install command. - Cross-reference your Hybris version documentation—some older releases might use a slightly different command format (like specifying the addon path explicitly).
内容的提问来源于stack exchange,提问作者Harsha D

