Plugin project structure

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Plugin project structure

Zeljko Kovacevic
This post has NOT been accepted by the mailing list yet.
Is there some hippo archetype, which can be used to create standard folder structure for plugin project?
Reply | Threaded
Open this post in threaded view
|

Re: Plugin project structure

Arje Cahn
Administrator
Hey Zejko,

> Is there some hippo archetype, which can be used to create standard folder
> structure for plugin project?

No, but you could take a look at
http://forge.onehippo.org/projects/rating-field/
And use the sample code provided with it as a starting point.

HTH,

Arje
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/community.html
Reply | Threaded
Open this post in threaded view
|

Re: Plugin project structure

Zeljko Kovacevic
This post has NOT been accepted by the mailing list yet.
Hi Arje,
Thanks for your answer.
We checked several plugins last week, regarding structure and dependencies.
In my opinion, having in mind current plugin structure there is missing part, which is pretty important. Most of the plugins have some presentation on the site, some content on the page. At the moment that presentation part of the plugin which will be used in the site project, is missing. Plugin I am working on at the moment, has:
 -cms part (frontend-namespace.xml and hippoecm-extension.xml, wicket specific classes, etc)  
 -site part (some utility classes, which will  be used in BaseHstComponent and jsp tag which will render plugin specific content on the page).

Therefore, appropriate structure for the plugin in my case will be:
---mypluggin
   ---myplugin-cms
   ---myplugin-site
---pom.xml

The rest should be easy:
1. Add referenced dependencies into CMS and Site projects, regarding plugin (Cms project will have dependency to myplugin-cms.jar, similar goes for site)
2. Some minor adjustments in the code must be done  like: include JSP tag on the page, use this utility classes provided to grab plugin specific data,... (Some readme.txt to describe details should be fine.)

In our case this works perfectly. We are discussing to make maven archetype, having in mind structure and dependencies defined above.
This is the idea. Is this good approach? What is your opinion?

Regards,
Zeljko

Reply | Threaded
Open this post in threaded view
|

Re: Plugin project structure

Arje Cahn
Administrator
Hry Zeljko,

> Most of the plugins have some presentation
> on the site, some content on the page.

Yup - I agree :)
Not all of them, but probably a lot!

> We are discussing to make maven archetype,
> having in mind structure and dependencies defined above.

If you're setting up an archetype, then please send it to the list so
we can all benefit from your work. Would love to see more
contributions from folks like yourself!

Arje
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/community.html
Reply | Threaded
Open this post in threaded view
|

Re: Plugin project structure

Zeljko Kovacevic
This post has NOT been accepted by the mailing list yet.
Hi Arje,
Glad that you like the idea :). I expect to have first version of archetype, in next few weeks.

Zeljko


Arje Cahn wrote
Hry Zeljko,

> Most of the plugins have some presentation
> on the site, some content on the page.

Yup - I agree :)
Not all of them, but probably a lot!

> We are discussing to make maven archetype,
> having in mind structure and dependencies defined above.

If you're setting up an archetype, then please send it to the list so
we can all benefit from your work. Would love to see more
contributions from folks like yourself!

Arje
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/community.html