[ 
https://issues.apache.org/jira/browse/FELIX-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17182788#comment-17182788
 ] 

Eric Norman edited comment on FELIX-5311 at 8/23/20, 5:34 PM:
--------------------------------------------------------------

[~cziegeler] Well, that was my original first approach.  For example, I first 
tried the following instructions to the maven bundle plugin:

 
{code:java}
<!-- inline contents of META-INF/services folders from all dependencies -->
<Embed-Dependency>*;inline=META-INF/services/*</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive> 
{code}
But that doesn't work right because both the jetty-http and the 
jetty-http2-hpack artifacts contain a file with the same file path 
(META-INF/services/org.eclipse.jetty.http.HttpFieldPreEncoder) and the build 
output contains just the content of one of those files instead of a 
concat/merge of the file contents together.  That was the only reason I created 
the custom groovy code to merge the contents of those two files together before 
including the output in the jar file.  This complies with the guidance from the 
ServiceLoader javadocs at: 
[https://docs.oracle.com/javase/8/docs/api/java/util/ServiceLoader.html]

Jetty would not function correctly if the both of the 
org.eclipse.jetty.http.HttpFieldPreEncoder services were not declared in the 
META-INF/services/org.eclipse.jetty.http.HttpFieldPreEncoder file.

Are you aware of some undocumented or existing way to embed dependencies while 
doing a merge/concat of same name files at the same time?


was (Author: enorman):
[~cziegeler] Well, that was my original first approach.  For example, I first 
tried the following instructions to the maven bundle plugin:

 
{code:java}
<!-- inline contents of META-INF/services folders from all dependencies -->
<Embed-Dependency>*;inline=META-INF/services/*</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive> 
{code}
But that doesn't work right because both the jetty-http and the 
jetty-http2-hpack artifacts contain a file with the same file path 
(META-INF/services/org.eclipse.jetty.http.HttpFieldPreEncoder) and the build 
output contains just the content of one of those files instead of a 
concat/merge of the file contents together.  That was the only reason I created 
the custom groovy code to merge the contents of those two files together before 
including the output in the jar file.  This complies with the guidance from the 
ServiceLoader javadocs at: 
[https://docs.oracle.com/javase/8/docs/api/java/util/ServiceLoader.html]

Jetty would not function correctly if the both of the 
org.eclipse.jetty.http.HttpFieldPreEncoder services were not declared in the 
META-INF/services/org.eclipse.jetty.http.HttpFieldPreEncoder file.

Are you aware of some undocumented existing way to embed dependencies while 
doing a merge/concat at the same time?

> Allow Usage of HTTP/2 with Jetty Felix Http Service
> ---------------------------------------------------
>
>                 Key: FELIX-5311
>                 URL: https://issues.apache.org/jira/browse/FELIX-5311
>             Project: Felix
>          Issue Type: Improvement
>          Components: HTTP Service
>    Affects Versions: http.jetty-3.2.0, http.jetty-3.2.2
>            Reporter: Carsten Tolkmit
>            Assignee: Carsten Ziegeler
>            Priority: Major
>
> Currently it seems impossible to me (by looking at the Sourcecode of 
> JettyService) to enable HTTP/2 in Jetty. 
> There should be a fitting configuration property to enable HTTP/2 connectors 
> for HTTPS as well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to