Wildcard in sonar.java.libraries handled wrongly lib/**/*.jar

996 views
Skip to first unread message

csorb...@gmail.com

unread,
Nov 16, 2016, 9:38:16 AM11/16/16
to SonarQube
I've just upgraded from SonarQube 5.3 to 6.1, and also updated the Java plugin from 3.13 to 4.2.1
Now I'm facing an issue, that the wildcard pattern matching algorithm is probably changed.

In my sonar-project.properties I have configured this:
sonar.java.libraries=lib/**/*.jar

That was working fine for the libraries folder having the jar files in several subfolders.
But now, this pattern is not matching the files directly in the lib folder only in subfolders.

Example: the lib folder has following structure
lib/
  lombok.jar
  logging/
    log4j-1.2.13.jar
  mockito/
    powermock-mockito-1.6.6-full.jar


In the new version, the lib/**/*.jar is matching only log4j and powermock, but disregarding the lombok.jar. Which means, there are a lot of "Class not found: ..." lines in the sonar log for classes related to the jar files in the lib folder.

If I'm changing that to lib/**.jar, then it works fine.
This is just a workaround, because I think that ** should match zero or more directory elements, like in ant paths.

Anybody facing similar issue with wildcard patterns?

Michael Gumowski

unread,
Nov 21, 2016, 10:19:15 AM11/21/16
to csorb...@gmail.com, SonarQube
Hello Zoltán,

Thanks a lot for the feedback. After investigation, this is a regression on the Java analyzer side, introduced with version 4.2. Glad to see that you can use a workaround for the time being.
I created the following ticket to handle the issue: SONARJAVA-1965

Best Regards,
Michael

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/b16a5216-7c84-437e-b85f-10ac112a974e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Michael GUMOWSKI | SonarSource
Software Developer @ Language Team
http://sonarsource.com
Reply all
Reply to author
Forward
0 new messages