[no main manifest attribute]
[maven]
- 원인은 Main Class 위치를 찾지 못해서 발생하는 것 입니다.
- pom.xml 파일에 플러그인(plugin)을 추가 하고 그 안에 있는 "mainClass" 태그에 "[package name].[class name]" 을 추가하면 됩니다.
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <excludes> <exclude> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </exclude> </excludes> </configuration> </plugin> </plugins> </build> |
[gradle]
jar { manifest { attributes 'Main-Class': 'com.package.application.MainClass' } } |
[필요한 의존성 모두 추가 - gradle 사용시]
- 프로젝트에 필요한 모든 의존성이 같이 추가된것으로 MANIFEST.MF까지 모두 정상적인 형태로 나온다.
jar { enabled = false } |
'spring' 카테고리의 다른 글
Kafka on windows (0) | 2022.04.25 |
---|---|
org.springframework.cloud.config.server.environment.NoSuchLabelException: No such label: main (0) | 2022.04.15 |
spring-boot-maven-plugin not found 해결 방법 (0) | 2022.04.04 |
Spring RCE Patch (0) | 2022.04.04 |
“Dynamic Web Module 3.1 requires Java 1.7 or newer” 오류 해결 (0) | 2015.11.23 |