Skip to content

Commit 6b4fdc3

Browse files
committed
Update to now use Java Azure Functions v4 (as v3 is fully deprecated by end of 2022). Updated Java to latest supported version v21, FOP to v2.11, and all other packages to latest stable versions. Upgraded to IntelliJ 2025 Community, and fixed build and debug functionality. Fixed built to now locate the local.settings.json correctly and run DEBUG locally successfully.
1 parent e67e81b commit 6b4fdc3

File tree

3 files changed

+29
-81
lines changed

3 files changed

+29
-81
lines changed

apachefop-serverless-az-func/.run/Run Functions - apachefop-serverless-az-func.run.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,18 @@
33
<option name="appName" />
44
<option name="appServicePlanName" />
55
<option name="appServicePlanResourceGroup" />
6-
<option name="appSettings">
7-
<map />
8-
</option>
96
<option name="appSettingsKey" value="60329852-dd47-4b25-8168-2ed01d6ac893" />
107
<option name="artifact" />
118
<option name="debugOptions" />
129
<option name="deployment" />
1310
<option name="deploymentStagingDirectoryPath" />
14-
<option name="funcPath" value="C:\Program Files\nodejs\node_modules\azure-functions-core-tools\bin\func.exe" />
15-
<option name="hostJsonPath" value="D:\Develop\Personal.GitHub\ApacheFOP.Serverless.AzureFunctions\github\apachefop-serverless-az-func\host.json" />
11+
<option name="funcPath" value="C:\Program Files\Microsoft\Azure Functions Core Tools\func.exe" />
12+
<option name="functionHostArguments" value="host start --port 63295" />
13+
<option name="hostJsonPath" value="$PROJECT_DIR$/host.json" />
1614
<option name="insightsName" />
1715
<option name="instrumentationKey" />
1816
<option name="javaVersion" />
19-
<option name="localSettingsJsonPath" />
17+
<option name="localSettingsJsonPath" value="$PROJECT_DIR$/local.settings.json" />
2018
<option name="moduleName" value="apachefop-serverless-az-func" />
2119
<option name="os" />
2220
<option name="pricingTier" />
Lines changed: 7 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3-
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
4-
<output url="file://$MODULE_DIR$/target/classes" />
5-
<output-test url="file://$MODULE_DIR$/target/test-classes" />
6-
<content url="file://$MODULE_DIR$">
7-
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8-
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
9-
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
10-
<excludeFolder url="file://$MODULE_DIR$/target" />
11-
</content>
12-
<orderEntry type="inheritedJdk" />
13-
<orderEntry type="sourceFolder" forTests="false" />
14-
<orderEntry type="library" name="Maven: com.microsoft.azure.functions:azure-functions-java-library:1.4.2" level="project" />
15-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:fop:2.6" level="project" />
16-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:fop-util:2.6" level="project" />
17-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:xmlgraphics-commons:2.6" level="project" />
18-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:fop-events:2.6" level="project" />
19-
<orderEntry type="library" name="Maven: com.thoughtworks.qdox:qdox:1.12" level="project" />
20-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:fop-core:2.6" level="project" />
21-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-anim:1.14" level="project" />
22-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-css:1.14" level="project" />
23-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-dom:1.14" level="project" />
24-
<orderEntry type="library" name="Maven: xalan:xalan:2.7.2" level="project" />
25-
<orderEntry type="library" name="Maven: xalan:serializer:2.7.2" level="project" />
26-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-ext:1.14" level="project" />
27-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-parser:1.14" level="project" />
28-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-shared-resources:1.14" level="project" />
29-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-svg-dom:1.14" level="project" />
30-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-util:1.14" level="project" />
31-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-constants:1.14" level="project" />
32-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-i18n:1.14" level="project" />
33-
<orderEntry type="library" name="Maven: xml-apis:xml-apis-ext:1.3.04" level="project" />
34-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-awt-util:1.14" level="project" />
35-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-bridge:1.14" level="project" />
36-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-script:1.14" level="project" />
37-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-xml:1.14" level="project" />
38-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-extension:1.14" level="project" />
39-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-gvt:1.14" level="project" />
40-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-transcoder:1.14" level="project" />
41-
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-svggen:1.14" level="project" />
42-
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.0.4" level="project" />
43-
<orderEntry type="library" name="Maven: org.apache.pdfbox:fontbox:2.0.19" level="project" />
44-
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.12.0" level="project" />
45-
<orderEntry type="library" name="Maven: org.apache.commons:commons-text:1.9" level="project" />
46-
<orderEntry type="library" name="Maven: commons-io:commons-io:2.8.0" level="project" />
47-
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.7.1" level="project" />
48-
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.7.1" level="project" />
49-
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
50-
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
51-
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.7.1" level="project" />
52-
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.7.1" level="project" />
53-
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.7.1" level="project" />
54-
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.7.1" level="project" />
55-
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.8.0" level="project" />
56-
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.10.20" level="project" />
57-
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.20" level="project" />
58-
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:3.1" level="project" />
2+
<module version="4">
3+
<component name="FacetManager">
4+
<facet type="azure" name="Azure">
5+
<configuration>
6+
<option name="dotAzurePath" value="D:\Develop\GitHub.Personal\ApacheFOP.Serverless\github\apachefop-serverless-az-func\.azure" />
7+
</configuration>
8+
</facet>
599
</component>
6010
</module>

apachefop-serverless-az-func/pom.xml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
<groupId>com.cajuncoding</groupId>
66
<artifactId>apachefop-serverless-az-func</artifactId>
7-
<version>1.4-SNAPSHOT</version>
7+
<version>1.5-SNAPSHOT</version>
88
<packaging>jar</packaging>
99

1010
<name>Azure Java Functions</name>
1111

1212
<properties>
1313
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
14-
<java.version>11</java.version>
14+
<java.version>21</java.version>
1515
<functionAppName>apachefop-serverless-az-func</functionAppName>
1616
<stagingDirectory>${project.build.directory}/azure-functions/${functionAppName}</stagingDirectory>
1717
<!-- <functionAppRegion>westus</functionAppRegion> -->
@@ -21,15 +21,15 @@
2121
<dependency>
2222
<groupId>com.microsoft.azure.functions</groupId>
2323
<artifactId>azure-functions-java-library</artifactId>
24-
<version>1.4.2</version>
24+
<version>3.1.0</version>
2525
</dependency>
2626
<dependency>
2727
<groupId>org.apache.xmlgraphics</groupId>
2828
<artifactId>fop</artifactId>
29-
<version>2.6</version>
29+
<version>2.11</version>
3030
<!-- We MUST explicitly exclude these to ensure VS Code can correctly compile.
3131
NOTE: This is because they are referenced in from multiple libraries and while
32-
Maven (via IntelliJ) resolves it, VS Code Java Extensions will fail to compile -->
32+
Maven (via IntelliJ) resolves it, VS Code Java Extensions will fail to compile -->
3333
<exclusions>
3434
<exclusion>
3535
<groupId>xml-apis</groupId>
@@ -44,31 +44,31 @@
4444
<dependency>
4545
<groupId>org.apache.commons</groupId>
4646
<artifactId>commons-lang3</artifactId>
47-
<version>3.12.0</version>
47+
<version>3.17.0</version>
4848
</dependency>
4949
<dependency>
5050
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-text -->
5151
<groupId>org.apache.commons</groupId>
5252
<artifactId>commons-text</artifactId>
53-
<version>1.10.0</version>
53+
<version>1.13.1</version>
5454
</dependency>
5555
<dependency>
5656
<groupId>commons-io</groupId>
5757
<artifactId>commons-io</artifactId>
58-
<version>2.8.0</version>
58+
<version>2.19.0</version>
5959
</dependency>
6060

6161
<!-- Test -->
6262
<dependency>
6363
<groupId>org.junit.jupiter</groupId>
6464
<artifactId>junit-jupiter</artifactId>
65-
<version>5.7.1</version>
65+
<version>5.13.0-RC1</version>
6666
<scope>test</scope>
6767
</dependency>
6868
<dependency>
6969
<groupId>org.mockito</groupId>
7070
<artifactId>mockito-core</artifactId>
71-
<version>3.8.0</version>
71+
<version>5.18.0</version>
7272
<scope>test</scope>
7373
</dependency>
7474
</dependencies>
@@ -78,7 +78,7 @@
7878
<plugin>
7979
<groupId>com.microsoft.azure</groupId>
8080
<artifactId>azure-functions-maven-plugin</artifactId>
81-
<version>1.14.0</version>
81+
<version>1.38.0</version>
8282
<configuration>
8383
<!-- The App Name & Resource Group Name must both be Unique or deployment issues may arise
8484
as NOTED here: https://github.com/Azure/azure-functions-java-worker/issues/140 -->
@@ -104,7 +104,7 @@
104104
<appSettings>
105105
<property>
106106
<name>FUNCTIONS_EXTENSION_VERSION</name>
107-
<value>~3</value>
107+
<value>~4</value>
108108
</property>
109109
</appSettings>
110110
</configuration>
@@ -121,7 +121,7 @@
121121
<!-- Plugin for Debugging Property Values -->
122122
<groupId>org.apache.maven.plugins</groupId>
123123
<artifactId>maven-antrun-plugin</artifactId>
124-
<version>1.7</version>
124+
<version>3.1.0</version>
125125
<executions>
126126
<execution>
127127
<?m2e execute onConfiguration,onIncremental?>
@@ -141,7 +141,7 @@
141141
<plugin>
142142
<groupId>org.apache.maven.plugins</groupId>
143143
<artifactId>maven-clean-plugin</artifactId>
144-
<version>3.1.0</version>
144+
<version>3.4.1</version>
145145
<configuration>
146146
<filesets>
147147
<fileset>
@@ -163,7 +163,7 @@
163163
<plugin>
164164
<groupId>org.apache.maven.plugins</groupId>
165165
<artifactId>maven-compiler-plugin</artifactId>
166-
<version>3.8.1</version>
166+
<version>3.14.0</version>
167167
<configuration>
168168
<source>${java.version}</source>
169169
<target>${java.version}</target>
@@ -173,7 +173,7 @@
173173
<plugin>
174174
<groupId>org.apache.maven.plugins</groupId>
175175
<artifactId>maven-resources-plugin</artifactId>
176-
<version>3.2.0</version>
176+
<version>3.3.1</version>
177177
<executions>
178178
<!-- COPY Azure Function configuration JSON Files (required especially for running locally)! -->
179179
<execution>
@@ -201,7 +201,7 @@
201201
<plugin>
202202
<groupId>org.apache.maven.plugins</groupId>
203203
<artifactId>maven-dependency-plugin</artifactId>
204-
<version>3.1.2</version>
204+
<version>3.8.1</version>
205205
<executions>
206206
<execution>
207207
<id>copy-dependencies</id>
@@ -223,7 +223,7 @@
223223
<plugin>
224224
<groupId>org.apache.maven.plugins</groupId>
225225
<artifactId>maven-surefire-plugin</artifactId>
226-
<version>2.22.1</version>
226+
<version>3.5.3</version>
227227
<configuration>
228228
<skipTests>true</skipTests>
229229
</configuration>

0 commit comments

Comments
 (0)