How to build a plugin?

Hello, guide is not clear at all…I’m trying to develop a simple “hello client” plugin and I created my plugin class and my plugin.xml file so…how to make the final jar? Guide says “The Openfire build script will help you build and develop plugins” but the question is…

“how to use a build script and where is it?”

And I have another question: how come inside already existing plugin’s jar I cannot find the .class files? Where do openfire take the code?

Thanks much in advance…I’m getting crazy

Hi,

you may want to read Openfire SVN + Eclipse 3.3 + Subversive Installation Guide or Openfire .tar.gz + Eclipse 3.1 Installation Guide and setup Openfire within an IDE like NetBeans or Eclipse, then it is very easy to use the build script.

LG

Problem is that I don’t have a very good connection atm and, if possible, I’d like to avoid downloading the entire openfire source…

Hello,

You might also want to look at the this blog post:

http://www.igniterealtime.org/community/blogs/ignite/2007/01/16/so-you-want-to-w rite-a-plugin/

and this document:

http://www.igniterealtime.org/support/articles/motd_plugin.jsp

You’ll really need/want to have the source for the ant build files and to see how the other plugins are put together.

Hope that helps,

Ryan

Ok, I dowloaded the sources following the guide (it was morning so I made myself a caffe-latte too XD) but…project has some errors inside! Is it normal?

Debug stops too because of the errors…by the way ant build was successful so sources should be alright…

In the debug window I got an

URLClassLoader$1.run() line: not available

Source not found

Ok I solved this and I’d suggest to upload the guide:

best thing is to download, from “tag”, the latest stable openfire source (atm 3.6.4) this way everything works!

Ok, now I have a question for you ryan…I tried your Motd plugin with a sparkweb client but it just does not seem working…when client connects no message is sent to it! I left default values for subject and body…where is the problem?

Solved…I forgot to enable the plugin lol

If you have experience in Maven you can use this plugin - http://maven.reucon.com/projects/public/maven-openfire-plugin/1.0.1/. We’ve used it for about 5 plugins so far and I think it makes things nice and easy.