What is an extension?
An extension is an encapsulated piece of the Hybris Commerce Suite that can contain business logic, type definitions, a web application, or Hybris Management Console (hmc) configuration.
There are two types of extensions :
1. Predefined
2. User defined Extension
Or
Basically extension is a unit of functionality in hybris. in other work you can say each extension is used for a specific functionality in hybris. If you look the architecture of Hybris then you can found that if you need too customize any functionality of Hybris then you do by creating your own extension So every extension in hybris contains
 
1. Bussiness logic
2. type defintion(items.xml)
3. web application
4. hmc configuration

Go To command prompt YourPath\hybris\bin\platform  And Type Following Commands

Step 1: Set ant Environment
               Your Path\hybris\bin\platform>setantenv.bat and PRESS Enter key

and Return Your Path \bin\platform>
 
Step 2: Type extension generate command
   2.a) Your Path \bin\platform>ant extgen  and PRESS Enter Key

2.b.) By default extension template select (yempty) Press Enter  key

     
2.b.1) After Pressing Enter key  Hybris Ask
 

If  simply press enter, by Default your extension name is " training" Other wise Type Your Extension name here. 

For Example : type "State" and PRESS enter key

 
2.b.2)  Again Hybris ask   Please choose the package name of your extension.

 
type Your package name, If press Enter by default package name accept other wise type Here. In My Case package name is " org.hybris.platform.state " and press enter

 
Now Your extension will create  and Next STEP  Hybris told you 
 
2.b.3)

When you perform ant target extgen then an extension will be created in custom folder.

 
Step 3: Update  new extension in You path/hybris/config/localextensions.xml

Double click on localextension.xml

 
Step 4 : Run ant all  and Return Command prompt

Step 5 Run Server  type command hybrisserver.bat and PRESS enter key

 

Afte Few minutes Your Server started and given a message.

 
Step 6: Go to browser and type http://localhost:9001 and PRESS enter key. Open Hybris administrative console.

                6.a> Open Hybris administrative console. and
                        Enter user name =admin
                                         password = nimda

 
Step 7: Go to platform->Extensions

     search your extension "state"  and you will get your extension.

 if the extension comes with a core extension module, an hmc extension module, webroot extension module
 
Step 8: Go to your extension/extensioninfo.xml. and comment

 
                like : state/ extensioninfo.xml  and comment
 
                <!--              <webmodule jspcompile="false" webroot="state" />   -->

Double click on extensioninfo.xml

Step 9: Stop server (ctrl+c)  and press y 

Run ant all

 
 and start server
                your path\hybris\bin\platform>hybrisserver.bat

after few minutes Server started
 

Go to browser http://localhost:9001 
                      and type username|password: admin|nimda
Go to platform->Extensions  
and check no accessible webroot  for state

Before

        
              
 
And two output directories
 
1) classes, to which ant builds generate classes
2) eclipsebin to which Eclipse generates the build output

个人学习

How To create extension in Hybris(创建Hybris的扩展)的更多相关文章

  1. [官网]CREATE EXTENSION PostGreSQL 创建函数的方法

    CREATE EXTENSION https://www.postgresql.org/docs/current/sql-createextension.html CREATE EXTENSION — ...

  2. git之create local reposition(创建本地仓库)

    1.创建名为git-reposition的仓库 mkdir home/sunjf/git-reposition 注:home/sunjf可以指定为你想要的路径下面 2.初始化仓库 cd ~/git-r ...

  3. 创建一个EMS 扩展包

    EMS Package 向导: File > New > Other > Delphi projects > EMS > EMS Package Empty packag ...

  4. C#创建自己的扩展方法

    C#可以创建自己的扩展方法Extension Method: 参考这篇<判断是否为空然后赋值>http://www.cnblogs.com/insus/p/8004097.html 里,前 ...

  5. 创建VS Code 扩展插件

    VS Code提供了强大的扩展功能,我们可以通过开发插件实现自己的业务模型编辑器.这里我们快速介绍一下插件的创建.开发和发布过程. 创建插件开发模板 首先需要确认系统中安装了node.js,并且可以使 ...

  6. java和javax都是Java的API包,java是核心包,javax的x是extension的意思,也就是扩展包。

    java和javax都是Java的API包,java是核心包,javax的x是extension的意思,也就是扩展包.

  7. 如何在backoffice里创建Hybris image container以及分配给product

    登录backoffice,在media container视图点击新建按钮: Catalog选择Product Catalog: 在Properties界面,可以选择media实例放入该contain ...

  8. git之remote repository create(远程仓库创建)

    参考:Git教程 - 廖雪峰的官方网站 1.在Git bash窗口执行如下指令创建SSH KEY: ssh-keygen -t rsa -C "sunjf@biomarker.com.cn& ...

  9. 新建体(2):create or replace object创建存储包、存储过程、函数

    http://heisetoufa.iteye.com/blog/366957/ 创建一个package(包) 声明: create or replace package mpay_route is ...

随机推荐

  1. win8.1弹框

    在winform或者wp8中用MessageBox.Show()弹框,但是wp8.1中已经不存在了 private async void btn_Click(object sender, Routed ...

  2. Linux 查看内核版本命令的相关说明

    hostname 显示主机名称uname -a 显示内核版本详细信息,其中包括主机名称,发行厂商这个命令是看不到的. 如果要看发行版及厂商可使用命令:lsb_release –a uname -a后, ...

  3. Hibernate中NoSession问题

    今天在使用hibernate中 Note note = hibTem.load(Note.class, id); 报了一个could not initialize proxy [cn.entity.N ...

  4. 啰里吧嗦式讲解java静态代理动态代理模式

    一.为啥写这个 文章写的比较啰嗦,有些东西可以不看,因为想看懂框架, 想了解SSH或者SSM框架的设计原理和设计思路, 又去重新看了一遍反射和注解, 然后看别人的博客说想要看懂框架得先看懂设计模式,于 ...

  5. java8 lambda 表达式

    lambada 表达式实质上是一个匿名方法,但该方法并非独立执行,而是用于实现由函数式接口定义的唯一抽象方法 使用 lambda 表达式时,会创建实现了函数式接口的一个匿名类实例 可以将 lambda ...

  6. win10 安装oracle 11gR2_database(内附下载地址)

    前言:想要为了后续开展项目做准备,而且打算使用oracle,所以必须先安装oracle.本机 win 10 64位系统. 第一步,下载 oracle 下载地址,官网(需要登录注册): http://d ...

  7. Code Signal_练习题_Array Replace

    Given an array of integers, replace all the occurrences of elemToReplace with substitutionElem. Exam ...

  8. 微信获取openId

    router.beforeEach(function(to, from, next){ //中间页等待跳转 if(to.meta.requireCheck=="WaitLogin" ...

  9. Centos7配置

    1.静态ip配置 1.1  cd  /etc/sysconfig/network-scripts/ 1.2 vim ifcfg-ens33 (可通过ls查看  一般为第一个) (网关DNS1可以通过V ...

  10. 在已配置成功的opencv3.2.0下配置opencv_contrib模块

    简介: 之前在Ubuntu下配置OpenCV时,因为对opencv3..0不是特别了解,没有把opencv_contrib进行安装,这里提醒大家尽量要一次性安装完毕,减少不必要的麻烦. .0文件夹 ( ...