Skip to content

Commit

Permalink
Merge pull request #201 from heinpa/minimize-dependencies
Browse files Browse the repository at this point in the history
Proof of Concept: Minimize dependencies in pom.xml
  • Loading branch information
heinpa authored Jan 23, 2024
2 parents d801c01 + eb66bdf commit 27d4ca3
Show file tree
Hide file tree
Showing 4 changed files with 158 additions and 35 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<module>qanary_commons</module>
<module>qanary_pipeline-template</module>
<module>qanary_component-template</module>
<module>qanary_component-parent</module>
<module>qald-evaluator</module>
</modules>
</project>
2 changes: 1 addition & 1 deletion qanary_component-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>eu.wdaqua.qanary.component</groupId>
<artifactId>qa.qanarycomponent-archetype</artifactId>
<version>1.3.0</version>
<version>1.4.0</version>
<packaging>maven-archetype</packaging>

<name>qanary-component-archetype</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<version>${version}</version>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.7</version>
<groupId>eu.wdaqua.qanary</groupId>
<artifactId>qa.qanarycomponent-parent</artifactId>
<version>0.1.0</version>
</parent>
<properties>
<java.version>17</java.version>
Expand All @@ -24,37 +24,8 @@
</properties>

<dependencies>
<dependency>
<groupId>eu.wdaqua.qanary</groupId>
<artifactId>qa.component</artifactId>
<version>${qanary.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>hamcrest-core</artifactId>
<groupId>org.hamcrest</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- common minimum dependencies are inherited from qa.qanarycomponent-parent -->
<!-- specify optional commmon dependencies (see <dependencyManagement> in parent) -->
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
Expand All @@ -65,7 +36,15 @@
<artifactId>json-path-assert</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
</dependency>

<!-- TODO: specify dependencies for this component -->

</dependencies>

<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -100,6 +79,16 @@
<goal>push</goal>
</goals>
</execution>
<execution>
<id>default-2</id>
<goals>
<goal>tag</goal>
<goal>push</goal>
</goals>
<configuration>
<tag>latest</tag>
</configuration>
</execution>
</executions>
<configuration>
<repository>${docker.image.name}</repository>
Expand Down
133 changes: 133 additions & 0 deletions qanary_component-parent/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>eu.wdaqua.qanary</groupId>
<artifactId>qa.qanarycomponent-parent</artifactId>
<version>0.1.0</version>
<packaging>pom</packaging>

<name>qanary-component-parent</name>

<parent>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.11</version>
<relativePath/>
</parent>
<properties>
<java.version>17</java.version>
<qanary.version>[3.9.0,4.0.0)</qanary.version>
<spring-boot-admin.version>2.7.11</spring-boot-admin.version>
<junit-jupiter.version>5.8.2</junit-jupiter.version>
<json-path.version>2.4.0</json-path.version>
</properties>

<!-- common dependencies that are implemented by all components -->
<dependencies>
<dependency>
<groupId>eu.wdaqua.qanary</groupId>
<artifactId>qa.component</artifactId>
<version>${qanary.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring-boot-admin.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${spring-boot-admin.version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent -->
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>${spring-boot-admin.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>hamcrest-core</artifactId>
<groupId>org.hamcrest</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hamcrest/hamcrest-all -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
</dependencies>

<!-- common dependencies that may be implemented by some components -->
<dependencyManagement>
<dependencies>
<!-- https://mvnrepository.com/artifact/com.jayway.jsonpath/json-path -->
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>${json-path.version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.jayway.jsonpath/json-path-assert -->
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path-assert</artifactId>
<version>${json-path.version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-ui -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.7.0</version>
<exclusions>
<exclusion>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-core-jakarta -->
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-core-jakarta</artifactId>
<version>2.2.16</version>
</dependency>
</dependencies>
</dependencyManagement>

</project>

0 comments on commit 27d4ca3

Please sign in to comment.