Hi Guys,
thanks for the response but after some amount of searching I came across this framework called Sardine.
It was very easy to use and did exactly what i wanted.
Sardine sardine = SardineFactory.begin("admin","admin");
byte[] data = FileUtils.readFileToByteArray(new File("/home/test/test-v4tov5/CustomBPMN2-ServiceProcess.bpmn2"));
sardine.put("http://localhost:8080/guvnor/org.drools.guvnor.Guvnor/webdav/packages/defaultPackage/CustomBPMN2-ServiceProcess.bpmn2", data);
it also works for any type of files (images, doc, xml, etc).
A part from the REST API why isn't there a builtin API int he JBPM framework?