0

I am currently following a tutorial with SpringBoot using multi module. However when i try to do package this returns the error:

[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.5.RELEASE:repackage (repackage) on project pet-clinic-data: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.1.5.RELEASE:repackage failed: Unable to find main class -> [Help 1]

I tried to put something like this on my parent pom file:

<properties>
    <java.version>1.8</java.version>
    <start-class>guru.springframework.sfgpetclinic.SfgPetClinicApplication</start-class>
</properties>

but this throws another error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project pet-clinic-web: There are test failures.

and this is build on one of the module pet-clinic-data:

<build>
    <plugins>
       <plugin>
           <groupId>org.springframework.boot</groupId>
           <artifactId>spring-boot-maven-plugin</artifactId>
           <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Edit!

@RunWith(SpringRunner.class)
@SpringBootTest
public class SfgPetClinicApplicationTests {

    @Test
    public void contextLoads() {
    }

}
Anirudh Lou
  • 781
  • 2
  • 10
  • 28

0 Answers0