Thanks for all the replies.<br><br>Ass suggested, we used <b>OpenCms.getPublishManager().publishResource(cms, "/path/to/resource")</b> and this works fine !<br><br>best regards,<br>Yves<br><br><div class="gmail_quote">

On 20 September 2012 01:25, Steve Bryan <span dir="ltr"><<a href="mailto:steve.bryan@shinetech.com" target="_blank">steve.bryan@shinetech.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>Yves</div><div><br></div>Try using OpenCms.getPublishManager() to get the CmsPublishManager.<div><br></div><div>Steve<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<br>
Date: Wed, 19 Sep <a href="tel:2012%2010" value="+352201210" target="_blank">2012 10</a>:59:11 +0200<br>
From: Yves Glodt <<a href="mailto:yg@mind.lu" target="_blank">yg@mind.lu</a>><br>
To: The OpenCms mailing list <<a href="mailto:opencms-dev@opencms.org" target="_blank">opencms-dev@opencms.org</a>><br>
Subject: [opencms-dev] Use of CmsPublishManager in OpenCms 8<br>
Message-ID:<br>
        <<a href="mailto:CAAPhX7cbEkMn6YKHwKNXx_Jb-CMa6Da8JNWQQLQFubuhgTcJ6g@mail.gmail.com" target="_blank">CAAPhX7cbEkMn6YKHwKNXx_Jb-CMa6Da8JNWQQLQFubuhgTcJ6g@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<div class="im"><br>
<br>
Hello,<br>
<br>
In OpenCms 8 there is no longer CmsObject.publishResource(). So I tried to<br>
use the CmsPublishManager, but it does not work as expected.<br>
<br>
Here is my code:<br>
<br>
CmsObject cms = OpenCms.initCmsObject("Guest");<br>
cms.loginUser("user", "password");<br>
CmsProject project = cms.readProject("Offline");<br>
cms.getRequestContext().setCurrentProject(project);<br>
cms.getRequestContext().setSiteRoot("/sites/<a href="http://mysite.lu/" target="_blank">mysite.lu/</a>");<br>
<br>
CmsPublishManager cmsPublish = new CmsPublishManager();<br>
cmsPublish.initialize(cms);<br>
cmsPublish.publishResource(cms,"/images/articles/"+no_article);<br>
<br>
What's wrong with it?<br>
<br>
Best regards,<br>
Yves<br></div></blockquote></div>
</div>
<br>_______________________________________________<br>
This mail is sent to you from the opencms-dev mailing list<br>
To change your list options, or to unsubscribe from the list, please visit<br>
<a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev" target="_blank">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><br>
<br>
<br>
<br>
<br></blockquote></div><br>