java icon indicating copy to clipboard operation
java copied to clipboard

Remove unused dependencies from pom.xml

Open brendandburns opened this issue 9 months ago • 8 comments
trafficstars

I think there are a number of unused dependencies that for historical reasons are still in our POM files.

We should use something like mvn dependency:analyze to strip these out.

brendandburns avatar Feb 01 '25 16:02 brendandburns

[WARNING] Used undeclared dependencies found:
[WARNING]    org.springframework:spring-beans:jar:6.2.2:compile
[WARNING]    io.kubernetes:client-java-extended:jar:23.0.0-SNAPSHOT:compile
[WARNING]    com.google.code.gson:gson:jar:2.12.1:compile
[WARNING]    org.springframework:spring-core:jar:6.2.2:compile
[WARNING]    io.swagger:swagger-annotations:jar:1.6.15:compile
[WARNING]    org.slf4j:slf4j-api:jar:2.0.16:compile
[WARNING]    org.springframework.boot:spring-boot-autoconfigure:jar:3.4.2:compile
[WARNING]    org.jetbrains:annotations:jar:13.0:compile
[WARNING] Unused declared dependencies found:
[WARNING]    io.kubernetes:client-java-spring-integration:jar:23.0.0-SNAPSHOT:compile
[WARNING]    org.springframework.boot:spring-boot:jar:3.4.2:compile
[WARNING]    org.junit.jupiter:junit-jupiter:jar:5.11.4:test
[WARNING]    org.springframework.boot:spring-boot-test:jar:3.4.2:test
[WARNING]    org.springframework:spring-test:jar:6.2.2:test

Yea we're safe to remove these packages I think

yue9944882 avatar Feb 03 '25 18:02 yue9944882

Hi @brendandburns and @yue9944882 , I have understood this issue and I am willing to work on it. Can you please assign me this issue.

Rishabh-mikku avatar Feb 06 '25 19:02 Rishabh-mikku

@Rishabh-mikku feel free to send PRs.

brendandburns avatar Feb 08 '25 18:02 brendandburns

@Rishabh-mikku JFI, I already raise another PR https://github.com/kubernetes-client/java/pull/3909 consider it to avoid double work,

@brendandburns @yue9944882 I haven't removed all the dependencies listed with mvn depdency:analyze due by removing some of them the coded haven't compiled successfully

JynLeazy avatar Feb 10 '25 17:02 JynLeazy

HI @brendandburns @yue9944882 is this PR still pending/help needed?

darshansreenivas avatar Feb 17 '25 21:02 darshansreenivas

H @yue9944882! I'd like to work on this issue if It isn't closed yet.

WaleedAdnan08 avatar Mar 21 '25 17:03 WaleedAdnan08

Still open?

kiranraoboinapally avatar May 01 '25 15:05 kiranraoboinapally

Is this still up?

Aariyan007 avatar May 31 '25 11:05 Aariyan007

During kubernetes-client/gen/penapi/openapi-generator/generate_client_in_container.sh#L105

mvn -f /generation_params.xml clean generate-sources -Dgenerator.spec.path=/output_dir/swagger.json -Dgenerator.output.path=/output_dir -D=generator.client.version=24.0.0 -D=generator.package.name=io.kubernetes.client.openapi -D=openapi-generator-version=7.13.0 -Duser.home=/root

Its pick the default configuration for openapi-generator - java mustache templets for respective resources generation.

We need to provide custom template pom.xml mustache to control the generation of pom.xml.

I'm still in the process of exploring and gathering information about , so my current thoughts are subject to refinement.

dasarathirout avatar Aug 03 '25 16:08 dasarathirout

is this still open I wannna contribute

Shabeeh-Abbas avatar Sep 29 '25 09:09 Shabeeh-Abbas