lightbend / kalix-jvm-sdk

Java and Scala SDKs for Kalix
https://docs.kalix.io/java/index.html
Other
58 stars 39 forks source link

Consider adding sdk dependencies in parent pom #2140

Closed efgpinto closed 5 months ago

efgpinto commented 5 months ago

We have added a parent pom for 1.5.0 but the dependencies for the sdk are still being declared as managed dependencies in the parent pom, and thus need to be present on the kalix project pom.xml as well...

I don't see a reason not to have them as dependencies on the parent pom, making it so that you don't event need to have them on the service pom. Thus the pom would become even tinier:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>io.kalix</groupId>
    <artifactId>kalix-java-sdk-protobuf-parent</artifactId>
    <version>1.4.1-20-06619f8e-dev</version>
  </parent>

  <groupId>com.example</groupId>
  <artifactId>valueentity-counter</artifactId>
  <version>0.0.1</version>
  <packaging>jar</packaging>

  <name>first-service</name>
  <properties>
    <!-- For Docker setup see https://docs.kalix.io/projects/container-registries.html -->
    <kalixContainerRegistry>kcr.us-east-1.kalix.io</kalixContainerRegistry>
    <kalixOrganization>acme</kalixOrganization>
    <mainClass>com.example.Main</mainClass>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>4.6.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>

Currently, we have them with these dependencies:

  <dependencies>
    <dependency>
      <groupId>io.kalix</groupId>
      <artifactId>kalix-java-sdk-protobuf</artifactId>
    </dependency>
    <dependency>
      <groupId>io.kalix</groupId>
      <artifactId>kalix-java-sdk-protobuf-testkit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>4.6.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

Any reasons for not doing it?