1

The following web app fail to maven clean install: https://github.com/cassiusvm/sfg-pet-clinic

The error is below:

[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/cassius/git/sfg-pet-clinic/pet-clinic-web/src/main/java/guru/springframework/sfgpetclinic/controllers/PetController.java:[3,47] package guru.springframework.sfgpetclinic.model does not exist

The following web app don't fail to maven clean install: https://github.com/cassiusvm/spring5-recipe-app

On Eclipse IDE 2018-09, both are successfully constructed and they run fine.

Both use Spring Boot 2.1.0 and Java 11.

How to maven install the sfg-pet-clinic web app with success, please ?

cviniciusm
  • 139
  • 1
  • 2
  • 13
  • Did you ensure using [`maven-compiler-plugin:3.8.0` with `11`](https://stackoverflow.com/a/51586202/1746118) ? Or would be better if you could share the logs with error details as well. I mean where is the package `guru.springframework.sfgpetclinic.model` exist for use in code. – Naman Nov 13 '18 at 00:20
  • Also, is there any previous configuration with which this code compiles successfully? I tried cloning the repository and executed with Java8 as well, resulting in similar compilation failures. – Naman Nov 13 '18 at 01:26
  • Please paste your pom.xml/gradle.build, issue can be hidden there. – Mikhail Kholodkov Nov 14 '18 at 14:02
  • Solved it. I did include repackage to plugin spring-boot-maven-plugin on module pet-clinic-data. I did include the dependency mockito-core to plugin wro4j-maven-plugin on module pet-clinic-web. – cviniciusm Nov 15 '18 at 14:45

2 Answers2

0

Solved it.

I did include id repackage to plugin spring-boot-maven-plugin on module pet-clinic-data.

I did include the dependency mockito-core to plugin wro4j-maven-plugin on module pet-clinic-web.

cviniciusm
  • 139
  • 1
  • 2
  • 13
0

I'm on the same project pet-clinic-web, and for me was enough to add the dependency mockito-core to wro4j-maven-plugin.

Though when the project was on jdk 8 I didn't have this problem. The problem started when I update to jdk 11.

rafanegrette
  • 33
  • 1
  • 6