Build package programmatically | Community
Skip to main content
ronnyfm
New Participant
January 2, 2017
Solved

Build package programmatically

  • January 2, 2017
  • 11 replies
  • 9985 views

Hello,

I am able to assemble a package using the JcrPackageManager assemble method, however in the package manager I get the package definition and the filters, but the package itself needs to be built. I am sure there should be a way, since it is possible via the HTTP interface using curl.

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ronnyfm

Found the issue, I was calling:

assemble(JcrPackageDefinition definition, ProgressTrackerListener listener, java.io.OutputStream out)

But that writes the file to the output stream requiring therefore an additional build step. The solution was to invoke:

assemble(JcrPackage pack, ProgressTrackerListener listener)

Thanks all for your time.

11 replies

smacdonald2008
New Participant
January 2, 2017

Looking at the Javadoc - it does not appear that there is a method of to build -- 

https://docs.adobe.com/docs/en/cq/5-5/javadoc/com/day/jcr/vault/packaging/JcrPackageManager.html