Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 8b9d749c authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

Sonar issue

parent 80486f3c
No related branches found
No related tags found
No related merge requests found
...@@ -86,12 +86,13 @@ ...@@ -86,12 +86,13 @@
<jacoco.version>0.8.6</jacoco.version> <jacoco.version>0.8.6</jacoco.version>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin> <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis> <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
<sonar.jacoco.reportPath>${project.basedir}/target/jacoco.exec</sonar.jacoco.reportPath> <sonar.jacoco.reportPaths>${project.basedir}/../target/jacoco.exec</sonar.jacoco.reportPaths>
<jacoco.destFile>${sonar.jacoco.reportPaths}</jacoco.destFile>
<sonar.language>java</sonar.language> <sonar.language>java</sonar.language>
<!--sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin> <!--sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.jacoco.codeCoveragePath>${basedir}/target/code-coverage</sonar.jacoco.codeCoveragePath> <sonar.jacoco.codeCoveragePath>${basedir}/target/code-coverage</sonar.jacoco.codeCoveragePath>
<sonar.jacoco.reportPath>${sonar.jacoco.codeCoveragePath}/jacoco-ut.exec</sonar.jacoco.reportPath> <sonar.jacoco.reportPaths>${sonar.jacoco.codeCoveragePath}/jacoco-ut.exec</sonar.jacoco.reportPaths>
<sonar.language>java</sonar.language--> <sonar.language>java</sonar.language-->
<sonar.jacoco.remotePort>${jacocoRemotePort}</sonar.jacoco.remotePort> <sonar.jacoco.remotePort>${jacocoRemotePort}</sonar.jacoco.remotePort>
<sonar.jacoco.remoteAddress>${jacocoRemoteAddress}</sonar.jacoco.remoteAddress> <sonar.jacoco.remoteAddress>${jacocoRemoteAddress}</sonar.jacoco.remoteAddress>
...@@ -620,8 +621,8 @@ ...@@ -620,8 +621,8 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<!-- configuration> <configuration>
<reportsDirectory>${sonar.jacoco.reportPath}</reportsDirectory> <reportsDirectory>${sonar.jacoco.reportPaths}</reportsDirectory>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
...@@ -637,7 +638,7 @@ ...@@ -637,7 +638,7 @@
</excludes> </excludes>
</configuration> </configuration>
</execution> </execution>
</executions --> </executions>
</plugin> </plugin>
<!-- integration tests, failsafe plugin --> <!-- integration tests, failsafe plugin -->
...@@ -672,20 +673,19 @@ ...@@ -672,20 +673,19 @@
<groupId>org.jacoco</groupId> <groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId> <artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.maven.plugin.version}</version> <version>${jacoco.maven.plugin.version}</version>
<!-- executions> <executions>
<execution> <execution>
<id>pre-unit-test</id> <id>pre-unit-test</id>
<goals> <goals>
<goal>prepare-agent</goal> <goal>prepare-agent</goal>
</goals> </goals>
<configuration> <configuration>
<! - - destFile>${sonar.jacoco.reportPath}</destFile> <propertyName>surefire.argline</propertyName>
<propertyName>surefire.argline</propertyName - - >
<append>true</append> <append>true</append>
</configuration> </configuration>
</execution> </execution>
<execution> <!--execution>
<id>pre-integration-test</id> <id>pre-integration-test</id>
<phase>pre-integration-test</phase> <phase>pre-integration-test</phase>
<goals> <goals>
...@@ -697,13 +697,12 @@ ...@@ -697,13 +697,12 @@
<propertyName>failsafe.argline</propertyName> <propertyName>failsafe.argline</propertyName>
<append>true</append> <append>true</append>
</configuration> </configuration>
</execution> </execution -->
</executions--> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId> <artifactId>sonar-maven-plugin</artifactId>
<version>${sonar.maven.plugin.version}</version>
</plugin> </plugin>
<plugin> <plugin>
<artifactId>maven-release-plugin</artifactId> <artifactId>maven-release-plugin</artifactId>
......
...@@ -69,9 +69,7 @@ public class UIServiceGroupServiceIntegrationTest extends AbstractServiceIntegra ...@@ -69,9 +69,7 @@ public class UIServiceGroupServiceIntegrationTest extends AbstractServiceIntegra
@Test @Test
public void testGetTableListEmpty() { public void testGetTableListEmpty() {
// given // given
//when //when
ServiceResult<ServiceGroupRO> res = testInstance.getTableList(-1, -1, null, null, null); ServiceResult<ServiceGroupRO> res = testInstance.getTableList(-1, -1, null, null, null);
// then // then
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<goal>dump</goal> <goal>dump</goal>
</goals> </goals>
<configuration> <configuration>
<destFile>${sonar.jacoco.reportPath}</destFile> <destFile>${sonar.jacoco.reportPaths}</destFile>
<address>${sonar.jacoco.remoteAddress}</address> <address>${sonar.jacoco.remoteAddress}</address>
<port>${sonar.jacoco.remotePort}</port> <port>${sonar.jacoco.remotePort}</port>
<reset>false</reset> <reset>false</reset>
......
...@@ -65,7 +65,6 @@ public class SMPAuthenticationEventListener implements ApplicationListener<Authe ...@@ -65,7 +65,6 @@ public class SMPAuthenticationEventListener implements ApplicationListener<Authe
|| StringUtils.equalsIgnoreCase(grantedAuthority.getAuthority(), SMPAuthority.S_AUTHORITY_WS_SYSTEM_ADMIN.getAuthority()) || StringUtils.equalsIgnoreCase(grantedAuthority.getAuthority(), SMPAuthority.S_AUTHORITY_WS_SYSTEM_ADMIN.getAuthority())
|| StringUtils.equalsIgnoreCase(grantedAuthority.getAuthority(), SMPAuthority.S_AUTHORITY_WS_SMP_ADMIN.getAuthority()) || StringUtils.equalsIgnoreCase(grantedAuthority.getAuthority(), SMPAuthority.S_AUTHORITY_WS_SMP_ADMIN.getAuthority())
); );
LOG.debug("has role [{}]", ((GrantedAuthority)Arrays.stream(authorities.toArray()).findFirst().get()).getAuthority());
LOG.debug("has admin role [{}]", hasAdminRole); LOG.debug("has admin role [{}]", hasAdminRole);
LOG.debug("configurationService [{}]", configurationService); LOG.debug("configurationService [{}]", configurationService);
return hasAdminRole ? configurationService.getSessionIdleTimeoutForAdmin() : return hasAdminRole ? configurationService.getSessionIdleTimeoutForAdmin() :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment