An ant based Hybris development boilerplate with automations.
๐น JAVA_HOME
defined in System environment variables (version >= 8.0).
๐น ANT_HOME
defined in System environment variables (version >= 1.9.0).
๐น ANT_OPTS
defined in System environment variables (OPTIONAL), e.g. -Xmx1024m -Dfile.encoding=UTF-8
.
๐น HYB_BIN_DIR
defined and appointed to your local Hybris bin
package by the following orders:
1. passed in by CLI.
2. defined in System environment variables.
3. defined in `.env` (ignored by `.gitignore`).
-
all Hybris OOTB ant tasks.
-
handy/improved version of server related tasks.
-
package management supports via apache ivy.
-
custom packages definition supports (defined via
ivy.xml
, automatically installed). -
build-in static code analysis (pre-
build
and pre-all
) supports viacheckstyle
.- ignored Hybris generated files.
- check all custom
.java
,.xml
and.properties
sources.
-
format helper to align with clean code (integrated into
lint
).- Convert all tabs to spaces (size: 2).
- Convert all EOLs to a single LF.
- Remove any EOF character found at the end.
- Add a missing EOL to the last line of a processed file.
-
multi settings profile via
HYBRIS_CONFIG_DIR
by following order:- passed in by CLI.
- defined in System environment variables.
- default settings profile -
config/develop
.
-
self introspection for
unittests
,integrationtests
andalltests
, Hybris OOTB packages excluded and custom packages included automatically.NOTE custom extensions need to be defined in
localextensions.xml
. -
.env
basedaddoninstall
andaddonuninstall
supports, pattern:<template>.<storefront>.addonnames = <addon-a>,<addon-b>,<addon-c>
git clone https://github.com/jimzhan/hybris.git && cd hybris
ant bootstrap
bootstrap
will:
- try load
.env
from${basedir}
to provide additional settings supports; - pre-defined (via
HYB_BIN_DIR
) Hybris packages will be copied intobin
folder; - Two settings profiles will be generated under
config
folder afterward:
config/develop
- settings profile for development (default), generated via Hybrisdevelop
template.config/testing
- settings profile for online testing, generated via Hybrisproduction
template.
- apache ivy will be installed along with
checkstyle
. - install custom dependencies defined in
${basedir}/ivy.xml
(if any).
NOTE you can still generate new/individual settings profile using following command:
ant createConfig -DHYBRIS_CONFIG_DIR=`pwd`/config/<profile> -Dinput.template=<develop|production>
addoninstall
- provides.env
based supports via specific pattern (<template>.<storefront>.addonnames=<addon-a>,<addon-b>
)addonuninstall
- provides.env
based supports via specific pattern (<template>.<storefront>.addonnames=<addon-a>,<addon-b>
)restartHybrisServer
- provides shortcut for stop-n-start current Hybris server.restartSolrServer
- provides shortcut for stop-n-start current Solr server.startHybrisServer
- starts Hybris server at the foreground (default) or background (via-Dmode=start
, synonym to tomcat arguments).stopHybrisServer
- stops Hybris server at the background (if any).alltests
- OOTB Hybrisalltests
tasks with self-introspection supports.integrationtests
- OOTB Hybrisintegrationtests
tasks with self-introspection supports.unitests
- OOTB Hybrisunittests
tasks with self-introspection supports.
bootstrap
- create a new instance with multi settings profiles supports (develop/develop, testing/production).format
- convert all custom sources code into better standards (compliant withgoogle_checks.xml
). โค๏ธlint
- static code analysis viagoogle_checks.xml
(pre-format
integrated).purge
- delete all generated data files and folders (data
,log
,roles
,temp
andvelocity.log
).
- simple, elegant and performant โค๏ธ
- first class integration with Hybris OOTB automations.
- fast and stable, especially comparing to Gradle ๐ฉ.
NOTE Hybris OOTB ant tasks remain the same.
- editor/IDE/GIT settings.
- Hybris OOTB ant tasks integrations.
- Multi settings profiles supports.
- daemon server supports.
- create new settings profile.
-
addoninstall
/addonuninstall
supports mechanism. - running server detections.
- Ivy package manager integration.
- checkstyle integration (pre-build).
- format all source code into
google_checks.xml
compliant mode. - auto-scope for testing.
-
localextensions.xml
introspections. - Wiki Pages.