How can I load a predefined rule set to a sonar profile - java

i have a local sonar server running. i would like to create a new profile with a set of rules that were predefined by someone else. i have the XML file containing all the rules.
is there a way to upload the XML file to the profile and not define the rules manually?
thanks

Make sure you are logged into Sonar.
Click on Quality Profiles in the top navigation bar, then click on "Restore Profile" on the right hand side under the search bar. Make sure you have all the applicable quality plugins that the export is using or the restore will choke.

May be a bit old thread but worth answering this question with exact steps as I struggled alot with this problem.
Though its a hacky way to import rulebook from prod to your local. But it works and can save valuable time.
Here are the steps:
Login to SonarQube as admin.
Create a new Quality Profile as below:
Download the default xml from local sonarqube by clicking on Backup button. Lets call this file local-rulebook.xml
Open both the prod-rulebook.xml file & local-rulebook.xml in notepad.
Delete the selected part from local-rulebook.xml & replace with the content from prod-rulebook.xml. Save the file.
P.S: Do not change the value of <profile><name>{yourProfileName}</name>.
Go back to sonarQube and Click Restore at top-right corner of the screen.
Import the newly updated file
Change the default profile type.
Congrats you successfully imported the prod-rulebook.xml to your local sonarqube.

Related

How to create a custom excel template for export customized work items for a project in Polarion?

I am trying to create a custom export template for excel export of workitems in my polarion project but every time I upload a template it and when I select that template at the time of exporting it It shows me this error: "Server error: java.lang.NullPointerException".
I tried to even make export template by using existing templates but it still shows me the same error.
To save yourself from trouble, it is easiest to make the template starting from one of the provided templates. Make sure you don't delete the sheet titled "Polarion". In the "Export Work Items" dialog, use the "Show template" link to download an empty template.
In Excel, in the "Polarion" sheet and "Sheet1" sheet, configure your Work Item type and the fields that you want to export. Make sure all fields that you specify actually exist in your Work Item configuration. You may want to make changes step-by-step: make only a small change and test the template to make sure it still works, until you become more confident about the structure.
If you follow the instructions for your version of Polarion, it should work. See "Customize export templates for Microsoft Excel" in the Polarion help. On my system with 22R1, this is the direct help link: http://localhost/polarion/help/topic/com.polarion.xray.doc.user/guide/xid1747724.html?cp=0_3_18_10. The Polarion help for 19.2 is available online: https://docs.plm.automation.siemens.com/content/polarion/19.2/help/en_US/user_and_administration_help/administrators_guide/advanced_administration/customize_export_templates_for_microsoft_excel.html
If you've followed the instructions exactly and it still doesn't work, it's likely that something is wrong with your installation. You'll have to check the logs in C:\Polarion\data\logs\main\ to see what is going wrong.

How do I export my built AEM site with all the content and assets for someone else?

I am quite new to AEM. I am sharing a git repository with another colleague and both of us can pull and push commits. If I change the html for a component, we both will have the code.
My question is: Let's say I created
a page and included copy for it and a couple of images and components. Is there a way for me to export the page I built on my local AEM instance for my colleague to have it or should they build this page as I did step by step? I need to save time.
Thanks in advance
You can use Package Manager for content transfer between instances: https://docs.adobe.com/content/help/en/experience-manager-65/administering/contentmanagement/package-manager.html
You can create a package of your page and the required images and share with others. Packages can be easily created in the crxde. Packages or package manager can be used for multiple purposes like moving content from lower environment to higher, taking a backup of your content and many things.
The Package Manager is likely the solution here. Take into account that for a few pages and assets it is very handy, but it is recommended to create proper filters and exclude assets renditions to reduce the package final size as the site (or testing content) grows.
First, go to this URL "http://localhost:4502/crx/packmgr/index.jsp"
click on Create Package Button in the topbar and enter details and click ok.step1
Now, click on Edit and the filter->Add Filter now click on the search icon and select your page from the project and click ok and then save.step2
now click on Build and now you can download. and you can import this into another project.step3
for more detils go to = https://experienceleague.adobe.com/docs/experience-manager-65/administering/contentmanagement/package-manager.html?lang=en

NetBeans save edited .jar

I am currently using a library for "Notify My Android". The library is using an outdated URL so i tried to change it. I attached the source file and now I can edit the code. Before attaching the source file it just said "compiled code". But when i save it it does not seem to save the changes. It is still using the old URL. Also the change I made is underlined in blue. I hope somebody knows how to make the .jar to accept my changes.
Thanks in advance
it's highly discouraged to modify jars you depend on simply because if you ever want to upgrade versions you'd need to modify the new jar you are looking for.
In those situations you have these options:
if it is an open source project, contribute to the project and correct the URL
try and set the property from your code (this may not be possible in certain situations)
try and extend the class you're trying to use and set the URL on the property you need (like the previous one, it may not be possible to do this)
this should be your last resource: create your own project (from the original jar), make the changes you require, package it up and add it to you app.

Sonarqube, get back the original sonar way

I'm using sonarqube and I've kind of messed up the rules inside the sonar way profile. Is there a way to put it back as it was before ? Like updating the java plugin. Because I don't find the list of rules inside the default "sonar way" profile on the sonarqube web site.
Thanks.
On the profiles page, there's a down-arrow next to the 'Create' menu at the top of the column on the left. It offers two options:
Restore Profile - restore a single, specific profile from a backup file that you'll upload
Restore Built-in Profiles - restore all default profiles for a single, specific language.
You want the latter.

Ignoring large files in IntelliJ file search

We have a large file (9mb) in our SVN project structure. Whenever I Ctrl-Shift-F (find-in-files) in IntelliJ and search, I get the popup "large file encountered" asking me if I want to search within this file.
Is there a way to permanently disable this popup, either globally or for this specific file?
This issue has been addressed in IDEA 9.0, you can try the beta.
Ignored files (if any) now reported in lightweight baloon notification after the search is finished. No way to force scanning though.

Categories

Resources