Expand my Community achievements bar.

SOLVED

Install a package in package manger programatically

Avatar

Level 2

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

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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

Jörg

View solution in original post

5 Replies

Avatar

Level 6

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

extract(Archive archive, ImportOptions options, boolean replace)

1348476_pastedImage_1.png

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...

Thanks

~Manoj

Avatar

Correct answer by
Employee Advisor

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

Jörg