How do I create site content from a custom maven plugin? - maven

I would like to generate some Maven site content from a custom Maven 3 plugin. I have not been able to find any documentation on how to go about this.
How should I go about creating the content and adding it to the generate site in a maven-like way?
What facilities does Maven provide to help with site content generation?
Is there any good documentation/examples around to help with this?

See http://docs.codehaus.org/display/MAVENUSER/Write+your+own+report+plugin. Plugins that add site content are called 'reporting plugins'.

Related

How to create a custom component for Joomla 3.3?

I'm new to Joomla and I'm confused, so I need your advice on this. I have to create a plugin which connects to an API and shows base64 PDF on a page. So, I created my PDF viewer, but I don't know how to pack it up in Joomla. It's not just "custom HTML", it has to be a separate package so it can be installed on other Joomla sites. I guess it also has to have a database to store some settings (e.g. API URL). I want users who install this extension to be able to go to Modules > New Module > PDF Viewer, and from there they can set up API URL for that module. Users will be able to create modules of this type on multiple pages and to be able to set different API URL for every page. So, what do I need? An extension, component, module...? I searched for tutorials and read Joomla docs but I'm still confused. Please help me, what to do, some guide, where to put files, where to upload them etc. Thanks
You could actually go about this with a component, plugin or module:
I think a component would be the most complex in this situation. As you are probably already aware, a component is like an application which renders itself in the main click of the website.
If you were to create a plugin, you could generate a short code snippet based on the name of the plugin which could then be added to an article, which would then display the PDF within the article. For example:
{PDFgen=NAME_OF_PDF}
or
{PDF}name_of_file.pdf{/PDF}
Creating a module in my opinion would be the easiest. As once you've added the functionality to render the PDF, the user can either display it as a module (like a sidebar widget), or they can also import it in their article using a built in Joomla feature. Assign a custom position to the module, then add the following anywhere within an article: {loadposition XXX}, where XXX is the name of the custom position you assigned to the module.
Out of all honest, you should develop it in a way you feel most comfortable with. Just make sure when you do it, that you stick to Joomla coding standards.
Hope this helps

Jenkins UI customization

I want to change the look and feel(ui customization) of Jenkins. Also I would like to add new views(say like new html pages or web pages) with navigation to the required jenkins pages etc.
Please let me know if any single plugins will help me to do so.Any relevant information(how ever generic) will be very helpful.
Any suggestions or links or tutorials is also appreciated.
PS:- Pretty new to jenkins.The inputs from here will help me to add more details to the questions.
I am looking for documents or tutorials that specify Skinning Jenkins using plugins like :-
https://wiki.jenkins-ci.org/display/JENKINS/Simple+Theme+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/jQuery+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/jQuery+UI+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/JSWidgets+Plugin
The plugin page is providing very little information on how to use these and the benefits and the extend to which the UI can be changed.
Any doc or link is appreciated.
Assuming you don't want to write a Jenkins plugin, for adding pages, the best suggestion I can make is to use an HTTP proxy such as NginX, and configure it so that the pages you want to add are plain html files, and Jenkins is proxied for the rest of them. To a visitor, they will look like they are all part of the same site; you could copy code from the head and body sections of Jenkins-served pages to include some of the navigation.
The Simple Theme Plugin, which you found, will let you do basic customization of the look and feel of Jenkins. I do that for my build server and proxy it using this configuration fragment for NginX. The relevant CSS is in this CSS file - toward the end, look for the // JENKINS CUSTOMIZATION comment.
We use the Simple theme plugin - pointed at a css file for the simple styling, and a JS file to fix a couple of DOM oddities (some of the tables in the new look and feel have mismatching column counts).
Those two files need only be hosted either a handy http server, or you can place them in usercontent.
You need only refresh the page in the browser to see the changes. Both files can then happily reference other files served up too.
Handy things to note:
Jenkins has jquery, parts of YUI loaded and prototype loaded - so you can use them in your scripts.
If while debugging, the refresh gets in the way then use the console to enter the following to temporarily stop it without pausing JS: refreshPart = function() {}
When making DOM tree changes to content that is refreshed - attach it to the layout updates with:
layoutUpdatecallback.add(my_function) - that way your changes are applied to new incoming content.

does anyone have a sample pom and settings file used to site-deploy to confluence?

I'm trying to use a Maven build to deploy to Confluence site using XML-RPC.
I'm having trouble finding the right protocol to use in distribution management. It is password protected.
Use one or both of the following:
Proxy Configuration
Maven Server Authentication
I don't think it's a good idea. Maven Site does not fit so well for Confluence: they have a specific layout... you should customize a lot of things in order to create a site that could be uploaded to Confluence, and the deployment is only the tip of an iceberg.
Instead, I suggest you to think to a different content, written in Markdown (or asciidoc, ...). It's very easy to convert those type of content in HTML compatible with Confluence.
By the way, if you need to upload a maven site style I suggest you to take a look at maven-confluence-plugin: in the wiki pages you can find the configuration to apply to do what you need.
I'm working on a similar plugin too. It's called confluence-maven-plugin. However the phylosophy of my plugin is not to be able to upload site, but to upload simple Markdown documentation to a confluence, guided mainly by a README.md as you probably do when you work with Github/BitBucket/etc...

Sonar (software quality) - extending sonar (controllers and views)

I have been fiddling with SONAR for some time now, and I would like to extend it to some point. I don't think I will be able to achieve this with a custom plugin but if I would introduce an additional controller and some views - it would get the job done.
Now as I understand, MVC model in sonar is written in RUBY, and I have yet to do research on ruby coding, but before I get to that - is my goal reasonable/achievable ?
Or can additional views and controllers can be added via plugin extensions ?
Basically I just need certain information gathered from sonar DataBase about the project, and displayed in a custom view for additional statistics.
Thanks.
P.S. I have hard time finding information for sonar development, maybe someone could recommend some forums discussing sonar extension topics ?
It is not possible yet to add Ruby controllers and views at the same time through a Sonar plugin. Currently, when extending Sonar Web interface, you can only:
Add a Ruby widget (that will be displayed on a dashboard): this is only a view
Add a Ruby web service API: this is only a controller
Add a GWT extension: here you can define a controller and a view
However, please note that we will drop GWT support in the future, and replace it with the possibility to define extension points that allow to write both controllers and views in Ruby.
So to answer your need, I would advise you to write a widget, like the ones you can see on Sonar source code here: https://github.com/SonarSource/sonar/tree/master/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets
HTH

Resource Filtering with Maven Site Plugin

I'm using the maven site plugin to create and deploy a site of documentation and resources. There are some javascript files that I would like to filter based on what profile is being used. Problem is, I can't figure out how to get the filtering to work. Has anyone come across this?
I'm using Maven 3 and my resources are all in /src/site/resources which automagically get copied to /target/site by the site plugin.
Thanks!
The simplest solution is to name the files you would like to filter as: filename.vm which identifies them as velocity macro files which will be filtered automatically.

Resources