Skip to content

Commit b81f1b5

Browse files
authored
Use SN bom (#1433)
* Support sn bom * Add github maven package * Add test related dependencies * Add jar instead of nar package to image
1 parent 9e686d4 commit b81f1b5

File tree

7 files changed

+62
-73
lines changed

7 files changed

+62
-73
lines changed

.github/workflows/pr-test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ jobs:
3434
docker rmi $(docker images -q) -f
3535
df -h
3636
37+
- name: Configure Maven Settings
38+
39+
with:
40+
servers: '[{"id": "github", "username": "streamnativebot", "password": "${{ secrets.SNBOT_GITHUB_TOKEN }}"}]'
41+
3742
- name: License check
3843
run: mvn license:check
3944

amqp-client-auth/pom.xml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,6 @@
3838
<artifactId>amqp-client</artifactId>
3939
<scope>provided</scope>
4040
</dependency>
41-
<dependency>
42-
<groupId>io.jsonwebtoken</groupId>
43-
<artifactId>jjwt-api</artifactId>
44-
<version>${jjwt.version}</version>
45-
</dependency>
46-
<dependency>
47-
<groupId>io.jsonwebtoken</groupId>
48-
<artifactId>jjwt-impl</artifactId>
49-
<version>${jjwt.version}</version>
50-
<scope>runtime</scope>
51-
</dependency>
41+
5242
</dependencies>
5343
</project>

amqp-impl/pom.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,21 @@
3131

3232
<!-- include the dependencies -->
3333
<dependencies>
34-
34+
<dependency>
35+
<groupId>io.streamnative</groupId>
36+
<artifactId>pulsar-broker</artifactId>
37+
<scope>provided</scope>
38+
</dependency>
39+
<dependency>
40+
<groupId>io.streamnative</groupId>
41+
<artifactId>pulsar-broker</artifactId>
42+
<version>${pulsar.version}</version>
43+
<type>test-jar</type>
44+
<scope>test</scope>
45+
</dependency>
3546
<dependency>
3647
<groupId>org.apache.qpid</groupId>
3748
<artifactId>qpid-broker-core</artifactId>
38-
<version>${qpid-protocol-plugin.version}</version>
3949
<exclusions>
4050
<exclusion>
4151
<groupId>com.fasterxml.jackson.core</groupId>
@@ -51,7 +61,6 @@
5161
<dependency>
5262
<groupId>org.apache.qpid</groupId>
5363
<artifactId>qpid-broker-plugins-amqp-0-8-protocol</artifactId>
54-
<version>${qpid-protocol-plugin.version}</version>
5564
</dependency>
5665

5766
<dependency>

pom.xml

Lines changed: 16 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@
4040
<project.compiler.release>${maven.compiler.target}</project.compiler.release>
4141

4242
<!-- dependencies -->
43-
<pulsar.version>4.0.0-ursa-10-SNAPSHOT</pulsar.version>
43+
<pulsar.version>4.1.0-SNAPSHOT</pulsar.version>
4444
<qpid-protocol-plugin.version>8.0.0</qpid-protocol-plugin.version>
4545
<rabbitmq.version>5.8.0</rabbitmq.version>
46+
<sn.bom.verison>4.1.0-SNAPSHOT</sn.bom.verison>
4647

4748
<!-- test dependencies -->
4849
<qpid-client-version>6.4.0</qpid-client-version>
@@ -51,6 +52,7 @@
5152
<testng.version>6.14.3</testng.version>
5253
<awaitility.version>4.2.0</awaitility.version>
5354
<assertj.version>3.15.0</assertj.version>
55+
<mockito.version>5.12.0</mockito.version>
5456

5557
<!-- plugin dependencies -->
5658
<spotbugs-annotations.version>3.1.8</spotbugs-annotations.version>
@@ -82,56 +84,19 @@
8284
<!-- dependency definitions -->
8385
<dependencyManagement>
8486
<dependencies>
85-
8687
<dependency>
8788
<groupId>io.streamnative</groupId>
88-
<artifactId>pulsar</artifactId>
89-
<version>${pulsar.version}</version>
90-
<type>pom</type>
89+
<artifactId>streamnative-bom</artifactId>
90+
<version>4.1.0-SNAPSHOT</version>
9191
<scope>import</scope>
92-
</dependency>
93-
94-
<dependency>
95-
<groupId>io.streamnative</groupId>
96-
<artifactId>pulsar-broker</artifactId>
97-
<version>${pulsar.version}</version>
98-
</dependency>
99-
100-
<dependency>
101-
<groupId>io.streamnative</groupId>
102-
<artifactId>pulsar-broker</artifactId>
103-
<version>${pulsar.version}</version>
104-
<type>test-jar</type>
92+
<type>pom</type>
10593
</dependency>
10694

10795
<dependency>
10896
<groupId>io.streamnative</groupId>
10997
<artifactId>testmocks</artifactId>
11098
<version>${pulsar.version}</version>
111-
</dependency>
112-
113-
<dependency>
114-
<groupId>com.rabbitmq</groupId>
115-
<artifactId>amqp-client</artifactId>
116-
<version>${rabbitmq.version}</version>
117-
</dependency>
118-
119-
<dependency>
120-
<groupId>org.apache.qpid</groupId>
121-
<artifactId>qpid-client</artifactId>
122-
<version>${qpid-client-version}</version>
123-
</dependency>
124-
125-
<dependency>
126-
<groupId>org.apache.geronimo.specs</groupId>
127-
<artifactId>geronimo-jms_1.1_spec</artifactId>
128-
<version>${geronimo-jms-version}</version>
129-
</dependency>
130-
131-
<dependency>
132-
<groupId>org.apache.qpid</groupId>
133-
<artifactId>qpid-test-utils</artifactId>
134-
<version>${qpid-protocol-plugin.version}</version>
99+
<scope>test</scope>
135100
</dependency>
136101

137102
<dependency>
@@ -165,40 +130,30 @@
165130
</dependency>
166131

167132
<!-- dependencies for tests -->
168-
<dependency>
169-
<groupId>io.streamnative</groupId>
170-
<artifactId>pulsar-broker</artifactId>
171-
<type>test-jar</type>
172-
<scope>test</scope>
173-
</dependency>
174-
175133
<dependency>
176134
<groupId>io.streamnative</groupId>
177135
<artifactId>testmocks</artifactId>
178136
<scope>test</scope>
179137
</dependency>
180138

181-
<dependency>
182-
<groupId>org.testng</groupId>
183-
<artifactId>testng</artifactId>
184-
<scope>test</scope>
185-
</dependency>
186-
187139
<dependency>
188140
<groupId>org.mockito</groupId>
189141
<artifactId>mockito-core</artifactId>
142+
<version>${mockito.version}</version>
190143
<scope>test</scope>
191144
</dependency>
192145

193146
<dependency>
194147
<groupId>org.awaitility</groupId>
195148
<artifactId>awaitility</artifactId>
149+
<version>${awaitility.version}</version>
196150
<scope>test</scope>
197151
</dependency>
198152

199153
<dependency>
200154
<groupId>org.assertj</groupId>
201155
<artifactId>assertj-core</artifactId>
156+
<version>${assertj.version}</version>
202157
<scope>test</scope>
203158
</dependency>
204159

@@ -282,7 +237,7 @@
282237
<artifactId>maven-surefire-plugin</artifactId>
283238
<version>${maven-surefire-plugin.version}</version>
284239
<configuration>
285-
<argLine> -Xmx2G
240+
<argLine>-Xmx2G
286241
-Dpulsar.allocator.pooled=false
287242
-Dpulsar.allocator.leak_detection=Advanced
288243
-Dlog4j.configurationFile="log4j2.xml"
@@ -385,8 +340,11 @@
385340
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
386341
</repository>
387342
<repository>
388-
<id>ossrh</id>
389-
<url>https://s01.oss.sonatype.org/service/local/repositories/0/content</url>
343+
<id>github</id>
344+
<url>https://maven.pkg.github.com/streamnative/streamnative-bom</url>
345+
<snapshots>
346+
<enabled>true</enabled>
347+
</snapshots>
390348
</repository>
391349
</repositories>
392350

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ ASSETS_DIR=release
2828
mkdir $ASSETS_DIR
2929

3030
mvn clean install -DskipTests -Dmaven.wagon.http.retryHandler.count=3
31-
mv amqp-impl/target/pulsar-protocol-handler-amqp-*.nar ./$ASSETS_DIR
31+
mv amqp-impl/target/pulsar-protocol-handler-amqp-*.jar ./$ASSETS_DIR/amqp-impl/target/pulsar-protocol-handler-amqp-"${version}".nar
3232
cp README.md ./$ASSETS_DIR/pulsar-protocol-handler-amqp-readme.md

tests-qpid-jms-client/pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@
2828
<name>StreamNative :: Pulsar Protocol Handler :: AoP Qpid-JMS Client Tests</name>
2929

3030
<dependencies>
31+
<dependency>
32+
<groupId>io.streamnative</groupId>
33+
<artifactId>pulsar-broker</artifactId>
34+
<version>${pulsar.version}</version>
35+
<type>test-jar</type>
36+
<scope>test</scope>
37+
</dependency>
38+
3139
<!-- test dependencies -->
3240
<dependency>
3341
<groupId>io.streamnative.pulsar.handlers</groupId>
@@ -36,6 +44,11 @@
3644
<scope>test</scope>
3745
</dependency>
3846

47+
<dependency>
48+
<groupId>org.apache.qpid</groupId>
49+
<artifactId>qpid-broker-core</artifactId>
50+
<scope>test</scope>
51+
</dependency>
3952
<!-- jms test -->
4053
<dependency>
4154
<groupId>org.apache.qpid</groupId>

tests/pom.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,20 @@
3131
<description>Tests for AMQP on Pulsar</description>
3232

3333
<dependencies>
34+
<dependency>
35+
<groupId>io.streamnative</groupId>
36+
<artifactId>pulsar-broker</artifactId>
37+
<version>${pulsar.version}</version>
38+
<type>test-jar</type>
39+
<scope>test</scope>
40+
</dependency>
41+
42+
<dependency>
43+
<groupId>io.streamnative</groupId>
44+
<artifactId>pulsar-broker</artifactId>
45+
<scope>test</scope>
46+
</dependency>
47+
3448
<!-- test dependencies -->
3549
<dependency>
3650
<groupId>io.streamnative.pulsar.handlers</groupId>

0 commit comments

Comments
 (0)