GithubHelp home page GithubHelp logo

Could not get unknown property 'mainClass' for object of type org.springframework.boot.gradle.dsl.SpringBootExtension. about gretty HOT 4 OPEN

gretty-gradle-plugin avatar gretty-gradle-plugin commented on August 11, 2024
Could not get unknown property 'mainClass' for object of type org.springframework.boot.gradle.dsl.SpringBootExtension.

from gretty.

Comments (4)

javabrett avatar javabrett commented on August 11, 2024

@tiemei @rssdev10 is there a test for this and/or a pull-request? Note that Spring Boot 2.x has now been merged to master so it would be good to get a failing->passing test and PR for this change if still relevant.

from gretty.

rssdev10 avatar rssdev10 commented on August 11, 2024

Hi, I merged yours 2.3.0-release branch into my repo and tried to rerun Boot2 app. It is not working but for now the reason is

Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.session.HashSessionManager
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 41 more
Exception in thread "Thread-27" org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
        at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:395)
        at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:37)
        at org.gradle.api.internal.file.DefaultFileOperations.javaexec(DefaultFileOperations.java:192)

I'm using very simple test. It is almost empty demo Boot2 app from https://start.spring.io/ with included gretty.

demo-spring-boot-2_gretty-2-3 2.zip

from gretty.

weleoka avatar weleoka commented on August 11, 2024

The error is occuring for my running of Gretty tasks and building for a Spring MVC project. Boot is version 2.1.5. Gradle 5.4.1.

If it is the case that springBoot=true in gradle.build is needed in order for Gretty to work with Spring, then currently the dependency for gretty-springboot-2.3.x is failing.

The Gretty readme says the latest changes: "Bumped Spring Boot version to 1.5.9 (was 1.5.4)." for May 21, 2018, Gretty(.org) 2.2.0.

There are several ways to specify mainClass in Gradle. https://docs.spring.io/spring-boot/docs/2.1.5.RELEASE/gradle-plugin/reference/html/#packaging-executable-configuring-main-class

from gretty.

golinko avatar golinko commented on August 11, 2024

Have the same issue as @weleoka , but for SpringBoot 2.1.6.RELEASE and Gradle 5.6.2

The commit mentioned by @tiemei should fix the problem with mainClass which is not present in springBoot properties anymore.

What needs to be done in order to release the fix?

from gretty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.