Install a package in package manger programatically | Community
Skip to main content
pavanb46130733
Level 2
Nov 14, 2017 1:10 PM UTC
Solved

Install a package in package manger programatically

Hi All,

Can anybody tell me how to install a package in crx/packmgr programatically.

Hower i am able to create,build,upload programatically.

I am using org.apache.jackrabbit.vault API(JcrPackageManager (Apache Jackrabbit FileVault 3.1.42 API) ) for creating, building and uploading.

The following is the code for uploading the package,

PackagingService.getPackageManager(session).upload(initialFile, true, true, "afro") ;

--

Regards,

Pavan Bukka

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
joerghoh
joerghohAccepted solution
Employee
Nov 14, 2017 8:46 PM UTC

The packagemanager java API offers exactly the same feature set as the HTTP API. On top it allows proper error/exception handling :-)

Jörg

5 replies

kautuk_sahni
Employee
Nov 15, 2017 9:40 AM UTC
Kautuk Sahni
joerghoh
joerghohAccepted solution
Employee
Nov 14, 2017 8:46 PM UTC

The packagemanager java API offers exactly the same feature set as the HTTP API. On top it allows proper error/exception handling :-)

Jörg

Translate
manoj_devapath
Level 5
Nov 14, 2017 4:56 PM UTC

To install package programatically you can still use JcrPackageManager  JcrPackageManager (Apache Jackrabbit FileVault 3.1.42 API)

extract(Archive archive, ImportOptions options, boolean replace)

but i think you have some limitations using this API. pls look into documentation deeper

this Reference might help you in implementation:

vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageImpl.java - jackrabbit-filevault - Git at …

Thanks

~Manoj

Translate
smacdonald2008
Level 10
Nov 14, 2017 3:48 PM UTC

For those reading this thread and wanting to know how to use the Package Manager API -- see Adobe Experience Manager Help | Creating Adobe Experience Manager Packages using the JcrPackageManager.API .

Translate
Level 2
Nov 14, 2017 3:10 PM UTC