简体   繁体   中英

How to Integrate jar/war containing JAX-RS resource with the Quarkus

I'm new to quarkus and what I'm trying to do is I've two JAX-RS application codebase . I want to package code of both the app as single distribution package.

I want to package it as quarkus app.

To be more clear below is an example for the same .


App1 :(Can be Quarkus app or just JAX-RS war ) Contains Resources-> /rest/greetings

App2 :(Can be Quarkus app or just JAX-RS war ) Contains Resources-> /rest/hello

App3 :(Quarkus app which will be distributed) Contains Resources-> /rest/greetings /rest/hello

Uses App1 and App2 as jar or war dependancy


Basically I want to maintain separate codebase for two apps(you can say modules) and third app which is for packaging and distribution.

Idea behind this is to build app with configurable module like in future if I have 5 modules and I just want to build and deliver app with 3 module I can do it .

I'm using gradle as build tool.

Found a solution that worked for me, Added org.jboss.jandex plugin to my App1 and App2 so it generated jandex index and added both the app as dependency to my App3 so quarkus was able to load these annotated classes on start-up. Doc for more info here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM