Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document setting buildpack Java version from compiler plugin version #21796

Closed
scottfrederick opened this issue Jun 9, 2020 · 0 comments
Closed
Assignees
Labels
type: documentation A documentation update
Milestone

Comments

@scottfrederick
Copy link
Contributor

The Maven spring-boot:build-image goal and Gradle bootBuildImage task attempt to detect the target Java version for the build and set an environment variable on the CNB builder to instruct buildpacks to install the same Java version. This should be documented in the build plugin documentation.

The Maven plugin first looks for configuration of the maven-compiler-plugin with a target version:

<plugins>
    <plugin>    
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
            <target>1.8</target>
        </configuration>
    </plugin>
</plugins>

If that is not found, it looks for a compiler target property:

<properties>
    <maven.compiler.target>1.8</maven.compiler.target>
</properties>

The Gradle plugin uses a Gradle API, which exposes the value of the targetCompatibility property of the Java plugin.

@scottfrederick scottfrederick added the type: documentation A documentation update label Jun 9, 2020
@scottfrederick scottfrederick added this to the 2.3.x milestone Jun 9, 2020
@snicoll snicoll self-assigned this Aug 31, 2020
@snicoll snicoll modified the milestones: 2.3.x, 2.3.4 Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation update
Projects
None yet
Development

No branches or pull requests

2 participants