Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions functions/helloworld/helloworld/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<parent>
<groupId>com.google.cloud.samples</groupId>
<artifactId>shared-configuration</artifactId>
<version>1.2.0</version>
<version>1.2.2</version>
</parent>

<dependencyManagement>
Expand All @@ -50,8 +50,8 @@
<!-- [START functions_example_pom] -->
<!-- [START functions_example_pom_dependencies] -->
<properties>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
<maven.compiler.source>25</maven.compiler.source>
Comment on lines +53 to +54
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better build portability and to prevent accidental usage of APIs from a newer JDK than the target, it's recommended to use the <maven.compiler.release> property instead of setting <maven.compiler.source> and <maven.compiler.target> separately. This single property configures both and also sets the correct boot classpath, ensuring your code is truly compatible with the specified Java version.

    <maven.compiler.release>25</maven.compiler.release>

</properties>

<dependencies>
Expand Down Expand Up @@ -92,6 +92,25 @@

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.14</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- [START functions_maven_specify_function] -->
<plugin>
<!-- [END functions_maven_specify_function] -->
Expand Down