Expand my Community achievements bar.

Export LCA programmatically

Avatar

Level 3

Hi there, is there any way to export LCA via java api?

I have tried this:

ApplicationManager appManager = new ApplicationManager(myFactory);

       

        try {

            List<Application> applications = appManager.getApplications();

            ApplicationId applicationId = applications.get(0).getApplicationId();

           

            ApplicationDocument appDoc = ApplicationDocument.Factory.parse(new File("D:\\MyApplication\\app.info"));

            exportApplicationArchive = appManager.exportApplicationArchive(appDoc);

but somehow the exported LCA only contain the app.info.

Is it a bug in the api or something wrong in my code?

4 Replies

Avatar

Former Community Member

I would be interested to see the answer to this as well.

Avatar

Level 1

Was anyone able to find the answer to this question.  I am looking to start using this feature and am finding the documentation a bit sketchy as well.

Avatar

Level 3

Hi Matt, you can use repos api in lc to export each asset, then generate

the app.info xml. If you are using es2, then you need to make sure that the

order you add to the lca zip is the order that is in the app.info.xml.

Avatar

Level 1

Thanks.  I see the repository API now, but am a bit fuzzy on how I generate the app.info file.  I could certainly generate it by hand, but am hoping there's something that I can leverage that already does this.