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

Give user hint to use JDK11 #16

Open
rladstaetter opened this issue Sep 5, 2020 · 0 comments
Open

Give user hint to use JDK11 #16

rladstaetter opened this issue Sep 5, 2020 · 0 comments

Comments

@rladstaetter
Copy link

I've created an example project with

 mvn -B archetype:generate -DarchetypeGroupId=com.gluonhq -DarchetypeArtifactId=client-archetype-javafx -DarchetypeVersion=0.0.2 -DgroupId=com.gluonhq -DartifactId=gluon-client-sample -Dversion=1.0.0-SNAPSHOT`

which an example project as expected. When I want to run it with

 mvn javafx:run

it breaks with

 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project gluon-client-sample: Fatal error compiling: invalid flag: --release -> [Help 1]

The problem is that I'm running JDK8, it would be nice if I got an error message saying 'You should use Java11' for example. One easy way would be to add

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>3.0.0-M3</version>
            <executions>
                <execution>
                    <id>enforce-jdk</id>
                    <goals>
                        <goal>enforce</goal>
                    </goals>
                    <configuration>
                        <rules>
                            <requireJavaVersion>
                                <version>11</version>
                            </requireJavaVersion>
                        </rules>
                    </configuration>
                </execution>
            </executions>
        </plugin>

to the generated pom.xml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant