Separating RESTEasy Spring And Microprofile Components Into Independent Subprojects.
By Wei Nan Li | July 29, 2021
Currently we are doing the task of separating RESTEasy Spring and Microprofile components into independent sub-projects, and here are the sub-projects we are working on:
- https://github.com/resteasy/resteasy-spring
- https://github.com/resteasy/resteasy-microprofile
There are several reasons to do this:
- These Spring and Microprofile components are relatively independent from the main project, so moving them into their separate sub-projects makes them more independent and make their release cycles more flexible.
- The main RESTEasy project is under the process of migrating from JavaEE namespaces to JakartaEE namespaces, and these Microprofile and Spring components have some impacts on the work, so it is better maintaining them into their separate projects.
- Currently there are dependencies in the main project just maintained for these components. So making them as independent sub-projects can also move out these outside dependencies into their sub-projects, which release the burden of the main project maintaining work, and also increase the speed of main project build cycle.
Currently the work in progress we are doing:
- Created
resteasy-spring
andresteasy-microprofile
sub-projects(link listed above). resteasy 4.7.1.Final
is released: Release 4.7.1.Final · resteasy/resteasy · GitHubresteasy-spring 1.0.0.Final
is released: Release v1.0.0.Final · resteasy/resteasy-spring · GitHub
There are some notes to take in above work:
- The reason to release
resteasy 4.7.1.Final
is to upload all the artifacts inside the main project. For some historical reasons we didn’t upload all the artifacts in previous versions(arquillian-utils
for example). But as Spring and Microprofile components are moving into their own sub-projects, these missing uploaded components are used as dependencies. Besides there maybe some other projects may need them, so from4.7.1.Final
and moving forward we will upload all the artifacts in the RESTEasy main project. resteasy-spring 1.0.0.Final
is released and already uploaded to maven repo: Maven Repository: org.jboss.resteasy.spring. We haven’t changed the package names or code structures inside these components, but just rename thegroupId
inpom.xml
, which changes fromorg.jboss.resteasy
toorg.jboss.resteasy.spring
.resteasy-microprofile
is not yet released. Componentsresteasy-client-microprofile-base
andresteasy-client-microprofile
have been moved into this project and renamedrest-client-base
andrest-client
respectively. Their package names and code structures remain the same. The groupId for the components has changed fromorg.jboss.resteasy
toorg.jboss.resteasy.microprofile
. A BOM file is provided for this project. It’s GAV isorg.jboss.resteasy.microprofile:resteasy-microprofile-bom
.
In addition, we are currently working on using Galleon Feature Pack solution to replace the current jboss-modules structure. The reason to do this is that the current jboss-module
solution for WildFly integration is too heavy and not flexible enough, so Galleon is a better approach for WildFly integration(more details of Galleon can see this article: Ship Your WildFly Additions via Galleon Feature Packs). There some work in progress for this task:
- GitHub - jamezp/resteasy-microprofile at feature-pack
- re-enable tests by liweinan · Pull Request #5 · resteasy/resteasy-spring · GitHub
In the future we plan to use this solution for the whole RESTEasy project.
This article does not cover all the details we are doing, for example we need to update the project docuemnts, announcing these changes, and cover more code and test changes.
Let’s move on!
Useful Links
YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of YourKit Java Profiler, YourKit .NET Profiler, and YourKit YouMonitor