Skip to content

Commit

Permalink
QuarkusCxfProcessor is too noisy: "Generated class ..." fix #953
Browse files Browse the repository at this point in the history
  • Loading branch information
ppalaga committed Aug 17, 2023
1 parent f010c07 commit 0e7a41e
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,21 +208,27 @@ void generateClasses(
.map(ServiceSeiBuildItem::getSei)
.distinct()
.forEach(sei -> {
LOGGER.infof("Generating ancillary classes for service %s", sei);
LOGGER.debugf("Generating ancillary classes for service %s", sei);
/*
* This is a fake build time server start, so it does not matter much that we
* use a fake path
*/
final String path = "/QuarkusCxfProcessor/dummy-" + rnd.nextLong();
final int oldCnt = capture.getGeneratedClassesCount();
CxfDeploymentUtils.createServer(sei, path, bus);
LOGGER.infof("Generated %d ancillary classes for service %s",
(capture.getGeneratedClassesCount() - oldCnt), sei);
});

clients.stream()
.map(ClientSeiBuildItem::getSei)
.distinct()
.forEach(sei -> {
LOGGER.infof("Generating ancillary classes for client %s", sei);
LOGGER.debugf("Generating ancillary classes for client %s", sei);
final int oldCnt = capture.getGeneratedClassesCount();
CxfDeploymentUtils.createClient(sei, bus);
LOGGER.infof("Generated %d ancillary classes for client %s",
(capture.getGeneratedClassesCount() - oldCnt), sei);
});

reflectiveClasses.produce(
Expand Down Expand Up @@ -659,12 +665,16 @@ public void capture(String name, byte[] bytes) {
if (!generatedClasses.contains(dotName)) {
final String slashName = name.indexOf('/') >= 0 ? name : name.replace('.', '/');
classOutput.getSourceWriter(slashName);
LOGGER.infof("Generated class %s", dotName);
LOGGER.debugf("Generated class %s", dotName);
classOutput.write(slashName, bytes);
generatedClasses.add(dotName);
}
}

public int getGeneratedClassesCount() {
return generatedClasses.size();
}

public String[] getGeneratedClasses() {
return generatedClasses.toArray(new String[0]);
}
Expand Down

0 comments on commit 0e7a41e

Please sign in to comment.