SAP Commerce a.k.a Hybris uses Apache Ant command line tool to do several things like setup, build, clean, database initialization, tomcat server start, etc. It is very important for a developer and there are a few important commands.
Most Important Sap Commerce Ant Commands
List of the most used ant commands:
ant -p # list of all commands ant build # compile code ant clean # clean compiled files ant all # compile by applying configurations ant clean all # run ant clean and all ant updatesystem # apply changes to database ant updatesystem clearOrphanedTypes # apply changes to database and clean removed types ant initialize # clean database and do fresh setup ant stopSolrServer # stop running Solr ant addoninstall # install an addon ant extgen # create and extension
Test Commands
Before running a test command please check if you have a test tenant. If you don’t have, run ant yunitinit
ant alltests # Executes all tests found by testClassesUtil.getAllTestClasses() ant unittests # Executes all tests found by testClassesUtil.getAllUnitClasses() ant demotests # Executes all tests found by testClassesUtil.getAllDemoClasses() ant integrationtests # Executes all tests found by testClassesUtil.getAllIntegrationClasses() ant performancetests # Executes all tests found by testClassesUtil.getAllPerformanceClasses() ant manualtests #Executes all tests found by testClassesUtil.getAllManualClasses()