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

Build start fail when try to add new Scheme #42

Open
khanhpd2002 opened this issue Aug 30, 2024 · 2 comments
Open

Build start fail when try to add new Scheme #42

khanhpd2002 opened this issue Aug 30, 2024 · 2 comments
Labels
kind/support Categorizes issue or PR as a support question.

Comments

@khanhpd2002
Copy link

package run.halo.starter.schema;

import lombok.Data;
import lombok.EqualsAndHashCode;
import run.halo.app.extension.AbstractExtension;
import run.halo.app.extension.GVK;

/**
 * @author guqing
 * @author ryanwang
 * @since 2.0.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
@GVK(group = "core.halo.run", version = "v1alpha1",
        kind = "Link", plural = "links", singular = "link")
public class Link extends AbstractExtension {

    private LinkSpec spec;

    @Data
    public static class LinkSpec {
        private String url;

        private String displayName;

        private String logo;

        private String description;

        private Integer priority;

        private String groupName;
    }
}

I got error when try to add this Scheme into my starter after cloned. When removed this class file, I can build success
The error is:

> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid'

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.9/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 5s
5 actionable tasks: 3 executed, 2 up-to-date

@guqing
Copy link
Member

guqing commented Aug 30, 2024

Which version of JDK are you using? The plugin requires JDK 17, as a reference https://docs.halo.run/developer-guide/plugin/prepare

/kind support

@f2c-ci-robot f2c-ci-robot bot added the kind/support Categorizes issue or PR as a support question. label Aug 30, 2024
@khanhpd2002
Copy link
Author

Im using Corretto-17
image

It only error when I add class Link as I show as

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question.
Projects
None yet
Development

No branches or pull requests

2 participants