You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fesod-parent declares slf4j-api/lombok as inherited dependencies; move to dependencyManagement #1174
While reviewing the staged 2.1.0-incubating RC7 POMs (orgapachefesod-1058), I noticed that the root pom.xml (fesod-parent) declares real <dependencies>, not just <dependencyManagement>. So every child module inherits them, whether it needs them or not.
Current state
Root pom.xml (the <dependencies> block after </dependencyManagement>) declares:
no (only support/Empty.java plus relocated Spring classes)
no
slf4j-api (compile), lombok (provided)
fesod-sheet
yes (@Slf4j in 25 files)
yes
slf4j-api (compile), lombok (provided)
So fesod-common and fesod-shaded publish a compile-scope dependency on slf4j-api that they don't use. In practice this is harmless today, because anyone using fesod-sheet needs slf4j-api anyway. But it's inaccurate metadata, and anyone depending on fesod-common or fesod-shaded directly gets an unneeded transitive dependency. mvn dependency:analyze on those modules should flag it as "declared but unused".
Suggested fix
Move slf4j-api and lombok into the parent's <dependencyManagement> (versions are likely already managed there). Then declare them explicitly only in the modules that use them:
fesod-sheet: slf4j-api, lombok
fesod-common: lombok
fesod-shaded: neither
Optionally do the same for the shared test dependencies. They are test scope so they never leak to users, but declaring them per module keeps each module's POM self-describing. This part is lower priority.
Afterwards, confirm with mvn dependency:analyze per module and check the flattened POMs.
Activity