eclipse p2 update

11
ECLIPSE P2 UPDATE Eclipse 3.6 조조조 (v0.1, 11/11/08) http://cafe.naver.com/eclipse plugin http://hangumkj.blogspot.com/ [email protected]

Upload: cho-hyun-jong

Post on 13-Jan-2015

2.706 views

Category:

Technology


2 download

DESCRIPTION

http://www.ralfebert.de/blog/eclipsercp/p2_updates_tutorial_36/

TRANSCRIPT

Page 1: Eclipse P2 update

ECLIPSE P2 UPDATEEclipse 3.6

조현종 (v0.1, 11/11/08)http://cafe.naver.com/eclipsepluginhttp://hangumkj.blogspot.com/[email protected]

Page 2: Eclipse P2 update

목 차

Making the application updateable Feature / Product setup 배포 참고자료

이 PPT 는 http://www.ralfebert.de/blog/eclipsercp/p2_updates_tutorial_36/를 요약 하였습니다 .

Page 3: Eclipse P2 update

Making the application updateable

Creating the example project Create a new plug-in project com.example.mail

Download org.eclipselabs.p2.rcpupdate File -> Import -> Existing Projects Create a new menu

Add a package import to org.eclipselabs.p2.rcpupdate.utils

<extension point="org.eclipse.ui.menus"> <menuContribution locationURI="menu:help"> <command commandId="org.eclipselabs.p2.rcpupdate.install" style="push"/> <command commandId="org.eclipselabs.p2.rcpupdate.update" style="push"/> </menuContribution> </extension>

Page 4: Eclipse P2 update

Making the application updateable

Application startup by calling P2Utilpublic class ApplicationWorkbenchAdvisor extends Workben-chAdvisor { // ... @Override public void preStartup() { P2Util.checkForUpdates(); } }

Page 5: Eclipse P2 update

Feature / Product setup

P2 will only install features. Make a feature project.

com.example.mail.app Referenced a main plugins

com.example.mail Add org.eclipse.rcp and org.eclipselabs.p2.rcpupdate to

the list of included features

Page 6: Eclipse P2 update

Feature / Product setup

Create a new product mail.product File -> New

-> Plug-in Development -> Product configuration

Open a mail.product Check version number like

‘1.0.0.qualifier’

Page 7: Eclipse P2 update

Feature / Product setup

Add the feature com.example.mail.app Product dependencies and

delete the version number(Properties…)

Create a p2.inf fileinstructions.configure=\ addRepository(type:0,location:file${#58}/c:/export/repository/);\ addRepository(type:1,location:file${#58}/c:/export/repository/);

instructions.configure=\ addRepository(type:0,location:http${#58}//localhost:1234/repository/);\ addRepository(type:1,location:http${#58}//localhost:1234/repository/);* plugin.xml 에 Build tab 에 p2.inf 를 선택합니다 .

Page 8: Eclipse P2 update

Feature / Product setup

Launch the product from the product configuration

Check that the application 여기서는 단지 메뉴가 정상적으로

있는 지만 확인합니다 .( 실제 동작하지 않습니다 )

Page 9: Eclipse P2 update

Feature / Product setup

Export the product File -> Export -> eclipse product

Check Generate metadata repository: 배포결과 eclipse : product

repository : update 모듈

Page 10: Eclipse P2 update

배포

make tomcat project

Page 11: Eclipse P2 update

참고 자료

이 PT 의 자료는 http://www.ralfebert.de/blog/eclipsercp/p2_updates_tutorial_36/를 요약한 것입니다 .