Skip to content

Commit 689f5c5

Browse files
authored
Merge pull request #3 from lucee/LDEV-6189
LDEV-6189 fix malformed Require-Bundle symbolic name
2 parents f651a0a + fe0705d commit 689f5c5

8 files changed

Lines changed: 122 additions & 41 deletions

File tree

.github/workflows/main.yml

Lines changed: 71 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,36 @@
11
name: Java CI Combined
22

3-
on: [push, pull_request, workflow_dispatch]
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
inputs:
8+
lucee-versions:
9+
description: 'JSON array of Lucee versions to test'
10+
default: '["7.0/snapshot/light","7.0/stable/light","6.2/snapshot/light","6.2/stable/light"]'
11+
dry-run:
12+
description: 'Dry run - skip deploy to Maven'
13+
type: boolean
14+
default: false
415

516
jobs:
617
setup:
718
runs-on: ubuntu-latest
819
outputs:
920
version: ${{ steps.extract-version.outputs.VERSION }}
21+
lucee-matrix: ${{ steps.set-matrix.outputs.matrix }}
1022
steps:
1123
- name: Checkout repository
12-
uses: actions/checkout@v4
24+
uses: actions/checkout@v6
1325

1426
- name: Set up JDK 11
15-
uses: actions/setup-java@v4
27+
uses: actions/setup-java@v5
1628
with:
1729
distribution: 'temurin'
1830
java-version: '11'
1931

2032
- name: Cache Maven packages
21-
uses: actions/cache@v4
33+
uses: actions/cache@v5
2234
with:
2335
path: ~/.m2
2436
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -29,10 +41,20 @@ jobs:
2941
id: extract-version
3042
run: |
3143
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
32-
echo "::set-output name=VERSION::$VERSION"
44+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
45+
46+
- name: Set Lucee test matrix
47+
id: set-matrix
48+
run: |
49+
DEFAULT='["7.0/snapshot/light","7.0/stable/light","6.2/snapshot/light","6.2/stable/light"]'
50+
MATRIX="${{ inputs.lucee-versions || '' }}"
51+
if [ -z "$MATRIX" ]; then
52+
MATRIX="$DEFAULT"
53+
fi
54+
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
3355
3456
- name: Cache Lucee files
35-
uses: actions/cache@v4
57+
uses: actions/cache@v5
3658
with:
3759
path: ~/work/_actions/lucee/script-runner/main/lucee-download-cache
3860
key: lucee-downloads
@@ -43,68 +65,92 @@ jobs:
4365
env:
4466
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
4567

46-
build-and-test:
68+
build:
4769
runs-on: ubuntu-latest
48-
needs: setup
49-
env:
50-
LUCEE_TEST_VERSIONS_JAKARTA: ${{ vars.LUCEE_TEST_VERSIONS_JAKARTA }}
51-
strategy:
52-
matrix:
53-
lucee: ${{ fromJSON(vars.LUCEE_TEST_VERSIONS_JAKARTA) }}
5470
steps:
55-
- uses: actions/checkout@v4
71+
- uses: actions/checkout@v6
5672

5773
- name: Set up JDK 11
58-
uses: actions/setup-java@v4
74+
uses: actions/setup-java@v5
5975
with:
6076
java-version: '11'
6177
distribution: 'adopt'
6278

79+
- name: Cache Maven packages
80+
uses: actions/cache@v5
81+
with:
82+
path: ~/.m2
83+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
84+
restore-keys: |
85+
${{ runner.os }}-maven-
86+
6387
- name: Build and Install with Maven
6488
run: |
6589
echo "------- Maven Install -------";
6690
mvn -B -e -f pom.xml clean install
6791
6892
- name: Upload Artifact
69-
uses: actions/upload-artifact@v4
93+
uses: actions/upload-artifact@v7
7094
with:
71-
name: websocketclient-lex-${{ matrix.lucee.version }}
95+
name: websocketclient-lex
7296
path: target/*.lex
7397

98+
test:
99+
runs-on: ubuntu-latest
100+
needs: [setup, build]
101+
strategy:
102+
fail-fast: false
103+
matrix:
104+
lucee: ${{ fromJSON(needs.setup.outputs.lucee-matrix) }}
105+
java: [ 11, 21 ]
106+
steps:
107+
- uses: actions/checkout@v6
108+
109+
- name: Download Artifact
110+
uses: actions/download-artifact@v8
111+
with:
112+
name: websocketclient-lex
113+
path: target
114+
74115
- name: Checkout Lucee
75-
uses: actions/checkout@v4
116+
uses: actions/checkout@v6
76117
with:
77118
repository: lucee/lucee
78119
path: lucee
79120

121+
- name: Set up JDK ${{ matrix.java }}
122+
uses: actions/setup-java@v5
123+
with:
124+
java-version: ${{ matrix.java }}
125+
distribution: 'adopt'
126+
80127
- name: Run Lucee Test Suite
81128
uses: lucee/script-runner@main
82129
with:
83130
webroot: ${{ github.workspace }}/lucee/test
84131
execute: /bootstrap-tests.cfm
85-
luceeVersion: ${{ matrix.lucee.version }}
86-
luceeVersionQuery: ${{ matrix.lucee.query }}
132+
luceeVersion: ${{ matrix.lucee }}
87133
extensionDir: ${{ github.workspace }}/target
88134
env:
89135
testLabels: websocketclient
90136
testAdditional: ${{ github.workspace }}/tests
91137

92138
deploy:
93139
runs-on: ubuntu-latest
94-
needs: [build-and-test]
95-
if: always() && needs.build-and-test.result == 'success'
140+
needs: [setup, test]
141+
if: always() && needs.test.result == 'success' && github.ref == 'refs/heads/master' && !inputs.dry-run
96142
steps:
97143
- name: Checkout repository
98-
uses: actions/checkout@v4
144+
uses: actions/checkout@v6
99145

100146
- name: Set up JDK 11
101-
uses: actions/setup-java@v4
147+
uses: actions/setup-java@v5
102148
with:
103149
distribution: 'temurin'
104150
java-version: '11'
105151

106152
- name: Cache Maven packages
107-
uses: actions/cache@v4
153+
uses: actions/cache@v5
108154
with:
109155
path: ~/.m2
110156
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ target
99
target/*
1010
*.lock
1111
*.DS_Store
12-
/cache
12+
/cache
13+
/.claude
14+
/.vscode

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Changelog
2+
3+
## 2.3.0.9
4+
5+
- [LDEV-6189](https://luceeserver.atlassian.net/browse/LDEV-6189) — fix malformed `Require-Bundle` symbolic name in MANIFEST.MF, was using Maven coordinates instead of OSGi `Bundle-SymbolicName`, causing flaky OSGi resolution failures on Lucee 7.0 cold start
6+
7+
## 2.3.0.8
8+
9+
- [LDEV-6100](https://luceeserver.atlassian.net/browse/LDEV-6100) — Jakarta compatibility, use reflection for `createPageContext`
10+
- Add README
11+
- Initial Maven build
12+
13+
## 2.3.0.7
14+
15+
- Switch to Maven build
16+
- Add Sonatype deployment
17+
18+
## 1.0.0.0 (2017-10-25)
19+
20+
- Initial commit

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>org.lucee</groupId>
66
<artifactId>websocket-client-extension</artifactId>
7-
<version>2.3.0.8-SNAPSHOT</version>
7+
<version>2.3.0.9-SNAPSHOT</version>
88
<packaging>pom</packaging>
99
<name>WebSockets Client Extension</name>
1010

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
Manifest-Version: 1.0
22
Export-Package: org.lucee.extension.function
3-
Import-Package: com.neovisionaries.ws.client
4-
Require-Bundle: com.neovisionaries:nv-websocket-client;bundle-version=2.3.0
3+
Require-Bundle: com.neovisionaries.ws.client;bundle-version=2.3.0
54
Bundle-ManifestVersion: 2

tests/TestPlaceholder.cfc

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/WebSocketClientTest.cfc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
component extends="org.lucee.cfml.test.LuceeTestCase" labels="websocketclient" {
2+
3+
function testCreateWebSocketClientLoads() {
4+
try {
5+
ws = CreateWebSocketClient( "ws://localhost:9999/nope", new WebSocketListener() );
6+
fail( "Expected connection error" );
7+
}
8+
catch ( any e ) {
9+
// connection refused is expected - means the class loaded and OSGi resolved OK
10+
expect( e.message ).notToInclude( "osgi.wiring.package" );
11+
expect( e.message ).notToInclude( "Unable to resolve" );
12+
}
13+
}
14+
15+
}

tests/WebSocketListener.cfc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
component {
2+
3+
function onMessage( message ) {
4+
systemOutput( "onMessage: " & message, true );
5+
}
6+
7+
function onError( type, cause ) {
8+
systemOutput( "onError: " & type, true );
9+
}
10+
11+
}

0 commit comments

Comments
 (0)