<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Can I define REST API endpoint in a jar file?</title><link>https://answers.axonivy.com/questions/4470/can-i-define-rest-api-endpoint-in-a-jar-file</link><description>&lt;p&gt;Hello everyone,&lt;/p&gt;
&lt;p&gt;I have a &lt;strong&gt;maven project&lt;/strong&gt; (&lt;strong&gt;jar&lt;/strong&gt;), for example, my-api. In this project, I defined a REST API endpoint:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;@Path("/v1/dossiers")
public class MyAPI {

    @Path("/")
    public Response getDossiers() {
        // our logic
        return response;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I have an &lt;strong&gt;ivy project&lt;/strong&gt;, for example, my-app and I added the jar dependency &lt;strong&gt;my-api&lt;/strong&gt;. I can't access the API above from client&lt;/p&gt;
&lt;p&gt;But, I tried to create a &lt;strong&gt;my-api&lt;/strong&gt; as an ivy project (&lt;strong&gt;iar&lt;/strong&gt;) and added it as an iar dependency my-app. It works well.&lt;/p&gt;
&lt;p&gt;My question is: Can I define the REST API endpoint in a jar file? If yes, how can I do that?&lt;/p&gt;
&lt;p&gt;P/s: We're using Ivy 7.0.11&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/4470/can-i-define-rest-api-endpoint-in-a-jar-file" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 26 Mar 2020 03:59:24 -0400</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/4470/can-i-define-rest-api-endpoint-in-a-jar-file/4472</link><description>&lt;p&gt;As of today you can't. Since we only load JAX-RS annotated resources from the binary class output dir (classes). &lt;/p&gt;
&lt;p&gt;But I think we could easily allow such contributions in the future. Please ask and negotiate the priority of this change request via support.axonivy.com.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Thu, 26 Mar 2020 03:59:24 -0400</pubDate><guid>https://answers.axonivy.com/questions/4470/can-i-define-rest-api-endpoint-in-a-jar-file/4472</guid></item></channel></rss>