Skip to content

Commit

Permalink
chore: Reduce 3rd party dependencies
Browse files Browse the repository at this point in the history
Only depend on those Citrus modules that we really need at runtime. Other dependencies will be added to the individual test configurations. This makes the YAKS image smaller and avoids that unused modules are loaded at startup.
  • Loading branch information
christophd committed May 6, 2020
1 parent 87cca85 commit e3e8567
Show file tree
Hide file tree
Showing 16 changed files with 202 additions and 120 deletions.
113 changes: 109 additions & 4 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<slf4j.version>1.7.30</slf4j.version>
<log4j2.version>2.13.1</log4j2.version>
<citrus.version>3.0.0-M1</citrus.version>
<spring.version>5.2.4.RELEASE</spring.version>
Expand Down Expand Up @@ -81,7 +82,32 @@
<!-- Citrus -->
<dependency>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-core</artifactId>
<artifactId>citrus-base</artifactId>
<version>${citrus.version}</version>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-core-spring</artifactId>
<version>${citrus.version}</version>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-validation-json</artifactId>
<version>${citrus.version}</version>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-validation-text</artifactId>
<version>${citrus.version}</version>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-validation-groovy</artifactId>
<version>${citrus.version}</version>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-validation-hamcrest</artifactId>
<version>${citrus.version}</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -122,11 +148,40 @@
<version>${cucumber.version}</version>
</dependency>

<!-- Spring Framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>

<!-- Apache Camel -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>${camel.version}</version>
</dependency>

<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j2.version}</version>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>

<dependency>
Expand All @@ -140,7 +195,19 @@
<version>${jackson.version}</version>
</dependency>

<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.25</version>
</dependency>

<!-- Unit testing -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j2.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand All @@ -151,15 +218,53 @@
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<!-- Global dependencies -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<!-- Test scope -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<pluginManagement>
<plugins>
Expand Down
23 changes: 19 additions & 4 deletions java/runtime/yaks-runtime-maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,21 @@
<version>${project.version}</version>
</dependency>

<!-- ****************************** -->
<!-- -->
<!-- DEFAULT VALIDATION MODULES -->
<!-- -->
<!-- ****************************** -->

<dependency>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-validation-json</artifactId>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-validation-text</artifactId>
</dependency>

<!-- ****************************** -->
<!-- -->
<!-- OTHERS -->
Expand All @@ -99,13 +114,13 @@
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-core-spring</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

</project>
8 changes: 1 addition & 7 deletions java/steps/yaks-camel-k/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<dependency>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-core</artifactId>
<artifactId>citrus-base</artifactId>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
Expand All @@ -52,12 +52,6 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>

</dependencies>

</project>
21 changes: 8 additions & 13 deletions java/steps/yaks-camel/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<dependency>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-core</artifactId>
<artifactId>citrus-base</artifactId>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
Expand All @@ -46,36 +46,26 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>

<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>${camel.version}</version>
</dependency>

<!-- Test scope -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
Expand All @@ -87,8 +77,13 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-core-spring</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-validation-text</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
16 changes: 8 additions & 8 deletions java/steps/yaks-http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,14 @@

<dependency>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-core</artifactId>
<artifactId>citrus-base</artifactId>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-http</artifactId>
</dependency>

<!-- Test scope -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
Expand All @@ -60,8 +55,13 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-core-spring</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-validation-json</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
#

citrus.spring.java.config=org.citrusframework.yaks.http.HttpEndpointConfiguration
citrus.default.message.type=JSON
27 changes: 12 additions & 15 deletions java/steps/yaks-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,35 @@
<name>YAKS :: Steps :: JDBC</name>

<dependencies>

<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
</dependency>

<dependency>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-core</artifactId>
<artifactId>citrus-base</artifactId>
</dependency>

<!-- Test scope -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<scope>test</scope>
</dependency>

<!-- Test scope -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-cucumber</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-core-spring</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.consol.citrus</groupId>
<artifactId>citrus-cucumber</artifactId>
<artifactId>citrus-validation-groovy</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -75,11 +73,10 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

</project>
Loading

0 comments on commit e3e8567

Please sign in to comment.