SonarLint plugin IntelliJ with no authentication - authentication

Is it possible to connect to a remote SonarQube 5.6.1 server using the SonarLint 3.0.0 plugin for IntelliJ 2017.1 without using authentication by default? Currently the plugin seems to want either username/password OR token

There is a hack which you can use:
Normally sonarLint stores the information in your IntelliJConfiguration-directory in config/options/sonarlint.xml - you can simply paste following configuration into that file:
<application>
<component name="SonarLintGlobalSettings">
<option name="sonarQubeServers">
<list>
<SonarQubeServer>
<option name="hostUrl" value="<your-server-url>" />
<option name="name" value="test" />
<option name="login" value="" />
<password />
<organizationKey />
</SonarQubeServer>
</list>
</option>
</component>
</application>
which is the basic configuration for a server without authentication.
// EDIT: It seems like this was an intended change by sonarSource to sonarLint - https://groups.google.com/forum/#!topic/sonarlint/xnpQmXN8NEo - is the mailing list discussion about this

Related

Multi-App Kiosk mode provisioning failure code '0xC00CE223'

I'm trying to put in place a kiosk on a Surface Go using the following AssignedAccess.xml file in my provisioning package:
<?xml version="1.0" encoding="utf-8" ?>
<AssignedAccessConfiguration
xmlns="https://schemas.microsoft.com/AssignedAccess/2017/config"
xmlns:r1809="https://schemas.microsoft.com/AssignedAccess/201810/config"
>
<Profiles>
<Profile Id="{f46cfb9f-044f-4d96-bb33-ea1c1c18a354}">
<AllAppsList>
<AllowedApps>
<App AppUserModelId="Microsoft.Windows.Explorer" r1809:AutoLaunch="true" />
<App AppUserModelId="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
<App DesktopAppPath="C:\Program Files\SumatraPDF\SumatraPDF.exe" />
</AllowedApps>
</AllAppsList>
<r1809:FileExplorerNamespaceRestrictions>
<r1809:AllowedNamespace Name="Downloads" />
</r1809:FileExplorerNamespaceRestrictions>
<StartLayout>
<![CDATA[<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
<LayoutOptions StartTileGroupCellWidth="6" />
<DefaultLayoutOverride>
<StartLayoutCollection>
<defaultlayout:StartLayout GroupCellWidth="6">
<start:Group Name="Apps">
<start:Tile Size="4x2" Column="0" Row="2" AppUserModelID="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\SumatraPDF.lnk" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\File Explorer.lnk" />
</start:Group>
</defaultlayout:StartLayout>
</StartLayoutCollection>
</DefaultLayoutOverride>
</LayoutModificationTemplate>
]]>
</StartLayout>
<Taskbar ShowTaskbar="false" />
</Profile>
</Profiles>
<Configs>
<Config>
<Account>CouncilKiosk</Account>
<DefaultProfile Id="{f46cfb9f-044f-4d96-bb33-ea1c1c18a354}"/>
</Config>
</Configs>
</AssignedAccessConfiguration>
I took a look at the logs and the consensus seems to be this error code '0xC00CE223'. According to my research this is telling me that "Validate failed because the document does not contain exactly one root node." (XML DOM Error Messages Doc) I'm not sure where this is going wrong.
The provisioning package is also setting 2 user accounts (local admin and local user), hiding OOBE, enabling tablet mode as default, and running a provisioning command script that installs a single application and sets registry keys necessary for autologin.
UPDATE: I re-imaged the Surface Go with Windows 10 Pro and it still fails. But now I get an error '0x8000FFFF' which appears to be related to windows update and the windows store. I only have 1 USB port on this thing so it isn't connected to the internet at this time.
UPDATE 2: I re-imaged with a more up to date ISO of 10 Pro and I'm back to the original errors listed in the above post. I have updated the XML file and changed the tag as well as the xmlns from rs5 to r1809. I am not seeing any changes and this continues to be a frustrating problem to have.
Test to change this:
https://schemas.microsoft.com/AssignedAccess/2017/config
to the following:
http://schemas.microsoft.com/AssignedAccess/2017/config

How to prevent Idea Intellij to change MODULE_DIR in IML files?

Using Intellij Ultimate 2020.2, in a multi-module Maven project, my IML files use the MODULE_PATH variable, like this:
<component ...>
<option name="directories">
<list>
<option value="$MODULE_DIR$/src/main/java" />
But when I refresh (switch branch, build, etc.) Intellij replaces MODULE_DIR by the reel path, for example:
<component ...>
<option name="directories">
<list>
<option value="C:/somepath/myproject/mywebapp/src/main/java" />
Is there a way to prevent Intellij to change the content?

IntelliJ file excluded from search, how to un-exclude?

I have somehow managed to exclude my webpack configuration from IntelliJ search results. It also now has a little cross on it as shown below. How do I re-add the content of this file to search results?
I have tried excluding the file from the Project Settings/ Modules/ Excluded files, and then removing it to clear the cache, but it still gets excluded. Thanks!
Please check your .idea/workspace.xml - do you have this .js file listed in <component name="TypeScriptGeneratedFilesManager"> section there, like:
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
<option name="exactExcludedFiles">
<list>
<option value="$PROJECT_DIR$/path/to/webpack.config.js" />
...
</list>
</option>
</component>

"Distribution with sources" feature kills Grails 3 projects in IntelliJ

Create new Gradle 3 project, select all default values. You can test project that is runs. Then, stop the project and open build.gradle file. You will be prompted with a tip
(You can configure Gradle wrapper to use distribution with sources. It will provide IDE with Gradle API/DSL documentation)
Select Ok, apply suggestion
Now you will be unable to compile or run project anymore with the following error:
Error:Cannot compile Groovy files: no Groovy library is defined for module 'untitled1'
Is it possible to restore the project state back to normal?
UPDATE
Some block is absent in broken IPR file:
<component name="MavenImportPreferences">
<option name="generalSettings">
<MavenGeneralSettings>
<option name="mavenHome" value="D:/Apps/apache-maven-3.2.3" />
</MavenGeneralSettings>
</option>
<option name="importingSettings">
<MavenImportingSettings>
<option name="downloadDocsAutomatically" value="true" />
<option name="downloadSourcesAutomatically" value="true" />
</MavenImportingSettings>
</option>
</component>

Migration from glassfish to apache

I created a project using Netbeans and selected Glassfish 3.1 as a server, it also uses Derby database. Now I want to migrate to Apache Tomcat 7, I just did the following:
Stopped Glassfish
Changed the Netbeans project's properties to use Apache 7 instead of Glassfish
Added Apache to Netbeans and started it
When I try to build the project, several error messages appear like:
error: cannot find symbol
import javax.persistence.Basic;
although I ensured that /bin path of Java is set correctly in Apache server properties in Netbeans and that src.zip path is also set.
I think there are some steps that must be followed to have a successful migration, can any one guide me?
Thanks
Apache Tomcat does not come with the JPA specification. It is a Servlet container only.
You must add JPA specification plus Hibernate (implementation) to your project and make sure it will be deployed on your WEB-INF/lib.
Then, make sure your Persistence Unit is of transaction-type="RESOURCE_LOCAL", and configure all necessary properties to create a connection.
Example:
<persistence-unit name="bookmark-ds" transaction-type="RESOURCE_LOCAL">
<class>com.sample.domain.YourEntity</class>
<properties>
<property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver" />
<property name="javax.persistence.jdbc.user" value="sa" />
<property name="javax.persistence.jdbc.password" value="" />
<property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:mem:." />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="false" />
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
</properties>
</persistence-unit>
Obs: this is an HSQLDB example. Adjust for Derby. ;-)
UPDATE: there's a great tutorial for Tomcat+JPA+EclipseLink here.