How to retrieve the package-name of a resource using the SonarQube REST-API? -


can think of elegant way determine package of java-class in sonarqube using rest-api?

this snippet

http://myhost:9000/sonar/api/resources?resource=my.project%3asimple.analysis&depth=-1&scopes=fil 

delivers result containing

<lname>my/project/src/com/tobi/my/heros/schmidtskatze.java</lname> 

i xslt com/tobi/my/heros/, wonder if there propper way? think?

from question ask, reckon using sonarqube 4.2 or later.

since sq 4.2, resource ws language agnostic , deals files , directories, not java class , packages anymore. therefor, information looking not available in plain in ws response, you'll have xslt or other parsing , transformation.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -