Skip to content

Commit bd8ca4d

Browse files
fix: explicitly exclude annotation processors from dep-analysis (#49)
1 parent f190f7f commit bd8ca4d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

plugins/autodoc/autodoc-plugin/src/main/java/org/eclipse/edc/plugins/autodoc/AutodocDependencyInjector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public void afterResolve(ResolvableDependencies dependencies) {
7777
private boolean addDependency(Project project, String dependencyName) {
7878
var apConfig = project.getConfigurations().findByName(ANNOTATION_PROCESSOR);
7979
if (apConfig != null) {
80-
project.getLogger().debug("autodoc: Add dependency annotationProcessor(\"{}\") to project {}", dependencyName, project.getName());
80+
project.getLogger().debug("autodoc: Add dependency {}(\"{}\") to project {}", ANNOTATION_PROCESSOR, dependencyName, project.getName());
8181
return apConfig.getDependencies().add(project.getDependencies().create(dependencyName));
8282
}
8383
return false;

plugins/edc-build/src/main/java/org/eclipse/edc/plugins/edcbuild/conventions/DependencyAnalysisConvention.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,16 @@ public void apply(Project target) {
5757
"com.fasterxml.jackson.core:jackson-annotations",
5858
"com.fasterxml.jackson.core:jackson-databind");
5959
});
60+
a.onUnusedAnnotationProcessors(i -> i.exclude(
61+
"org.eclipse.edc:autodoc-processor"
62+
));
6063
a.onUnusedDependencies(i -> i.exclude(
6164
// dependencies declared at the root level for all modules
6265
"org.assertj:assertj-core",
6366
"org.junit.jupiter:junit-jupiter-api",
6467
"org.junit.jupiter:junit-jupiter-params",
6568
"org.mockito:mockito-core",
66-
"org.eclipse.edc:runtime-metamodel",
67-
"org.eclipse.edc:autodoc-processor"
69+
"org.eclipse.edc:runtime-metamodel"
6870
));
6971
a.onIncorrectConfiguration(i -> i.exclude(
7072
// some common dependencies are intentionally exported by core:common:connector-core for simplicity

0 commit comments

Comments
 (0)