Skip to content

Commit 2614631

Browse files
committed
Add OSGi Bundle metadata
Apache Aries SPI Fly is used to provide runtime loading of HTTP clients. Fixes #607
1 parent a34c74c commit 2614631

File tree

12 files changed

+202
-10
lines changed

12 files changed

+202
-10
lines changed

core/auth/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,5 @@
113113
<scope>test</scope>
114114
</dependency>
115115
</dependencies>
116-
</project>
116+
117+
</project>

core/aws-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,4 @@
181181
</build>
182182

183183

184-
</project>
184+
</project>

core/pom.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,31 @@
4444
<module>profiles</module>
4545
<module>regions</module>
4646
</modules>
47+
48+
<build>
49+
<plugins>
50+
<plugin>
51+
<groupId>org.apache.maven.plugins</groupId>
52+
<artifactId>maven-jar-plugin</artifactId>
53+
<configuration>
54+
<archive>
55+
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
56+
</archive>
57+
</configuration>
58+
</plugin>
59+
<plugin>
60+
<groupId>org.apache.felix</groupId>
61+
<artifactId>maven-bundle-plugin</artifactId>
62+
<executions>
63+
<execution>
64+
<id>bundle-manifest</id>
65+
<phase>process-classes</phase>
66+
<goals>
67+
<goal>manifest</goal>
68+
</goals>
69+
</execution>
70+
</executions>
71+
</plugin>
72+
</plugins>
73+
</build>
4774
</project>

core/regions/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
~ Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4-
~
4+
~
55
~ Licensed under the Apache License, Version 2.0 (the "License").
66
~ You may not use this file except in compliance with the License.
77
~ A copy of the License is located at
8-
~
8+
~
99
~ http://aws.amazon.com/apache2.0
10-
~
10+
~
1111
~ or in the "license" file accompanying this file. This file is distributed
1212
~ on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
1313
~ express or implied. See the License for the specific language governing
@@ -94,4 +94,4 @@
9494
<scope>test</scope>
9595
</dependency>
9696
</dependencies>
97-
</project>
97+
</project>

flow/pom.xml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,31 @@
5656
<finalName>aws-flow-java</finalName>
5757
</configuration>
5858
</plugin>
59+
60+
<plugin>
61+
<groupId>org.apache.maven.plugins</groupId>
62+
<artifactId>maven-jar-plugin</artifactId>
63+
<version>3.1.0</version>
64+
<configuration>
65+
<archive>
66+
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
67+
</archive>
68+
</configuration>
69+
</plugin>
70+
<plugin>
71+
<groupId>org.apache.felix</groupId>
72+
<artifactId>maven-bundle-plugin</artifactId>
73+
<version>3.5.1</version>
74+
<executions>
75+
<execution>
76+
<id>bundle-manifest</id>
77+
<phase>process-classes</phase>
78+
<goals>
79+
<goal>manifest</goal>
80+
</goals>
81+
</execution>
82+
</executions>
83+
</plugin>
5984
</plugins>
6085
</build>
6186

@@ -73,4 +98,4 @@
7398
<scope>test</scope>
7499
</dependency>
75100
</dependencies>
76-
</project>
101+
</project>

http-client-spi/pom.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,31 @@
6161
</dependency>
6262
</dependencies>
6363

64+
<build>
65+
<plugins>
66+
<plugin>
67+
<groupId>org.apache.maven.plugins</groupId>
68+
<artifactId>maven-jar-plugin</artifactId>
69+
<configuration>
70+
<archive>
71+
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
72+
</archive>
73+
</configuration>
74+
</plugin>
75+
<plugin>
76+
<groupId>org.apache.felix</groupId>
77+
<artifactId>maven-bundle-plugin</artifactId>
78+
<executions>
79+
<execution>
80+
<id>bundle-manifest</id>
81+
<phase>process-classes</phase>
82+
<goals>
83+
<goal>manifest</goal>
84+
</goals>
85+
</execution>
86+
</executions>
87+
</plugin>
88+
</plugins>
89+
</build>
90+
6491
</project>

http-clients/apache-client/pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,19 @@
7979
</dependency>
8080
</dependencies>
8181

82+
<build>
83+
<plugins>
84+
<plugin>
85+
<groupId>org.apache.felix</groupId>
86+
<artifactId>maven-bundle-plugin</artifactId>
87+
<configuration>
88+
<instructions>
89+
<Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"</Require-Capability>
90+
<Provide-Capability>osgi.serviceloader; osgi.serviceloader=software.amazon.awssdk.http.SdkHttpService</Provide-Capability>
91+
</instructions>
92+
</configuration>
93+
</plugin>
94+
</plugins>
95+
</build>
96+
8297
</project>

http-clients/netty-nio-client/pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,16 @@
156156
<groupId>org.codehaus.mojo</groupId>
157157
<artifactId>build-helper-maven-plugin</artifactId>
158158
</plugin>
159+
<plugin>
160+
<groupId>org.apache.felix</groupId>
161+
<artifactId>maven-bundle-plugin</artifactId>
162+
<configuration>
163+
<instructions>
164+
<Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"</Require-Capability>
165+
<Provide-Capability>osgi.serviceloader; osgi.serviceloader=software.amazon.awssdk.http.SdkAsyncHttpService</Provide-Capability>
166+
</instructions>
167+
</configuration>
168+
</plugin>
159169
</plugins>
160170
</build>
161171
</project>

http-clients/pom.xml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,30 @@
3939
<module>url-connection-client</module>
4040
</modules>
4141

42-
43-
</project>
42+
<build>
43+
<plugins>
44+
<plugin>
45+
<groupId>org.apache.maven.plugins</groupId>
46+
<artifactId>maven-jar-plugin</artifactId>
47+
<configuration>
48+
<archive>
49+
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
50+
</archive>
51+
</configuration>
52+
</plugin>
53+
<plugin>
54+
<groupId>org.apache.felix</groupId>
55+
<artifactId>maven-bundle-plugin</artifactId>
56+
<executions>
57+
<execution>
58+
<id>bundle-manifest</id>
59+
<phase>process-classes</phase>
60+
<goals>
61+
<goal>manifest</goal>
62+
</goals>
63+
</execution>
64+
</executions>
65+
</plugin>
66+
</plugins>
67+
</build>
68+
</project>

pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@
112112
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
113113
<maven-checkstyle-plugin.version>2.17</maven-checkstyle-plugin.version>
114114
<maven-failsafe-plugin.version>2.19.1</maven-failsafe-plugin.version>
115+
<maven-jar-plugin.version>3.1.0</maven-jar-plugin.version>
116+
<maven-bundle-plugin.version>3.5.1</maven-bundle-plugin.version>
115117
<maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version>
116118
<maven-dependency-plugin.version>3.1.1</maven-dependency-plugin.version>
117119
<checkstyle.version>7.8.2</checkstyle.version>
@@ -523,6 +525,16 @@
523525
<failOnViolation>true</failOnViolation>
524526
</configuration>
525527
</plugin>
528+
<plugin>
529+
<groupId>org.apache.maven.plugins</groupId>
530+
<artifactId>maven-jar-plugin</artifactId>
531+
<version>${maven-jar-plugin.version}</version>
532+
</plugin>
533+
<plugin>
534+
<groupId>org.apache.felix</groupId>
535+
<artifactId>maven-bundle-plugin</artifactId>
536+
<version>${maven-bundle-plugin.version}</version>
537+
</plugin>
526538
</plugins>
527539
</pluginManagement>
528540

services/pom.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,28 @@
308308
<groupId>org.codehaus.mojo</groupId>
309309
<artifactId>build-helper-maven-plugin</artifactId>
310310
</plugin>
311+
<plugin>
312+
<groupId>org.apache.maven.plugins</groupId>
313+
<artifactId>maven-jar-plugin</artifactId>
314+
<configuration>
315+
<archive>
316+
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
317+
</archive>
318+
</configuration>
319+
</plugin>
320+
<plugin>
321+
<groupId>org.apache.felix</groupId>
322+
<artifactId>maven-bundle-plugin</artifactId>
323+
<executions>
324+
<execution>
325+
<id>bundle-manifest</id>
326+
<phase>process-classes</phase>
327+
<goals>
328+
<goal>manifest</goal>
329+
</goals>
330+
</execution>
331+
</executions>
332+
</plugin>
311333
</plugins>
312334
</build>
313335

utils/pom.xml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,32 @@
7373
<scope>test</scope>
7474
</dependency>
7575
</dependencies>
76-
</project>
76+
77+
<build>
78+
<plugins>
79+
<plugin>
80+
<groupId>org.apache.maven.plugins</groupId>
81+
<artifactId>maven-jar-plugin</artifactId>
82+
<configuration>
83+
<archive>
84+
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
85+
</archive>
86+
</configuration>
87+
</plugin>
88+
<plugin>
89+
<groupId>org.apache.felix</groupId>
90+
<artifactId>maven-bundle-plugin</artifactId>
91+
<executions>
92+
<execution>
93+
<id>bundle-manifest</id>
94+
<phase>process-classes</phase>
95+
<goals>
96+
<goal>manifest</goal>
97+
</goals>
98+
</execution>
99+
</executions>
100+
</plugin>
101+
</plugins>
102+
</build>
103+
104+
</project>

0 commit comments

Comments
 (0)