Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |
Tags
- goland
- IntelliJ
- 알고리즘
- git
- 큐빙
- ubuntu
- 17837
- Jenknis
- 단축키
- 두 동전
- service
- spring
- Java
- vscode
- activity
- 제어반전
- insert
- github
- Android
- 안드로이드
- 백준
- 프로그래머스
- mysql
- 데이터전달
- data
- intent
- broadcastreceiver
- 16197
- 데이터
- Algorithm
Archives
- Today
- Total
해보자
[Maven] jar에 기본 Manifest 속성이 없습니다 본문
maven 패키징한 파일을 실행하는 중에 `*.jar에 기본 Manifest속성이 없습니다.`라는 에러를 만났을 때.
plugin에 manifest을 포함해야 한다.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>HelloWorld</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>테스트한 파일의 구조는 아래와 같다.

다시 아래 명령으로 실행하면 정상적으로 jar파일이 실행된다.
java -jar .\\target\\HelloWorld-1.0-SNAPSHOT.jarReference
'Spring' 카테고리의 다른 글
| [Spirngboot] h2 Database Connection (0) | 2020.09.09 |
|---|---|
| [Spring] GWT(Given-When-Then) (0) | 2020.09.09 |
| [Spring] 제어 반전 컨테이너 - IoC (0) | 2020.09.07 |
| [Springboot] 외부 설정 파일 (properties, yml) (0) | 2020.08.19 |
| [SpringBoot] Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)' (0) | 2020.08.13 |