Doing a repackage with Maven spring boot plugin didnt help.
- Tried cleaning the .m2 folder.
- Built the project both from sts and command line.
- Added Component Scanners to scan entity but fails at maven build itself.
- Added Spring Boot Maven Plugin to repackage as executable jar option, nothing seems to be helping.
Parent pom contains the spring boot starter
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.6.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
And the following modules
<modules>
<module>client-data</module>
<module>eureka-server</module>
<module>eureka-client-service-1</module>
<module>eureka-client-service-2</module>
</modules>
eureka-client-service-1
and eureka-client-service-2
have client-data
as dependency.
Since client-data
is a spring-boot
project with package type jar
, have added the following piece of code to create an uber jar
in the client-data's pom.xml
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<classifier>exec</classifier>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Still doing a mvn clean install -amd -e
ends up in follwing error
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project eureka-client-service-1: Compilation failure: Compilation failure:
[ERROR] /C:/Users/balaji/trashcan/pcf-eureka-show-case/eureka-client-service-1/src/main/java/org/balaji/java/jee/pcf/eureka/client/service_1/boundary/EurekaClientEmployeesServiceEndpoint.java:[16,65] package org.balaji.java.jee.pcf.eureka.client.data.controller does not exist
[ERROR] /C:/Users/balaji/trashcan/pcf-eureka-show-case/eureka-client-service-1/src/main/java/org/balaji/java/jee/pcf/eureka/client/service_1/boundary/EurekaClientEmployeesServiceEndpoint.java:[17,61] package org.balaji.java.jee.pcf.eureka.client.data.entity does not exist
[ERROR] /C:/Users/balaji/trashcan/pcf-eureka-show-case/eureka-client-service-1/src/main/java/org/balaji/java/jee/pcf/eureka/client/service_1/boundary/EurekaClientEmployeesServiceEndpoint.java:[27,5] cannot find symbol
[ERROR] symbol: class OrganizationDataFixtureAdapter
[ERROR] location: class org.balaji.java.jee.pcf.eureka.client.service_1.boundary.EurekaClientEmployeesServiceEndpoint
[ERROR] /C:/Users/balaji/trashcan/pcf-eureka-show-case/eureka-client-service-1/src/main/java/org/balaji/java/jee/pcf/eureka/client/service_1/boundary/EurekaClientEmployeesServiceEndpoint.java:[42,32] cannot find symbol
[ERROR] symbol: class Employee
[ERROR] location: class org.balaji.java.jee.pcf.eureka.client.service_1.boundary.EurekaClientEmployeesServiceEndpoint