Skip to content

Commit e92f7da

Browse files
committed
# Conflicts: # pom.xml
2 parents 017b314 + 49bc03d commit e92f7da

13 files changed

Lines changed: 152 additions & 27 deletions

File tree

.github/workflows/main.yml

Lines changed: 59 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
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
1224
uses: actions/checkout@v4
@@ -31,6 +43,16 @@ jobs:
3143
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
3244
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
3345
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
55+
3456
- name: Cache Lucee files
3557
uses: actions/cache@v4
3658
with:
@@ -43,23 +65,9 @@ jobs:
4365
env:
4466
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
4567

46-
build-and-test:
68+
build:
4769
runs-on: ubuntu-latest
4870
needs: setup
49-
env:
50-
testLabels: image
51-
testAdditional: ${{ github.workspace }}/tests
52-
LUCEE_TEST_VERSIONS_JAKARTA: ${{ vars.LUCEE_TEST_VERSIONS_JAKARTA }}
53-
strategy:
54-
fail-fast: false
55-
matrix:
56-
lucee: ${{ fromJSON(vars.LUCEE_TEST_VERSIONS_JAKARTA) }}
57-
java: [ 11, 21 ]
58-
services:
59-
minio:
60-
image: fclairamb/minio-github-actions
61-
ports:
62-
- 9000:9000
6371
steps:
6472
- uses: actions/checkout@v4
6573

@@ -69,6 +77,14 @@ jobs:
6977
java-version: '11'
7078
distribution: 'adopt'
7179

80+
- name: Cache Maven packages
81+
uses: actions/cache@v4
82+
with:
83+
path: ~/.m2
84+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
85+
restore-keys: |
86+
${{ runner.os }}-maven-
87+
7288
- name: Build and Install with Maven
7389
run: |
7490
echo "------- Maven Install -------";
@@ -77,9 +93,31 @@ jobs:
7793
- name: Upload Artifact
7894
uses: actions/upload-artifact@v4
7995
with:
80-
name: image-lex-${{ matrix.lucee.version }}-${{ matrix.java }}
96+
name: image-lex
8197
path: target/*.lex
8298

99+
test:
100+
runs-on: ubuntu-latest
101+
needs: [setup, build]
102+
strategy:
103+
fail-fast: false
104+
matrix:
105+
lucee: ${{ fromJSON(needs.setup.outputs.lucee-matrix) }}
106+
java: [ 11, 21 ]
107+
services:
108+
minio:
109+
image: fclairamb/minio-github-actions
110+
ports:
111+
- 9000:9000
112+
steps:
113+
- uses: actions/checkout@v4
114+
115+
- name: Download Artifact
116+
uses: actions/download-artifact@v4
117+
with:
118+
name: image-lex
119+
path: target
120+
83121
- name: Checkout Lucee
84122
uses: actions/checkout@v4
85123
with:
@@ -97,8 +135,7 @@ jobs:
97135
with:
98136
webroot: ${{ github.workspace }}/lucee/test
99137
execute: /bootstrap-tests.cfm
100-
luceeVersion: ${{ matrix.lucee.version }}
101-
luceeVersionQuery: ${{ matrix.lucee.query }}
138+
luceeVersion: ${{ matrix.lucee }}
102139
extensionDir: ${{ github.workspace }}/target
103140
env:
104141
testLabels: image
@@ -108,8 +145,8 @@ jobs:
108145

109146
deploy:
110147
runs-on: ubuntu-latest
111-
needs: [setup, build-and-test]
112-
if: always() && needs.build-and-test.result == 'success'
148+
needs: [setup, test]
149+
if: always() && needs.test.result == 'success' && github.ref == 'refs/heads/master' && !inputs.dry-run
113150
steps:
114151
- name: Checkout repository
115152
uses: actions/checkout@v4
@@ -146,4 +183,4 @@ jobs:
146183
else
147184
echo "------- Maven Deploy release on ${{ github.event_name }} -------";
148185
mvn -B -e -f pom.xml clean deploy -DperformRelease=true --settings maven-settings.xml
149-
fi
186+
fi

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ WEB-INF
2828
*.iml
2929
*.ipr
3030
*.iws
31+
test-output/

CHANGELOG.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Changelog
2+
3+
## 3.0.1.2 (2026-03-26)
4+
5+
- [LDEV-5129](https://luceeserver.atlassian.net/browse/LDEV-5129) remove unused bundled jars: commons-io (CVE-2024-47554), xmpcore, apiguardian, hamcrest, opentest4j
6+
7+
## 3.0.1.1 (2026-03-19)
8+
9+
- [LDEV-6157](https://luceeserver.atlassian.net/browse/LDEV-6157) fix jakarta/javax compat — `<cfimage action="writeToBrowser">` threw `NoSuchMethodError` on Lucee 6 because `touchDestination()` bytecode was bound to jakarta servlet API. Use `eng.getClassUtil().callMethod()` reflection instead.
10+
- CI: build once, test against Lucee 6.2 + 7.0 (stable + snapshot), Java 11 + 21. Deploy gated to master only.
11+
12+
## 3.0.1.0 (2026-03-09)
13+
14+
- Add javax servlet support — dual TLD entries (`tag-class` / `javax-tag-class`) and javax tag classes for Lucee 6 compat (per [LDEV-6120](https://luceeserver.atlassian.net/browse/LDEV-6120))
15+
- **Note:** this release has a broken javax implementation, fixed in 3.0.1.1
16+
17+
## 3.0.0.9 (2026-01-29)
18+
19+
- [LDEV-3967](https://luceeserver.atlassian.net/browse/LDEV-3967) use TwelveMonkeys for image resizing
20+
21+
## 3.0.0.8 (2026-01-28)
22+
23+
- [LDEV-6082](https://luceeserver.atlassian.net/browse/LDEV-6082) avoid logging NPE when metadata is null
24+
25+
## 3.0.0.7 (2026-01-27)
26+
27+
- [LDEV-6081](https://luceeserver.atlassian.net/browse/LDEV-6081) fix resource leaks
28+
- [LDEV-5731](https://luceeserver.atlassian.net/browse/LDEV-5731) make JaiCoder visible and improve logging
29+
- [LDEV-5640](https://luceeserver.atlassian.net/browse/LDEV-5640) migrate to Jakarta EE (Lucee 7+)
30+
- Remove JSPException usage
31+
- Migrate from legacy nexus-staging to central-publishing plugin
32+
33+
## 2.0.0.33 (2026-01-28)
34+
35+
- [LDEV-6082](https://luceeserver.atlassian.net/browse/LDEV-6082) avoid logging NPE when metadata is null (backport)
36+
37+
## 2.0.0.32 (2026-01-27)
38+
39+
- [LDEV-6081](https://luceeserver.atlassian.net/browse/LDEV-6081) fix resource leaks
40+
- [LDEV-5731](https://luceeserver.atlassian.net/browse/LDEV-5731) make JaiCoder visible and improve logging
41+
42+
## 2.0.0.29 (2025-02-25)
43+
44+
- [LDEV-5283](https://luceeserver.atlassian.net/browse/LDEV-5283) remove JAI dependencies
45+
- [LDEV-5640](https://luceeserver.atlassian.net/browse/LDEV-5640) fix imagePaste regression by using local graphics object
46+
- Add Java 21 to CI test matrix
47+
48+
## 2.0.0.26 (2025-01-29)
49+
50+
- [LDEV-5284](https://luceeserver.atlassian.net/browse/LDEV-5284) ImageWrite metadata improvements
51+
- imageFilter flare: add centerX and centerY params
52+
- Avoid NPE when imageFilter parameters is empty
53+
- Add test cases from core
54+
55+
## 2.0.0.23 (2023-12-18)
56+
57+
- [LDEV-4455](https://luceeserver.atlassian.net/browse/LDEV-4455) improve exception for ImageSharpen() with gain argument

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>image-extension</artifactId>
7-
<version>3.0.1.1-SNAPSHOT</version>
7+
<version>3.0.1.3-SNAPSHOT</version>
88
<packaging>pom</packaging>
99
<name>Image Extension</name>
1010

-319 KB
Binary file not shown.
-6.65 KB
Binary file not shown.
-120 KB
Binary file not shown.
-142 KB
Binary file not shown.
-7.47 KB
Binary file not shown.

source/java/src/org/lucee/extension/image/tag/jakarta/Image.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,11 @@ private String touchDestination() throws IOException, PageException {
405405
destination = folder.getRealResource(name);
406406
cleanOld(folder);
407407

408-
// create path
409-
String cp = pageContext.getHttpServletRequest().getContextPath();
408+
// create path (use reflection to avoid jakarta/javax bytecode binding)
409+
Object req = eng.getClassUtil().callMethod(pageContext,
410+
eng.getCastUtil().toKey("getHttpServletRequest"), new Object[] {});
411+
String cp = (String) eng.getClassUtil().callMethod(req,
412+
eng.getCastUtil().toKey("getContextPath"), new Object[] {});
410413
if (eng.getStringUtil().isEmpty(cp))
411414
cp = "";
412415
return cp + "/lucee/graph.cfm?img=" + name + "&type="

0 commit comments

Comments
 (0)