Skip to content

Commit

Permalink
refactor: springframework dependencies multi module
Browse files Browse the repository at this point in the history
  • Loading branch information
aureamunoz committed Mar 3, 2020
1 parent c0d6009 commit 25defd7
Show file tree
Hide file tree
Showing 8 changed files with 347 additions and 112 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# quarkus-spring-di-api
# quarkus-spring-api

This is a Spring Dependency Injection API only dependency. The idea is to have only the classes used by Quarkus (and the transitive dependencies)
This is a Spring Dependency API only dependency. The idea is to have only the classes used by Quarkus (and the transitive dependencies)
This absolutely minimum dependencies would be a great benefit to reduce the footprint of Quarkus applications using the spring modules.
217 changes: 107 additions & 110 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,141 +34,138 @@
</scm>

<properties>
<spring-boot-bom.version>2.1.12.Final</spring-boot-bom.version>
<maven-shade-plugin.version>3.2.1</maven-shade-plugin.version>
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
<maven-source-plugin.version>3.2.0</maven-source-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<spring-framework.version>5.2.4.RELEASE</spring-framework.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>me.snowdrop</groupId>
<artifactId>spring-boot-bom</artifactId>
<version>${spring-boot-bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<packaging>pom</packaging>
<modules>
<module>quarkus-spring-core-api</module>
<module>quarkus-spring-beans-api</module>
<module>quarkus-spring-context-api</module>
</modules>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<optional>true</optional>
<version>${spring-framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<optional>true</optional>
<version>${spring-framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<optional>true</optional>
<version>${spring-framework.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven-shade-plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createSourcesJar>true</createSourcesJar>
<artifactSet>
<includes>
<include>org.springframework:spring-core</include>
<include>org.springframework:spring-beans</include>
<include>org.springframework:spring-context</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>org.springframework:spring-core</artifact>
<includes>
<!-- Transitive dependencies -->
<include>org/springframework/core/BridgeMethodResolver**</include>
<include>org/springframework/core/MethodParameter**</include>
<include>org/springframework/core/NestedExceptionUtils**</include>
<include>org/springframework/core/NestedRuntimeException**</include>
<include>org/springframework/core/ParameterNameDiscoverer**</include>
<include>org/springframework/core/ResolvableType**</include>
<include>org/springframework/core/SerializableTypeWrapper**</include>
<include>org/springframework/core/annotation/AliasFor**</include>
<include>org/springframework/core/annotation/AnnotationAttributes**</include>
<include>org/springframework/core/annotation/AnnotatedElementUtils**</include>
<include>org/springframework/core/convert/TypeDescriptor**</include>
<include>org/springframework/util/ClassUtils**</include>
<include>org/springframework/util/CollectionUtils**</include>
<include>org/springframework/util/ConcurrentReferenceHashMap**</include>
<include>org/springframework/util/LinkedMultiValueMap**</include>
<include>org/springframework/util/MultiValueMap**</include>
<include>org/springframework/util/ObjectUtils**</include>
<include>org/springframework/util/ReflectionUtils**</include>
<include>org/springframework/util/StringUtils**</include>
</includes>
</filter>
<filter>
<artifact>org.springframework:spring-beans</artifact>
<includes>
<!-- Used in Quarkus -->
<include>org/springframework/beans/factory/annotation/Autowired**</include>
<include>org/springframework/beans/factory/annotation/Qualifier**</include>
<include>org/springframework/beans/factory/annotation/Value**</include>
<!-- Transitive dependencies -->
<include>org/springframework/beans/BeansException**</include>
<include>org/springframework/beans/PropertyAccessException**</include>
<include>org/springframework/beans/TypeConverter**</include>
<include>org/springframework/beans/TypeMismatchException**</include>
<include>org/springframework/beans/factory/ObjectFactory**</include>
<include>org/springframework/beans/factory/NoSuchBeanDefinitionException**</include>
<include>org/springframework/beans/factory/NoUniqueBeanDefinitionException**</include>
<include>org/springframework/beans/factory/annotation/Autowire**</include>
<include>org/springframework/beans/factory/config/AutowireCapableBeanFactory**</include>
<include>org/springframework/beans/factory/config/DependencyDescriptor**</include>
<include>org/springframework/beans/factory/support/AbstractBeanDefinition**</include>
</includes>
</filter>
<filter>
<artifact>org.springframework:spring-context</artifact>
<includes>
<!-- Used in Quarkus -->
<include>org/springframework/context/annotation/Bean**</include>
<include>org/springframework/context/annotation/Configuration**</include>
<include>org/springframework/context/annotation/Scope**</include>
<include>org/springframework/stereotype/Component**</include>
<include>org/springframework/stereotype/Indexed**</include>
<include>org/springframework/stereotype/Repository**</include>
<include>org/springframework/stereotype/Service**</include>
<!-- Transitive dependencies -->
<include>org/springframework/context/ApplicationContext**</include>
<include>org/springframework/context/ApplicationEvent**</include>
<include>org/springframework/context/ApplicationEventPublisher**</include>
<include>org/springframework/context/MessageSource**</include>
<include>org/springframework/context/NoSuchMessageException**</include>
<include>org/springframework/context/annotation/ScopedProxyMode**</include>
</includes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!-- <build>-->
<!-- <plugins>-->
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-shade-plugin</artifactId>-->
<!-- <version>${maven-shade-plugin.version}</version>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <phase>package</phase>-->
<!-- <goals>-->
<!-- <goal>shade</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <createSourcesJar>true</createSourcesJar>-->
<!-- <artifactSet>-->
<!-- <includes>-->
<!-- <include>org.springframework:spring-core</include>-->
<!-- <include>org.springframework:spring-beans</include>-->
<!-- <include>org.springframework:spring-context</include>-->
<!-- </includes>-->
<!-- </artifactSet>-->
<!-- <filters>-->
<!-- <filter>-->
<!-- <artifact>org.springframework:spring-core</artifact>-->
<!-- <includes>-->
<!-- &lt;!&ndash; Transitive dependencies &ndash;&gt;-->
<!-- <include>org/springframework/core/BridgeMethodResolver**</include>-->
<!-- <include>org/springframework/core/MethodParameter**</include>-->
<!-- <include>org/springframework/core/NestedExceptionUtils**</include>-->
<!-- <include>org/springframework/core/NestedRuntimeException**</include>-->
<!-- <include>org/springframework/core/ParameterNameDiscoverer**</include>-->
<!-- <include>org/springframework/core/ResolvableType**</include>-->
<!-- <include>org/springframework/core/SerializableTypeWrapper**</include>-->
<!-- <include>org/springframework/core/annotation/AliasFor**</include>-->
<!-- <include>org/springframework/core/annotation/AnnotationAttributes**</include>-->
<!-- <include>org/springframework/core/annotation/AnnotatedElementUtils**</include>-->
<!-- <include>org/springframework/core/convert/TypeDescriptor**</include>-->
<!-- <include>org/springframework/util/ClassUtils**</include>-->
<!-- <include>org/springframework/util/CollectionUtils**</include>-->
<!-- <include>org/springframework/util/ConcurrentReferenceHashMap**</include>-->
<!-- <include>org/springframework/util/LinkedMultiValueMap**</include>-->
<!-- <include>org/springframework/util/MultiValueMap**</include>-->
<!-- <include>org/springframework/util/ObjectUtils**</include>-->
<!-- <include>org/springframework/util/ReflectionUtils**</include>-->
<!-- <include>org/springframework/util/StringUtils**</include>-->
<!-- </includes>-->
<!-- </filter>-->
<!-- <filter>-->
<!-- <artifact>org.springframework:spring-beans</artifact>-->
<!-- <includes>-->
<!-- &lt;!&ndash; Used in Quarkus &ndash;&gt;-->
<!-- <include>org/springframework/beans/factory/annotation/Autowired**</include>-->
<!-- <include>org/springframework/beans/factory/annotation/Qualifier**</include>-->
<!-- <include>org/springframework/beans/factory/annotation/Value**</include>-->
<!-- &lt;!&ndash; Transitive dependencies &ndash;&gt;-->
<!-- <include>org/springframework/beans/BeansException**</include>-->
<!-- <include>org/springframework/beans/PropertyAccessException**</include>-->
<!-- <include>org/springframework/beans/TypeConverter**</include>-->
<!-- <include>org/springframework/beans/TypeMismatchException**</include>-->
<!-- <include>org/springframework/beans/factory/ObjectFactory**</include>-->
<!-- <include>org/springframework/beans/factory/NoSuchBeanDefinitionException**</include>-->
<!-- <include>org/springframework/beans/factory/NoUniqueBeanDefinitionException**</include>-->
<!-- <include>org/springframework/beans/factory/annotation/Autowire**</include>-->
<!-- <include>org/springframework/beans/factory/config/AutowireCapableBeanFactory**</include>-->
<!-- <include>org/springframework/beans/factory/config/DependencyDescriptor**</include>-->
<!-- <include>org/springframework/beans/factory/support/AbstractBeanDefinition**</include>-->
<!-- </includes>-->
<!-- </filter>-->
<!-- <filter>-->
<!-- <artifact>org.springframework:spring-context</artifact>-->
<!-- <includes>-->
<!-- &lt;!&ndash; Used in Quarkus &ndash;&gt;-->
<!-- <include>org/springframework/context/annotation/Bean**</include>-->
<!-- <include>org/springframework/context/annotation/Configuration**</include>-->
<!-- <include>org/springframework/context/annotation/Scope**</include>-->
<!-- <include>org/springframework/stereotype/Component**</include>-->
<!-- <include>org/springframework/stereotype/Indexed**</include>-->
<!-- <include>org/springframework/stereotype/Repository**</include>-->
<!-- <include>org/springframework/stereotype/Service**</include>-->
<!-- &lt;!&ndash; Transitive dependencies &ndash;&gt;-->
<!-- <include>org/springframework/context/ApplicationContext**</include>-->
<!-- <include>org/springframework/context/ApplicationEvent**</include>-->
<!-- <include>org/springframework/context/ApplicationEventPublisher**</include>-->
<!-- <include>org/springframework/context/MessageSource**</include>-->
<!-- <include>org/springframework/context/NoSuchMessageException**</include>-->
<!-- <include>org/springframework/context/annotation/ScopedProxyMode**</include>-->
<!-- </includes>-->
<!-- </filter>-->
<!-- </filters>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<!-- </plugins>-->
<!-- </build>-->
<profiles>
<profile>
<id>release</id>
Expand Down
73 changes: 73 additions & 0 deletions quarkus-spring-beans-api/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?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>io.quarkus</groupId>
<artifactId>quarkus-spring-beans-api</artifactId>
<version>5.2.Alpha1-SNAPSHOT</version>

<parent>
<artifactId>quarkus-spring-di-api</artifactId>
<groupId>io.quarkus</groupId>
<version>5.2.Alpha1-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createSourcesJar>true</createSourcesJar>
<artifactSet>
<includes>
<include>org.springframework:spring-beans</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>org.springframework:spring-beans</artifact>
<includes>
<!-- Used in Quarkus -->
<include>org/springframework/beans/factory/annotation/Autowired**</include>
<include>org/springframework/beans/factory/annotation/Qualifier**</include>
<include>org/springframework/beans/factory/annotation/Value**</include>
<!-- Transitive dependencies -->
<include>org/springframework/beans/BeansException**</include>
<include>org/springframework/beans/PropertyAccessException**</include>
<include>org/springframework/beans/TypeConverter**</include>
<include>org/springframework/beans/TypeMismatchException**</include>
<include>org/springframework/beans/factory/ObjectFactory**</include>
<include>org/springframework/beans/factory/NoSuchBeanDefinitionException**</include>
<include>org/springframework/beans/factory/NoUniqueBeanDefinitionException**</include>
<include>org/springframework/beans/factory/annotation/Autowire**</include>
<include>org/springframework/beans/factory/config/AutowireCapableBeanFactory**</include>
<include>org/springframework/beans/factory/config/DependencyDescriptor**</include>
<include>org/springframework/beans/factory/support/AbstractBeanDefinition**</include>
</includes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
File renamed without changes.
Loading

0 comments on commit 25defd7

Please sign in to comment.