[GitHub] [cxf] dependabot[bot] opened a new pull request, #1281: Bump angus-mail from 1.0.0 to 2.0.2

2023-05-22 Thread via GitHub


dependabot[bot] opened a new pull request, #1281:
URL: https://github.com/apache/cxf/pull/1281

   Bumps [angus-mail](https://github.com/eclipse-ee4j/angus-mail) from 1.0.0 to 
2.0.2.
   
   Release notes
   Sourced from https://github.com/eclipse-ee4j/angus-mail/releases";>angus-mail's 
releases.
   
   Angus Mail 2.0.2 Final Release
   Bugfix release of 2.0.x fixing integration with OSGI Mediator.
   New Contributors
   
   https://github.com/mnlipp";>@​mnlipp made their 
first contribution in https://redirect.github.com/eclipse-ee4j/angus-mail/pull/88";>eclipse-ee4j/angus-mail#88
   
   Full Changelog: https://github.com/eclipse-ee4j/angus-mail/compare/2.0.1...2.0.2";>https://github.com/eclipse-ee4j/angus-mail/compare/2.0.1...2.0.2
   Angus Mail 2.0.1 Final Release
   Bugfix release of 2.0.0 fixing compatibility with Java SE 8.
   Provides implementation of the https://jakarta.ee/specifications/mail/2.1/";>Jakarta Mail 2.1 
Specification.
   Full Changelog: https://github.com/eclipse-ee4j/angus-mail/compare/2.0.0...2.0.1";>https://github.com/eclipse-ee4j/angus-mail/compare/2.0.0...2.0.1
   Angus Mail 2.0.0 Final Release
   The 2.0.0 release of the Angus Mail moves everything from the old 
com.sun package namespace to org.eclipse.angus:
   
   Changes Java module names com.sun.mail.* to 
org.eclipse.angus.mail.*
   Changes Java package names com.sun.mail.* to 
org.eclipse.angus.mail.*
   
   Provides implementation of the https://jakarta.ee/specifications/mail/2.1/";>Jakarta Mail 2.1 
Specification.
   Full Changelog: https://github.com/eclipse-ee4j/angus-mail/compare/1.1.0...2.0.0";>https://github.com/eclipse-ee4j/angus-mail/compare/1.1.0...2.0.0
   Angus Mail 1.1.0 Final Release
   Minor release of the Eclipse Angus - Angus Mail project contains new 
enhancements and  bug fixes:
   
   https://redirect.github.com/eclipse-ee4j/angus-mail/issues/12";>#12 - 
Check server identity by default
   https://redirect.github.com/eclipse-ee4j/angus-mail/issues/15";>#15 - 
org.eclipse.angus.mail bundle fails to resolve under OSGi due to mandatory 
'sun.security.util' package
   https://redirect.github.com/eclipse-ee4j/angus-mail/issues/20";>#20 - 
POP3 Protocol error handling can throw NPE
   https://redirect.github.com/eclipse-ee4j/angus-mail/issues/26";>#26 - 
Illegal reflective access when calling idle()
   https://redirect.github.com/eclipse-ee4j/angus-mail/issues/30";>#30 - 
DSN module with jakarta-mail bundle module issue (1)
   https://redirect.github.com/eclipse-ee4j/angus-mail/issues/32";>#32 - 
DSN module with jakarta-mail bundle module issue (2)
   https://redirect.github.com/eclipse-ee4j/angus-mail/issues/33";>#33 - 
Missing 'uses' in jakarta-mail bundle module-info
   https://redirect.github.com/eclipse-ee4j/angus-mail/issues/35";>#35 - 
Add proper tests with JDK9+ modules
   https://redirect.github.com/eclipse-ee4j/angus-mail/issues/47";>#47 - 
support GraalVM native image
   https://redirect.github.com/eclipse-ee4j/angus-mail/issues/56";>#56 - 
Add the ability to provide own scheduled executor for SMTP timeout
   
   Provides implementation of the https://jakarta.ee/specifications/mail/2.1/";>Jakarta Mail 2.1 
Specification.
   New Contributors
   
   https://github.com/egor-ponomarev";>@​egor-ponomarev
   
   Full Changelog: https://github.com/eclipse-ee4j/angus-mail/compare/1.0.0...1.1.0";>https://github.com/eclipse-ee4j/angus-mail/compare/1.0.0...1.1.0
   
   
   
   Commits
   
   https://github.com/eclipse-ee4j/angus-mail/commit/a8eaf3b30ffc11f82366d5f19d1ba64015161c4d";>a8eaf3b
 Prepare release org.eclipse.angus:all:2.0.2
   https://github.com/eclipse-ee4j/angus-mail/commit/dd1efecb34e5526104045d2f50ce45a959abb0f3";>dd1efec
 update build plugins
   https://github.com/eclipse-ee4j/angus-mail/commit/4d06743d957951d204801dc560ae7621a4a62caa";>4d06743
 code cleanup
   https://github.com/eclipse-ee4j/angus-mail/commit/d656ae8bca7dfe990420fcb0e518f2493146c8af";>d656ae8
 add git ignore revs
   https://github.com/eclipse-ee4j/angus-mail/commit/216c5f802cb6002ce9f0c8f227c70b27bc2817b7";>216c5f8
 fix code formatting through the repo
   https://github.com/eclipse-ee4j/angus-mail/commit/633ec4fc1e08a431259ce94785b0c366532c4681";>633ec4f
 Integrate JAF API 2.1.2,
   https://github.com/eclipse-ee4j/angus-mail/commit/7913d5616d47361fce477914c9d1dd51e251289d";>7913d56
 package-info.class major version: 53 https://redirect.github.com/eclipse-ee4j/angus-mail/issues/83";>#83 
(https://redirect.github.com/eclipse-ee4j/angus-mail/issues/84";>#84)
   https://github.com/eclipse-ee4j/angus-mail/commit/db8655b7d5e18d7bd6901f5ccfc4124ea107937a";>db8655b
 https://redirect.github.com/eclipse-ee4j/angus-mail/issues/87";>#87: 
jakarta.mail fails to resolve due to required org.glassfish.hk2.osgireso...
   https://github.com/eclipse-ee4j/angus-mail/commit/56c0f8418755f0edb8d1ba0788ad23ec6d46c203";>56c0f84
 Provider fixes (https://redirect.github.com/eclipse-ee4j/angus-mail/issues/88";>#88)
   https://github.com/eclipse-ee4j

Re: How to setup multiple JAXRS server endpoints

2023-05-22 Thread Andriy Redko
Hi Jean,

The main problem to configure Swagger property in your particular case is that
the server address is not "known" or "introspectable" for Swagger. Intuitively, 
it has to be set manually using basePath to the, essentially, the server 
address 
part:

 - /op/services/accounts
 - /op/services/resources
 - /op/services/dienstverlener

You could read more about other Swagger properties you have asked here: 
https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration#configuration-properties

You definitely need to set usePathBasedConfig to "true" otherwise you will see
the same Swagger specs for all servers. We have a sample here which uses 2 
jaxrs:server
instances: 
https://github.com/apache/cxf/tree/3.6.x-fixes/distribution/src/main/release/samples/jax_rs/description_swagger2_web

Regarding SwaggerUI, I think the value for each of those should be set to, 
respectively: 

 - /op/services/accounts/swagger.yaml
 - /op/services/resources/swagger.yaml
 - /op/services/dienstverlener/swagger.yaml

I believe this is matching your settings already, except the usePathBasedConfig 
part. The example referred
above could be helpful, my apologies if I missed something, there are quite a 
lot of questions :-) The fact that
the generated Swagger specification is empty is unexpected - it should not 
happen when JAX-RS resources are 
properly configured.

Thank you.

Best Regards,
Andriy Redko

JPU>  RE: How to setup multiple JAXRS server endpoints

JPU> Hi Andriy,

JPU> I am not quite understanding how to correctly configure the 
Swagger2Feature.

JPU> Referring to the attached cxf-endpoints configuration I (as a test) created
JPU> 3 JAXRS server instances:

JPU> 1.  A* KmopApiServer* server for the*
JPU> be.dvtm.aeo.op.sodexo.api.KmopApiService* interface, serving requests for
JPU> URI path:
JPU>* **///op/services/accounts*

JPU>‘op’  = root path of the web application

JPU> ‘services’ = servlet path of the CXF-servlet

JPU>   The address of the server is set to ‘/accounts’ and the @Path(…)
JPU>   annotation on the interface class was cleared.

JPU> 2.  A* Kmop**Resources**ApiServer* server for the* be.dvtm.aeo.op.*
JPU> *openapi.**api.Kmop**Recources**ApiService* interface, serving requests for
JPU> URI path:
JPU>* **///op/services/**resources*
JPU> The address of the server is set to ‘/resources’ and the @Path(…)
JPU> annotation on the interface class was cleared.

JPU> 3.  A* Kmop**Dienstverlener**Server* server for the* be.dvtm.aeo.op.*
JPU> *openapi**.api.Kmop**Dienstverlener**Service* interface, serving requests
JPU> for URI path:
JPU>* **///op/services/**dienstverlener*
JPU> The address of the server is set to ‘/dienstverlener’ and the @Path(…)
JPU> annotation on the interface class was cleared.

JPU> For each of these server instances I’ve set the Swagger2Feature with
JPU> configuration as indicated in the attached cxf-endpoints.xml.

JPU> With regard to the configurations for the Swagger2Feature I’ve the
JPU> following questions:

JPU> a)  Referring to *https://cxf.apache.org/docs/swagger2feature.html*
JPU>   could you clarify on
JPU> the following configuration parameters:

JPU> *i. ** basePath* – Is this the path to the CXFServlet context (‘
JPU> /op/services’) or to the JAX-RS server instance (e.g.
JPU> ‘/op/services/accounts’) or still something else? Is it used to resolve
JPU> service classes or is it just for documentation in the swagger file?

JPU> *ii.** resourcePackage* – the description mentions ‘package names’
JPU> while the default mentions ‘service classes’? Service 2 and 3 above are
JPU> within the same package (generated from the same yaml specification that
JPU> included both interfaces).

JPU> *iii.   ** ig**noreRoutes* – is this taken into account when
JPU> scanAllResources=false?

JPU> *iv.** swaggerUiConfig* – What is the correct ‘url’ parameter value
JPU> (cf. question ‘a’)?

JPU> b)  What would be the correct URL to generate a swagger.yaml file for
JPU> each of the above interfaces? Initially I called:

JPU> *i. ** **///op/services/accounts**/swagger.yaml*

JPU> *ii.** **///op/services/**resources/swagger.yaml*

JPU> *iii.   ** **///op/services/**dienstver*
JPU> *lener/swagger.yaml*

JPU>All three requests delivered the same yaml specification, namely the one
JPU>   for interface* KmopApiServer*?

JPU> c)  I tried to debug the processing of the requests under ‘b)’ and this
JPU> is done by the class JAXRSInterceptor#processRequest where the MessageImpl
JPU> object for request “ii.” looks like the one attached. It finds 3 resource
JPU> classes:

JPU>be.dvtm.aeo.op.openapi.api.impl.KmopResourcesApiServiceImpl

JPU>   org.apache.cxf.jaxrs.swagger.Swagger2ApiListingResource

JPU>   org.apache.cxf.jaxrs.swagger.ui.SwaggerUiService

JPU> è   It matches the request to resource* Swagger2ApiLis