Coder Social home page Coder Social logo

hybris's Introduction

Hybris Development Boilerplate

An ant based Hybris development boilerplate with automations.

Prequiresites

๐Ÿ”น 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`).

Features

  • 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 via checkstyle.

    • ignored Hybris generated files.
    • check all custom .java, .xml and .properties sources.
  • format helper to align with clean code (integrated into lint). :neckbeard:

    • 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 and alltests, Hybris OOTB packages excluded and custom packages included automatically. :neckbeard: NOTE custom extensions need to be defined in localextensions.xml.

  • .env based addoninstall and addonuninstall supports, pattern:

    <template>.<storefront>.addonnames = <addon-a>,<addon-b>,<addon-c>

Getting Started

git clone https://github.com/jimzhan/hybris.git && cd hybris
ant bootstrap

bootstrap will:

  1. try load .env from ${basedir} to provide additional settings supports;
  2. pre-defined (via HYB_BIN_DIR) Hybris packages will be copied into bin folder;
  3. Two settings profiles will be generated under config folder afterward:
  • config/develop - settings profile for development (default), generated via Hybris develop template.
  • config/testing - settings profile for online testing, generated via Hybris production template.
  1. apache ivy will be installed along with checkstyle.
  2. 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>

OOTB MOD

  • 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 Hybris alltests tasks with self-introspection supports.
  • integrationtests - OOTB Hybris integrationtests tasks with self-introspection supports.
  • unitests - OOTB Hybris unittests tasks with self-introspection supports.

Scaffoldings

  • bootstrap - create a new instance with multi settings profiles supports (develop/develop, testing/production).
  • format - convert all custom sources code into better standards (compliant with google_checks.xml). โค๏ธ
  • lint - static code analysis via google_checks.xml (pre-format integrated).
  • purge - delete all generated data files and folders (data, log, roles, temp and velocity.log).

Why Ant?

  • 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.

TODOs

  • 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.

hybris's People

Contributors

jimzhan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.