2017-04-24 8 views

答えて

1

あなたはsonarqubeクライアントlibに使用することができます。

Builder builder = HttpConnector.newBuilder(); 

    builder.url("http://xxxx:9000/sonar/"); 

    builder.connectTimeoutMilliseconds(10000); 

    HttpConnector httpConnector = builder.build(); 

    SearchWsRequest searchWsRequest = new org.sonarqube.ws.client.issue.SearchWsRequest(); 

    List<String> projectKeys = new ArrayList<String>(1); 

    projectKeys.add("project_key"); 

    searchWsRequest.setProjectKeys(projectKeys); 

    final WsClient wsClient = WsClientFactories.getDefault().newClient(httpConnector); 

    List<Issue> issues = wsClient.issues().search(searchWsRequest).getIssuesList(); 

を使い

<dependency> 
    <groupId>org.sonarsource.sonarqube</groupId> 
    <artifactId>sonar-ws</artifactId> 
    <version>5.6</version> 
</dependency> 
関連する問題