appsody / stacks

Appsody application stacks. This repo will be archived soon.
https://appsody.dev
Apache License 2.0
89 stars 120 forks source link

java-openliberty stack - kafka template - use provided dependencies & library locations for layering #796

Open scottkurz opened 4 years ago

scottkurz commented 4 years ago

The kafka template in java-openliberty uses dependencies:

        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.25</version>
        </dependency>

As compile dependencies, these will get packaged up into the app WAR. A better approach from a Docker layering perspective would be to change these to 'provided' dependencies and then reference these via a library in server config. This would require some work to copy the dependencies over into the appropriate target server dir during the maven build, e.g. as in the sample POM here.