[opencms-dev] Problem publishing a specific list of resources

Jasper Roel jroel at salesforce.com
Tue Sep 1 20:02:40 CEST 2009

I've been trying to get OpenCms to publish only a specific subset of resources in OpenCms. This is a mix of new folders, new files, modified resources and deleted resources.

This code is run via the Administration panel through a newly created Module.

The code extract looks something like this;

 // This list gets populated before creating the CmsPublishList
 List<CmsResource> resourcesToPublish = new ArrayList<CmsResource>();

// Only publish what we actually touched
boolean publishSiblings = false;
boolean publishSubResources = false;

CmsPublishList publishList = OpenCms.getPublishManager().getPublishList(cms, resourcesToPublish, publishSiblings, publishSubResources);

OpenCms.getPublishManager().publishProject(cms, report, publishList);

A short example of the result of this code is attached. All the resources with status N & U (New and Updated) are added to the resourcesToPublish List, but the publishProject publishes none of them (see ImportLog.htm for the result).

Any idea why OpenCms decides not to publish my resources, or is there a better way to publish these specific resources programmaticly?


Jasper Roel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20090901/b005ea16/attachment.htm>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20090901/b005ea16/attachment-0001.htm>

More information about the opencms-dev mailing list