in src/main/java/org/apache/maven/plugins/changes/trac/TracDownloader.java [96:137]
public List<Issue> getIssueList() throws MalformedURLException, XmlRpcException {
// Create and configure an XML-RPC client
XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
try {
config.setServerURL(new URL(getUrl() + "/login/xmlrpc"));
} catch (MalformedURLException e) {
throw new MalformedURLException("The Trac URL is incorrect.");
}
config.setBasicUserName(tracUser);
config.setBasicPassword(tracPassword);
XmlRpcClient client = new XmlRpcClient();
client.setConfig(config);
client.setTransportFactory(new XmlRpcCommonsTransportFactory(client));
// Fetch issues
String qstr = "";
if (!(query == null || query.isEmpty())) {
qstr = query;
}
Object[] params = new Object[] {qstr};
Object[] queryResult;
ArrayList<Issue> issueList = new ArrayList<>();
try {
queryResult = (Object[]) client.execute("ticket.query", params);
for (Object aQueryResult : queryResult) {
params = new Object[] {aQueryResult};
Object[] ticketGetResult;
ticketGetResult = (Object[]) client.execute("ticket.get", params);
issueList.add(createIssue(ticketGetResult));
}
} catch (XmlRpcException e) {
throw new XmlRpcException("XmlRpc Error.", e);
}
return issueList;
}