Enviar búsqueda
Cargar
Discovering the p2 API
•
Descargar como PPTX, PDF
•
9 recomendaciones
•
2,981 vistas
Pascal Rapicault
Seguir
This presentation goes over the main concepts of the p2 API and provide some
Leer menos
Leer más
Tecnología
Denunciar
Compartir
Denunciar
Compartir
1 de 25
Descargar ahora
Recomendados
Understanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profit
Pascal Rapicault
Do's and Do not's about p2
Do's and Do not's about p2
Pascal Rapicault
Managing Your Runtime With P2
Managing Your Runtime With P2
Pascal Rapicault
p2, modular provisioning for OSGi
p2, modular provisioning for OSGi
Pascal Rapicault
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
Ralf Sternberg
P2 Introduction
P2 Introduction
irbull
L0016 - The Structure of an Eclipse Plug-in
L0016 - The Structure of an Eclipse Plug-in
Tonny Madsen
Building Eclipse Plugins
Building Eclipse Plugins
Liran Zelkha
Recomendados
Understanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profit
Pascal Rapicault
Do's and Do not's about p2
Do's and Do not's about p2
Pascal Rapicault
Managing Your Runtime With P2
Managing Your Runtime With P2
Pascal Rapicault
p2, modular provisioning for OSGi
p2, modular provisioning for OSGi
Pascal Rapicault
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
Ralf Sternberg
P2 Introduction
P2 Introduction
irbull
L0016 - The Structure of an Eclipse Plug-in
L0016 - The Structure of an Eclipse Plug-in
Tonny Madsen
Building Eclipse Plugins
Building Eclipse Plugins
Liran Zelkha
Tycho - Building plug-ins with Maven
Tycho - Building plug-ins with Maven
Pascal Rapicault
Eclipse plug in development
Eclipse plug in development
Martin Toshev
Tycho Tutorial EclipseCon 2013
Tycho Tutorial EclipseCon 2013
jsievers
Sleep Peacefully as Maven Tycho Builds your Product
Sleep Peacefully as Maven Tycho Builds your Product
Subramanyam C
PDE Good Practices
PDE Good Practices
Ankur Sharma
PDE builds or Maven
PDE builds or Maven
Eclipse Day India
Concierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded Devices
Jan S. Rellermeyer
Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAP
Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAP
Ralf Sternberg
Maven 3 / Tycho
Maven 3 / Tycho
Karsten Thoms
Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)
jsievers
Single Sourcing RCP and RAP
Single Sourcing RCP and RAP
Chris Aniszczyk
OSGi, Eclipse and API Tooling
OSGi, Eclipse and API Tooling
Chris Aniszczyk
Lua on Steroids - EclipseCon NA 2012
Lua on Steroids - EclipseCon NA 2012
Benjamin Cabé
Mobile Development integration tests
Mobile Development integration tests
Kenneth Poon
Managing Change
Managing Change
Mirko Jahn
Migrating from PDE to Tycho builds
Migrating from PDE to Tycho builds
Teodor Madan
Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2
Sergii Shymko
Building framework with shared code on Android and iOS using React Native. UA...
Building framework with shared code on Android and iOS using React Native. UA...
UA Mobile
Os Grossupdated
Os Grossupdated
oscon2007
Java Programming (M&M)
Java Programming (M&M)
mafffffe19
Discovery the p2 API (updated to Indigo)
Discovery the p2 API (updated to Indigo)
Pascal Rapicault
Open stack nova reverse engineer
Open stack nova reverse engineer
Vietnam Open Infrastructure User Group
Más contenido relacionado
La actualidad más candente
Tycho - Building plug-ins with Maven
Tycho - Building plug-ins with Maven
Pascal Rapicault
Eclipse plug in development
Eclipse plug in development
Martin Toshev
Tycho Tutorial EclipseCon 2013
Tycho Tutorial EclipseCon 2013
jsievers
Sleep Peacefully as Maven Tycho Builds your Product
Sleep Peacefully as Maven Tycho Builds your Product
Subramanyam C
PDE Good Practices
PDE Good Practices
Ankur Sharma
PDE builds or Maven
PDE builds or Maven
Eclipse Day India
Concierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded Devices
Jan S. Rellermeyer
Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAP
Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAP
Ralf Sternberg
Maven 3 / Tycho
Maven 3 / Tycho
Karsten Thoms
Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)
jsievers
Single Sourcing RCP and RAP
Single Sourcing RCP and RAP
Chris Aniszczyk
OSGi, Eclipse and API Tooling
OSGi, Eclipse and API Tooling
Chris Aniszczyk
Lua on Steroids - EclipseCon NA 2012
Lua on Steroids - EclipseCon NA 2012
Benjamin Cabé
Mobile Development integration tests
Mobile Development integration tests
Kenneth Poon
Managing Change
Managing Change
Mirko Jahn
Migrating from PDE to Tycho builds
Migrating from PDE to Tycho builds
Teodor Madan
Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2
Sergii Shymko
Building framework with shared code on Android and iOS using React Native. UA...
Building framework with shared code on Android and iOS using React Native. UA...
UA Mobile
Os Grossupdated
Os Grossupdated
oscon2007
Java Programming (M&M)
Java Programming (M&M)
mafffffe19
La actualidad más candente
(20)
Tycho - Building plug-ins with Maven
Tycho - Building plug-ins with Maven
Eclipse plug in development
Eclipse plug in development
Tycho Tutorial EclipseCon 2013
Tycho Tutorial EclipseCon 2013
Sleep Peacefully as Maven Tycho Builds your Product
Sleep Peacefully as Maven Tycho Builds your Product
PDE Good Practices
PDE Good Practices
PDE builds or Maven
PDE builds or Maven
Concierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded Devices
Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAP
Eclipse in Telemedicine and Health Care - A Success Story with RCP and RAP
Maven 3 / Tycho
Maven 3 / Tycho
Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)
Single Sourcing RCP and RAP
Single Sourcing RCP and RAP
OSGi, Eclipse and API Tooling
OSGi, Eclipse and API Tooling
Lua on Steroids - EclipseCon NA 2012
Lua on Steroids - EclipseCon NA 2012
Mobile Development integration tests
Mobile Development integration tests
Managing Change
Managing Change
Migrating from PDE to Tycho builds
Migrating from PDE to Tycho builds
Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2
Building framework with shared code on Android and iOS using React Native. UA...
Building framework with shared code on Android and iOS using React Native. UA...
Os Grossupdated
Os Grossupdated
Java Programming (M&M)
Java Programming (M&M)
Similar a Discovering the p2 API
Discovery the p2 API (updated to Indigo)
Discovery the p2 API (updated to Indigo)
Pascal Rapicault
Open stack nova reverse engineer
Open stack nova reverse engineer
Vietnam Open Infrastructure User Group
Orion RESTful git API
Orion RESTful git API
Tomasz Zarna
What's new in p2 (2009)?
What's new in p2 (2009)?
Pascal Rapicault
ABC of Platform Workspace
ABC of Platform Workspace
Tomasz Zarna
Ubuntu Core 技术详解
Ubuntu Core 技术详解
Rex Tsai
Riena on-e4-ese2010
Riena on-e4-ese2010
christiancampo
Eclipse 3.7 : Tips and tricks
Eclipse 3.7 : Tips and tricks
Tomasz Zarna
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
WSO2
stackconf 2022: It’s Time to Debloat the Cloud with Unikraft
stackconf 2022: It’s Time to Debloat the Cloud with Unikraft
NETWAYS
Building Eclipse Plugins with Tycho
Building Eclipse Plugins with Tycho
jsievers
What Big Data Folks Need to Know About DevOps
What Big Data Folks Need to Know About DevOps
Matt Ray
한국통신학회 워크샵: SDN/NFV for Secure Services - Understanding Open Source SDN Contr...
한국통신학회 워크샵: SDN/NFV for Secure Services - Understanding Open Source SDN Contr...
Ian Choi
Webapps development on ubuntu
Webapps development on ubuntu
Xiaoguo Liu
Introduction to compose camps.pdf
Introduction to compose camps.pdf
AnkurAgarwal151093
CoreOS @ gluecon 2015
CoreOS @ gluecon 2015
ifup
Kolla - containerizing the cloud itself
Kolla - containerizing the cloud itself
Michal Rostecki
Kubernetes 101 - A Cluster Operating System
Kubernetes 101 - A Cluster Operating System
mikaelbarbero
How to Build & Use OpenCL on OpenCV & Android NDK
How to Build & Use OpenCL on OpenCV & Android NDK
Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院)
Isn’t it Ironic that a Redfish is software defining you
Isn’t it Ironic that a Redfish is software defining you
Bruno Cornec
Similar a Discovering the p2 API
(20)
Discovery the p2 API (updated to Indigo)
Discovery the p2 API (updated to Indigo)
Open stack nova reverse engineer
Open stack nova reverse engineer
Orion RESTful git API
Orion RESTful git API
What's new in p2 (2009)?
What's new in p2 (2009)?
ABC of Platform Workspace
ABC of Platform Workspace
Ubuntu Core 技术详解
Ubuntu Core 技术详解
Riena on-e4-ese2010
Riena on-e4-ese2010
Eclipse 3.7 : Tips and tricks
Eclipse 3.7 : Tips and tricks
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
stackconf 2022: It’s Time to Debloat the Cloud with Unikraft
stackconf 2022: It’s Time to Debloat the Cloud with Unikraft
Building Eclipse Plugins with Tycho
Building Eclipse Plugins with Tycho
What Big Data Folks Need to Know About DevOps
What Big Data Folks Need to Know About DevOps
한국통신학회 워크샵: SDN/NFV for Secure Services - Understanding Open Source SDN Contr...
한국통신학회 워크샵: SDN/NFV for Secure Services - Understanding Open Source SDN Contr...
Webapps development on ubuntu
Webapps development on ubuntu
Introduction to compose camps.pdf
Introduction to compose camps.pdf
CoreOS @ gluecon 2015
CoreOS @ gluecon 2015
Kolla - containerizing the cloud itself
Kolla - containerizing the cloud itself
Kubernetes 101 - A Cluster Operating System
Kubernetes 101 - A Cluster Operating System
How to Build & Use OpenCL on OpenCV & Android NDK
How to Build & Use OpenCL on OpenCV & Android NDK
Isn’t it Ironic that a Redfish is software defining you
Isn’t it Ironic that a Redfish is software defining you
Último
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Mark Simos
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Addepto
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
charlottematthew16
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
Fwdays
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
Fwdays
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
NavinnSomaal
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
charlottematthew16
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Lonnie McRorey
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
comworks
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Kalema Edgar
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Scott Keck-Warren
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Miki Katsuragi
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Fwdays
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
LoriGlavin3
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
Lorenzo Miniero
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
gvaughan
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
Sergiu Bodiu
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
RankYa
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Mark Billinghurst
Último
(20)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Discovering the p2 API
1.
Discovering the p2
API Pascal Rapicault Sonatype, p2 Lead © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 1
2.
Who are the
p2 committers? © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 2
3.
History 3.4 /
3.5 provisional API 3.6 / Helios is the first official release of the API © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 3
4.
3 levels of
API Graphical User Interface Headless Operations Core APIs + SPIs © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 4
5.
Graphical User Interface
GUI is SWT-based and designed to be reused in RCP / Eclipse applications. Ease of reuse: Add the p2.ui.sdk bundle, done (if you use IDE) . Add the p2.ui bundle, write a few extensions, done. org.eclipse.equinox.p2.ui org.eclipse.equinox.p2.ui.sdk © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 5
6.
Graphical User Interface
© Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 6
7.
Reusing individual UI
elements Most the pages / wizards can be reused Installed dialog Repository management License manager Install/Update/Uninstall wizard o.e.e.p2.ui.InstalledSoftwarePage o.e.e.p2.ui.RepositoryManipulationPage o.e.e.p2.ui.AcceptLicensesWizardPage o.e.e.p2.ui.ProvisioningUtil#open*Wizard org.eclipse.equinox.p2.ui © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 7
8.
Tweaking the existing
UI The Policy class Show / hide repository selection Drill down Show categories Content of the restart dialog … org.eclipse.equinox.p2.ui.Policy org.eclipse.equinox.p2.ui © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 8
9.
Tweaking the existing
UI © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 9
10.
More on UI
reuse See examples on the p2 wiki http://wiki.eclipse.org/Equinox/p2/Examples Susan’s and Steffen’s talk http://www.eclipsecon.org/2010/sessions/?page=sessions&id=1205 © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 10
11.
3 levels of
API Graphical User Interface Headless Operations Core APIs + SPIs © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 11
12.
Headless operations High
level operations to install / update / uninstall Focused on the Eclipse / OSGi use cases Encapsulates: Dependency resolution Download Modification of the system Restart org.eclipse.equinox.p2.operations org.eclipse.equinox.p2.operations © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 12
13.
Headless operations example
InstallOperation op = newInstallOperation(session, iusToInstall); if (op.resolveModal(newNullProgressMonitor()).isOK()) op.getProvisioningJob(newNullProgressMonitor()).schedule(); © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 13
14.
3 levels of
API Graphical User Interface Headless Operations Core APIs + SPIs © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 14
15.
Core concepts installable
unit/metadata query/ queryable planner repository agent engine profile registry/ profile © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 15
16.
Repositories p2 Update
Site Engine Eclipse/OSGi Native/OS Core concepts Metadata repo Artifact repo Data transfer Metadata fetched and constraints analyzed Transports Planner/Director Http/Https File system Volume Mirroring Provisioning operation requested IU install, uninstall, update operations Artifact availability and mirroring IUs configured into runtimes Profile updated Profile registry Runtimes © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 16
17.
How do I
get an IU? IUs can be obtained from Querying the metadata repository Querying the profile Querying … Programmatically created org.eclipse.equinox.p2.metadata.MetadataFactory org.eclipse.equinox.p2.metadata © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 17
18.
Queries / QueryableHow
do I query? What is queryable? Almost everything is queryable (repository, repository manager, profile, …) How do I create a query? QueryUtil.create* Domain specific queries (e.g. in eclipse.touchpoint) p2 QL, p2-specific query language http://wiki.eclipse.org/Query_Language_for_p2 org.eclipse.equinox.p2.query.IQueryable org.eclipse.equinox.p2.query.QueryUtil org.eclipse.equinox.p2.metadata org.eclipse.equinox.p2.ql © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 18
19.
The repository managerHow
do I get a repository? Artifact / metadata repository manager Addition / removal of repositories Enable / disable repositories Load Artifact / metadata repository Add Remove Query org.eclipse.equinox.p2.repository.IMetadataRepository org.eclipse.equinox.p2.repository.IArtifactRepository o.e.e.p2.repository.IMetadataRepositoryManager o.e.e.p2.repository.IArtifactRepositoryManager org.eclipse.equinox.p2.repository © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 19
20.
Provisioning agentHow do
I get a repository manager or p2 components? The agent groups related services together It is the starting point of everything. It is the executable version of the p2 area (e.g the p2 folder in the eclipse install) Several agents can run at once in one VM. Groups the services together. Allows to change some services (see implementations of IAgentServiceFactory) If you are only dealing with the running instance: Obtain the IProvisioningAgent service from the OSGi registry Create it using the IProvisioningContext#createAgent(null) org.eclipse.equinox.p2.core.IProvisioningAgent org.eclipse.equinox.p2.core.IProvisioningAgentProvider org.eclipse.equinox.p2.core © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 20
21.
Profile / profile
registryHow do I know what is installed? A profile is the complete description in terms of IUs of what is installed. The profile registry knows about all the profiles in a given p2 area org.eclipse.equinox.p2.engine.IProfile org.eclipse.equinox.p2.engine.IProfileRegistry org.eclipse.equinox.p2.engine org.eclipse.equinox.p2.engine © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 21
22.
What is not
API? Repository serialized format Layout of files on disk under the p2 folder © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 22
23.
Summary 3 levels
of API tailored for different needs Simple things should be simple Complex things should be possible This API is for YOU! Tell us what you think. © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 23
24.
Thank you mailto:p2-dev@eclipse.org
http://wiki.eclipse.org/Equinox/p2 © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 24
25.
Code snippet to
install © Sonatype, inc. All right reserved. Made available under Creative Commons Att. Nc Nd 2.5.license 25 ProvisioningSession session = null; //get the agent ServiceReferencesr = Activator.sContext.getServiceReference(IProvisioningAgentProvider.SERVICE_NAME); IProvisioningAgentProvideragentProvider = null; if (sr == null) return; agentProvider = (IProvisioningAgentProvider) Activator.sContext.getService(sr); IProvisioningAgent agent = agentProvider.createAgent(new URI("file:/Applications/eclipse63/p2")); //get the repo managers IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME); IArtifactRepositoryManagerartifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME); //Loading reppos IMetadataRepositorymetadataRepo = manager.loadRepository(newURI("file:/Users/Pascal/tmp/demo/"), new NullProgressMonitor()); IArtifactRepositoryartifactRepo = artifactManager.loadRepository(newURI("file:/Users/Pascal/tmp/demo/"), new NullProgressMonitor()); //Querying Collection toInstall = metadataRepo.query(QueryUtil.createIUQuery("org.eclipse.equinox.p2.demo.feature.group"), new NullProgressMonitor()).toUnmodifiableSet(); InstallOperationinstallOperation = new InstallOperation(session, toInstall); if (installOperation.resolveModal(newNullProgressMonitor()).isOK()) installOperation.getProvisioningJob(newNullProgressMonitor()).schedule(); agent.close()
Descargar ahora