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.
Related
I am using the latest SonarQube 6.2.
They have moved out the reporting module into a commercial governance module.
Now I cannot find any way to export the issues into some report, or filter the issues based on set of classes.
The File filter provided on Issues page, is not providing the full list of files, nor does it have any search option to filter the issues based on a given file name.
My basic need is to filter and view the issues for a given file. Is there any way of doing this?
Use the WS api/issues/search and give the componentKeys parameter
Sonar reports the lines of code iformation for each language on each project's dashboard.
In order to create a report from 70+ projects, we use THE Sonar's REST API. Currently we iterate over all files of a project to retrieve each file's lines of code. Here we run into the limits issue (the result is cut off at 500 entries, there is no paging on the REST API). See SonarQube API result limit, and https://jira.sonarsource.com/browse/SONAR-2920.
Hence the pulled numbers are wrong, and we need to manually fix the report.
Now my question: Is there a way to pull the numbers shown on the project's dashboard through the REST API? Or going to the database? (Sure, not ideal, but I need to solve my problem ;-)
Thanks in advance.
Why do you want to go through each file to compute the projects' lines of code ?
Why not use the api/resources WS ?
documentation
example
HTH
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.
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...
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'.