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. 从入门到不放弃系列之Koa2

    一.Koa2入门 本来是想Express入门的,但是既然都是要学,干嘛不学最新的呢? 其实我想说,我本来只是想学个小程序开发,现在已经陆陆续续开了好多坑了.. 本文参考廖雪峰教程 二.Async 最新 ...

  2. python 笔记-转

    python笔记   Python 学习笔记 - 14.技巧(Tips)   Python 学习笔记 - 13.异常(Exception)   Python 学习笔记 - 12.流程控制(Contro ...

  3. Java I/O流-总结(InputStream,OutputStream,Reader,Writer)

    Java流总结 一. 流的分类 • 按数据流动方向 – 输入流:只能从中读取字节数据,而不能向其写出数据 – 输出流:只能向其写入字节数据,而不能从中读取数据 • 按照流所处理的数据类型 – 字节流: ...

  4. vue2.x中请求之前数据显示以及vuex缓存的问题

    在项目中遇到两个问题,简单的做个笔记来记录自己解决的问题,可能不是很好的处理办法,欢迎提出,自己还在不断优化中... 第一个是vue在加载页面的时候,会先加载静态资源,这个时候数据还没有请求回来,用户 ...

  5. [转]Extending the User Interface in Outlook 2010

    本文转自:https://msdn.microsoft.com/en-us/library/office/ee692172%28v=office.14%29.aspx#OfficeOLExtendin ...

  6. [转]How to Import a Text File into SQL Server 2012

    Importing a using the OpenRowSet() Function The OPENROWSET bulk row set provider is accessed by call ...

  7. [转]SQL SERVER中openrowset与opendatasource的区别

    本文转自:http://blog.sina.com.cn/s/blog_6399df820102vyy8.html SQL SERVER中openrowset与opendatasource的区别: o ...

  8. FileStream类的使用(文件流)

    1.什么是FileStream类 FileStream 类对文件系统上的文件进行读取.写入.打开和关闭操作,并对其他与文件相关的操作系统句柄进行操作,如管道.标准输入和标准输出.读写操作可以指定为同步 ...

  9. C# 委托、匿名方法、扩展方法

    一.委托的使用: 详细委托和事件解释请看另一篇:http://www.cnblogs.com/Liyuting/p/6760706.html 二.匿名方法 三.扩展方法

  10. 【转】C#中continue、break和return用法

    continue和break的用法一样,直接写上这个单词,后面加一个分号就行 比如: continue; break; 我们先来谈continue 看代码 for (int i=0; i<10; ...