bighenry / t-test

A simple IRC-like chat client. Whilst completed after deadline, please note issues and fixes in branch: https://github.com/bighenry/t-test/tree/hotfix/unit-test-failures-and-tidies
0 stars 0 forks source link

Incorrect Spring Boot manifest entry in build.gradle #1

Open bighenry opened 7 years ago

bighenry commented 7 years ago

I tested the application by running from Eclipse, but I've now realised that trying to run the command line from the built JAR fails. There's an erroneous Spring Boot entry in build.gradle which leads to the break:

springBoot {
  mainClass = "com.henryclout.Application"
}

Removing this entry fixes the build so it can be executed from the command line :

[henry@little-ben ~/t-test]$ gradle build
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:findMainClass
:jar
:bootRepackage
:assemble
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:check UP-TO-DATE
:build

BUILD SUCCESSFUL

Total time: 1.034 secs

[henry@little-ben ~/Downloads/test/t-test]$ java -jar build/libs/gs-spring-boot-0.1.0.jar
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.4.2.RELEASE)

2016-11-30 21:13:14.888  INFO 27088 --- [           main] c.h.c.Application                        : Starting Application on little-ben.local with PID 27088 (/Users/henry/Downloads/test/t-test/build/libs/gs-spring-boot-0.1.0.jar started by henry in /Users/henry/Downloads/test/t-test)
2016-11-30 21:13:14.889  INFO 27088 --- [           main] c.h.c.Application                        : No active profile set, falling back to default profiles: default
2016-11-30 21:13:14.928  INFO 27088 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@2401f4c3: startup date [Wed Nov 30 21:13:14 GMT 2016]; root of context hierarchy
2016-11-30 21:13:15.345  INFO 27088 --- [       Thread-1] c.h.c.s.ConnectionAcceptorService        : Started connecton acceptor on port: 8081
2016-11-30 21:13:15.412  INFO 27088 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2016-11-30 21:13:15.420  INFO 27088 --- [           main] c.h.c.Application                        : Started Application in 0.826 seconds (JVM running for 1.304)
^C2016-11-30 21:13:18.230  INFO 27088 --- [       Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@2401f4c3: startup date [Wed Nov 30 21:13:14 GMT 2016]; root of context hierarchy
2016-11-30 21:13:18.231  INFO 27088 --- [       Thread-2] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown

[note: the project JAR name clearly needs fixing]

bighenry commented 7 years ago

Fixed in branch: https://github.com/bighenry/t-test/tree/hotfix/unit-test-failures-and-tidies