首页
开源
资讯
活动
开源许可证
软件工程云服务
软件代码质量检测云服务
持续集成与部署云服务
社区个性化内容推荐服务
贡献审阅人推荐服务
群体化学习服务
重睛鸟代码扫描工具
登录
注册
代码拉取完成,页面将自动刷新
Watch
169
Star
2.3K
Fork
1.2K
leifengyang
/
SpringBoot2核心技术与响应式编程
Fork 仓库
加载中
取消
确认
代码
Issues
3
Pull Requests
8
Wiki
0
统计
更新失败,请稍后重试!
Issues
/
详情
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
[已解决]直接克隆仓库打包运行依然 Error: Invalid or corrupt jarfile target\boot-01-helloworld-1.0-SNAPSHOT.jar
待办的
#I4K4L7
李德银
创建于
2021-11-28 16:50
## 已解决 ### 解决办法 关闭火绒保护文件(限制应用程序访问)功能。 遇到类似情况的可以看看自己的杀毒/安全软件。 ## 以下原文 同学们有遇到这种情况吗?怎么解决呢? 相关日志如下: ``` >java -version java version "1.8.0_181" Java(TM) SE Runtime Environment (build 1.8.0_181-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode) ``` ``` >mvn -v Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537) Maven home: D:\Develop_Tools\Maven\apache-maven-3.8.4 Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: D:\Develop_Tools\Java\jdk1.8.0_181\jre Default locale: zh_CN, platform encoding: GBK OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" ``` 清理并打包: ``` >mvn clean package [INFO] Scanning for projects... [INFO] [INFO] -------------------< com.atguigu:boot-01-helloworld >------------------- [INFO] Building boot-01-helloworld 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ boot-01-helloworld --- [INFO] Deleting D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target [INFO] [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ boot-01-helloworld --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] Copying 2 resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ boot-01-helloworld --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 7 source files to D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target\classes [INFO] [INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ boot-01-helloworld --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ boot-01-helloworld --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ boot-01-helloworld --- [INFO] No tests to run. [INFO] [INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ boot-01-helloworld --- [INFO] Building jar: D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target\boot-01-helloworld-1.0-SNAPSHOT.jar [INFO] [INFO] --- spring-boot-maven-plugin:2.3.4.RELEASE:repackage (repackage) @ boot-01-helloworld --- [INFO] Replacing main artifact with repackaged archive [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.463 s [INFO] Finished at: 2021-11-28T16:52:24+08:00 [INFO] ------------------------------------------------------------------------ ``` 运行 ``` >java -jar target\boot-01-helloworld-1.0-SNAPSHOT.jar Error: Invalid or corrupt jarfile target\boot-01-helloworld-1.0-SNAPSHOT.jar ```
## 已解决 ### 解决办法 关闭火绒保护文件(限制应用程序访问)功能。 遇到类似情况的可以看看自己的杀毒/安全软件。 ## 以下原文 同学们有遇到这种情况吗?怎么解决呢? 相关日志如下: ``` >java -version java version "1.8.0_181" Java(TM) SE Runtime Environment (build 1.8.0_181-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode) ``` ``` >mvn -v Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537) Maven home: D:\Develop_Tools\Maven\apache-maven-3.8.4 Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: D:\Develop_Tools\Java\jdk1.8.0_181\jre Default locale: zh_CN, platform encoding: GBK OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" ``` 清理并打包: ``` >mvn clean package [INFO] Scanning for projects... [INFO] [INFO] -------------------< com.atguigu:boot-01-helloworld >------------------- [INFO] Building boot-01-helloworld 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ boot-01-helloworld --- [INFO] Deleting D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target [INFO] [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ boot-01-helloworld --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] Copying 2 resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ boot-01-helloworld --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 7 source files to D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target\classes [INFO] [INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ boot-01-helloworld --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ boot-01-helloworld --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ boot-01-helloworld --- [INFO] No tests to run. [INFO] [INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ boot-01-helloworld --- [INFO] Building jar: D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target\boot-01-helloworld-1.0-SNAPSHOT.jar [INFO] [INFO] --- spring-boot-maven-plugin:2.3.4.RELEASE:repackage (repackage) @ boot-01-helloworld --- [INFO] Replacing main artifact with repackaged archive [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.463 s [INFO] Finished at: 2021-11-28T16:52:24+08:00 [INFO] ------------------------------------------------------------------------ ``` 运行 ``` >java -jar target\boot-01-helloworld-1.0-SNAPSHOT.jar Error: Invalid or corrupt jarfile target\boot-01-helloworld-1.0-SNAPSHOT.jar ```
评论 (
0
)
李德银
创建了
任务
李德银
修改了
描述
原值
```
>java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
```
```
>mvn -v
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: D:\Develop_Tools\Maven\apache-maven-3.8.4
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: D:\Develop_Tools\Java\jdk1.8.0_181\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
```
新值
```
>java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
```
```
>mvn -v
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: D:\Develop_Tools\Maven\apache-maven-3.8.4
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: D:\Develop_Tools\Java\jdk1.8.0_181\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
```
打包:
```
>mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< com.atguigu:boot-01-helloworld >-------------------
[INFO] Building boot-01-helloworld 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ boot-01-helloworld ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ boot-01-helloworld ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ boot-01-helloworld ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ boot-01-helloworld ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ boot-01-helloworld ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ boot-01-helloworld ---
[INFO] Building jar: D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target\boot-01-helloworld-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:2.3.4.RELEASE:repackage (repackage) @ boot-01-helloworld ---
[INFO] Replacing main artifact with repackaged archive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.713 s
[INFO] Finished at: 2021-11-28T16:50:52+08:00
[INFO] ------------------------------------------------------------------------
```
运行
```
>java -jar target\boot-01-helloworld-1.0-SNAPSHOT.jar
Error: Invalid or corrupt jarfile target\boot-01-helloworld-1.0-SNAPSHOT.jar
```
李德银
修改了
描述
原值
```
>java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
```
```
>mvn -v
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: D:\Develop_Tools\Maven\apache-maven-3.8.4
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: D:\Develop_Tools\Java\jdk1.8.0_181\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
```
打包:
```
>mvn
package
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< com.atguigu:boot-01-helloworld >-------------------
[INFO] Building boot-01-helloworld 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-
resources-plugin:3.1.0:resources (def
a
ult-res
o
urces) @ bo
o
t-01
-
helloworld ---
[INFO]
Using 'UTF-8'
e
ncoding to copy filtered res
o
urces.
[INFO]
Copying 1 resource
[INFO]
Copying 2
resources
[INFO]
[INFO]
--- maven-compiler-plugin:3.8.1:compile (default-compile) @ boot-01-helloworld ---
[INFO]
N
o
th
ing
to compil
e
- all classes are up to date
[INFO]
[INFO] --- maven-
resources-plugin:3.1.0:testR
e
sources (default-testResources) @ b
o
ot-01
-
helloworld ---
[INFO]
Usi
ng
'UTF-8'
e
ncoding to copy
filtered resources.
[INFO]
ski
p
no
n
exi
s
ting resourceDirectory D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\src\test\resources
[INFO]
[INFO] --- maven-
compiler-plugin:3.8.1:testCompile (default-tes
t
Compile) @ boot-01-hellowor
l
d ---
[INFO]
No sources to
compile
[INFO]
[INFO]
--- maven-surefire-plugin:2.22.2:test (default-test) @ boot-01-helloworld ---
[INFO]
No tests to run.
[INFO]
[INFO]
--- maven-jar-plugin:3.2.0:jar (default-jar) @ boot-01-helloworld ---
[INFO]
Building jar: D:\IdeaProjects\Demo\
s
pringboot2\boo
t
-01-helloworld\target\boot-01-helloworld-1.0-SNAPSHOT.jar
[INFO]
[INFO]
--- spring-boot-maven-plugin:2.3.4.RELEASE:repackage (repackage) @ boot-01-helloworld ---
[INFO]
Replacing m
a
in art
i
fact with
r
epack
a
ged archive
[INFO]
---------------------------------------------------
-
--
-
-----------------
[INFO]
BUILD SUCCESS
[INFO] ---
-------
-
----
-
-----
-
-------------------------------------------------
-
[INFO]
Total time: 1.713 s
[INFO]
Finished at: 2021
-
11
-
28T16:50:52+08:00
[INFO]
------------------------------------------------------------------------
```
运行
```
>java -jar target\boot
-
01
-
helloworld
-
1.0
-
SNAPSHOT.jar
Error: Invalid or corrupt jarfile target\boot-01-helloworld-1.0-SNAPSHOT.jar
```
新值
```
>java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
```
```
>mvn -v
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: D:\Develop_Tools\Maven\apache-maven-3.8.4
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: D:\Develop_Tools\Java\jdk1.8.0_181\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
```
清理并打包:
```
>mvn
clean package
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< com.atguigu:boot-01-helloworld >-------------------
[INFO] Building boot-01-helloworld 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-
clean-plugin:3.1.0:clean (default-cle
a
n) @ bo
o
t-01-hellow
o
rld
-
--
[INFO]
Deleting D:\Id
e
aProjects\Demo\springboot2\b
o
ot-01-helloworld\target
[INFO]
[INFO]
--- maven-
resources
-plugin:3.1.0:resources (default-resources) @ boot-01-helloworld ---
[INFO]
Using 'UTF-8' encoding to copy filtered resources.
[INFO]
Copying 1 resource
[INFO]
C
o
py
ing
2 resourc
e
s
[INFO]
[INFO] --- maven-
compiler-plugin:3.8.1:compil
e
(default-compile) @ boot-01-hellow
o
rld -
-
-
[INFO]
Cha
ng
es detect
e
d - recompiling
the module!
[INFO]
Com
p
ili
n
g 7
s
ource files to D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target\classes
[INFO]
[INFO] --- maven-
resources-plugin:3.1.0:testResources (default-
t
estResources) @ boot-01-hel
l
oworld ---
[INFO]
Using 'UTF-8'
encoding to copy filtered resources.
[INFO]
skip non existing resourceDirectory D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\src\test\resources
[INFO]
[INFO]
--- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ boot-01-helloworld ---
[INFO]
No sources to compile
[INFO]
[INFO]
--- maven-surefire-plugin:2.22.2:te
s
t (default-tes
t
) @ boot-01-helloworld ---
[INFO]
No tests to run.
[INFO]
[INFO]
--- maven-j
a
r-plug
i
n:3.2.0:ja
r
(def
a
ult-jar) @ boot-01-helloworld ---
[INFO]
Building jar: D:\IdeaProjects\Demo\springboot2\boot
-
01
-
helloworld\target\boot-01-helloworld-1.0-SNAPSHOT.jar
[INFO]
[INFO] ---
spring
-
boot
-
maven
-
plugin:2.3.4.RELEASE:repackage (repackage) @ boot
-
01-helloworld ---
[INFO]
Replacing main artifact with repackaged archive
[INFO]
-----------------
-
--
-
---------------------------------------------------
[INFO]
BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.463 s
[INFO] Finished at: 2021-11-28T16:52:24+08:00
[INFO] ---------------
-
--
-
----------
-
---
-
--------------------------------------
运行
```
>java -jar target\boot-01-helloworld-1.0-SNAPSHOT.jar
Error: Invalid or corrupt jarfile target\boot-01-helloworld-1.0-SNAPSHOT.jar
```
李德银
修改了
描述
原值
```
>java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
J
ava
HotSp
o
t(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
```
```
>mvn -v
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Ma
v
en home: D:\Develop_Tools\Maven\apache-maven-3.8.4
Java versio
n
: 1.8.0_181, ven
d
or: Oracle Corporation, runtime: D:\Develop_Tools\Java\jdk1.8.0_181\jre
Default locale: zh_CN, platform
en
coding: GBK
OS nam
e
: "windows 10", version: "10.0",
arch: "amd64", family: "windows"
```
清理并打包:
```
>mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO]
-------------------< com.atguigu:boot-01-helloworld >-------------------
[INFO]
Building boot-01-helloworld 1.0-SNAPSHOT
[INFO] -------------------
-------------[ jar ]-
-
------------
-------------------
[INFO]
[INFO] ---
maven
-
clean
-
plugin:3.1.0:clean (default
-
clean) @ boot
-
01
-
helloworld ---
[INFO]
Deleting D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target
[INFO]
[INFO]
--- maven-resources-plugin:3.1.0:resources (default-resou
r
ces) @ boot-01-helloworld ---
[INFO]
Using 'UTF-8' encoding to copy filtered resources.
[INFO]
Copying 1
resource
[INFO]
Copying 2 resour
c
es
[INFO]
[INFO]
--- maven-compiler-plugin:3.8.1:compile (default-compile) @ boot-01-helloworld ---
[INFO]
Changes detected - recompiling the module!
[INFO]
Compiling 7 source files to D:\IdeaProjects\Demo\springboot2\b
o
ot-01-he
l
loworld\target\classes
[INFO]
[INFO]
--- maven-re
source
s-p
l
ugin:3.1.0:testResources (default-testRes
o
urces) @ bo
o
t-01-helloworld ---
[INFO]
Using 'UTF-8' encoding to copy filtered resources.
[INFO]
skip non exi
s
ting reso
u
rceDirectory D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\src\test\resources
[INFO]
[INFO]
--- maven-comp
i
ler-plugin:3.8.1:testCompile (default-testCompile) @ bo
o
t-01-hel
l
oworld ---
[INFO]
No sources to compile
[INFO]
[INFO]
--- maven-surefire-plugin:2.22.2:test (default-test) @ boot-01-helloworld ---
[INFO]
No tests to run.
[INFO]
[INFO]
--- maven-ja
r
-plugin:3.2.0:jar (default-jar) @ boot-01-helloworld ---
[INFO]
Building jar: D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target\boot-01-helloworld-1.0-SNAPSHOT.jar
[INFO]
[INFO]
--- spring-boot-mav
e
n-plugin:2.3.4.RELEASE:repackage (repackage) @ boot-01-hellowor
l
d ---
[INFO]
Replacing main artifact with repackaged archive
[INFO] ---
-------
-
----
-
-----
-
-------------------------------------------------
-
[INFO]
BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO]
Total
time: 3.463 s
[INFO]
Finished at: 2021
-
11
-
28T16:52:24+08:00
[INFO]
------------------------------------------------------------------------
运行
```
>java -jar target\boot-01-helloworld-1.0-SNAPSHOT.jar
Error: Invalid or corrupt jarfile target\boot-01-helloworld-1.0-SNAPSHOT.jar
```
新值
同学们有遇到这种情况吗?怎么解决呢?
相关日志如下:
```
>java -version
j
ava
versi
o
n "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
```
```
>m
v
n -v
Apache Mave
n
3.8.4 (9b656c72
d
54e5bacbed989b64718c159fe39b537)
Maven home: D:\Develop_Tools\Mav
en
\apache-maven-3.8.4
Java v
e
rsion: 1.8.0_181, vendor: Oracle
Corporation, runtime: D:\Develop_Tools\Java\jdk1.8.0_181\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
```
清理并打包:
```
>mvn clean package
[INFO]
Scanning for projects...
[INFO]
[INFO] -------------------
< com.atguigu:boot-01
-
helloworld >
-------------------
[INFO]
Building boot-01-helloworld 1.0-SNAPSHOT
[INFO] ---
------
-
-----
-
----------------[ jar ]----
-
-------------
-
--
-
-----------
[INFO]
[INFO]
--- maven-clean-plugin:3.1.0:clean (default-clean) @ boot-01-helloworld ---
[INFO]
Deleting D:\IdeaProjects\Demo\springboot2\boot-01-hellowo
r
ld\target
[INFO]
[INFO]
--- maven-
resource
s-plugin:3.1.0:resources (default-resources) @ boot-01-helloworld ---
[INFO]
Using 'UTF-8' en
c
oding to copy filtered resources.
[INFO]
Copying 1 resource
[INFO]
Copying 2 resources
[INFO]
[INFO]
--- maven-compiler-plugin:3.8.1:compile (default-compile) @ bo
o
t-01-hel
l
oworld ---
[INFO]
Changes detected - recompiling the module!
[INFO]
Compiling 7
source
fi
l
es to D:\IdeaProjects\Demo\springboot2\bo
o
t-01-hellow
o
rld\target\classes
[INFO]
[INFO]
--- maven-re
s
ources-pl
u
gin:3.1.0:testResources (default-testResources) @ boot-01-helloworld ---
[INFO]
Using 'UTF-8' encoding to copy filtered resources.
[INFO]
skip non exist
i
ng resourceDirectory D:\IdeaProjects\Demo\springboot2\b
o
ot-01-he
l
loworld\src\test\resources
[INFO]
[INFO]
--- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ boot-01-helloworld ---
[INFO]
No sources to compile
[INFO]
[INFO]
--- maven-surefire-plugin:2.22.2:test (default-test) @ boot-01-helloworld ---
[INFO]
No tests to
r
un.
[INFO]
[INFO]
--- maven-jar-plugin:3.2.0:jar (default-jar) @ boot-01-helloworld ---
[INFO]
Building jar: D:\Id
e
aProjects\Demo\springboot2\boot-01-helloworld\target\boot-01-he
l
loworld-1.0-SNAPSHOT.jar
[INFO]
[INFO] ---
spring
-
boot
-
maven
-
plugin:2.3.4.RELEASE:repackage (repackage) @ boot
-
01-helloworld ---
[INFO]
Replacing main artifact with repackaged archive
[INFO] ------------------------------------------------------------------------
[INFO]
BUILD
SUCCESS
[INFO]
-----------------
-
--
-
---------------------------------------------------
[INFO]
Total time: 3.463 s
[INFO] Finished at: 2021-11-28T16:52:24+08:00
[INFO] ------------------------------------------------------------------------
运行
```
>java -jar target\boot-01-helloworld-1.0-SNAPSHOT.jar
Error: Invalid or corrupt jarfile target\boot-01-helloworld-1.0-SNAPSHOT.jar
```
李德银
修改了
描述
原值
同学们有遇到这种情况吗?怎么解决呢?
相关日志如下:
```
>java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
```
```
>mvn -v
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: D:\Develop_Tools\Maven\apache-maven-3.8.4
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: D:\Develop_Tools\Java\jdk1.8.0_181\jre
Default locale: zh_CN, platform encoding: GBK
OS nam
e
: "windows 10", version: "10.0", arch: "amd64", family: "windows"
```
清理并打包:
```
>mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< com.atguigu:boot-01
-
helloworld >-------------------
[INFO] Bu
i
lding boot-0
1
-helloworld 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ boot-01-helloworld ---
[INFO] Deleting D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target
[INFO]
[INFO] ---
m
a
ven-resources-plugin:3.1.0:resources (default-resources) @ boot-01-helloworld ---
[INFO]
Usi
n
g 'UTF-8' encoding to copy filtered resources.
[INFO]
Copying 1 resource
[INFO]
Copying 2 resources
[INFO]
[INFO] ---
maven
-
compiler
-
plugin:3.8.1:compile (default
-
compile) @ boot
-
01
-
helloworld ---
[INFO]
Changes detected - recompiling the module!
[INFO]
Compiling 7 source f
i
les to D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target\classes
[INFO]
[INFO]
--- maven-resources-plugin:3.1.0:testResources (default-testResources) @ boot-01-helloworld ---
[INFO]
Using 'UTF-8' en
c
oding to copy filtered resources.
[INFO]
sk
i
p non existi
n
g resourceDirectory D:\Id
e
aProj
e
cts\Demo\springboot2\boot-01-helloworld\src\test\resources
[INFO]
[INFO]
--- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ boot-01-helloworld ---
[INFO]
No sources to compile
[INFO]
[INFO]
--- maven-surefire-plugin:2.22.2:test (d
e
fault-test) @ boot-01-helloworld ---
[INFO]
N
o
tests to
run.
[INFO]
[INFO] --- maven-
jar-plugin:3.2.0
:
jar (default-ja
r
) @
boot-01-helloworld ---
[INFO]
Bu
i
lding jar:
D:\I
d
eaProje
c
ts\Demo\springbo
o
t2\boot-01-helloworld\target\boot-01-helloworld-1.0-SNAPSHOT.jar
[INFO]
[INFO]
--- spring-boot-maven-plugin:2.3.4.RELEASE:repackage (repackage) @ boot-01-helloworld ---
[INFO]
Replacing main artifact with repackaged archiv
e
[INFO]
------------------------------------------------------------------------
[INFO]
BUILD SUCCESS
[INFO] ---
------
-
--------
-
---------------------------
-
------------
-
--
-
---------
[INFO]
T
o
tal
t
ime:
3.463 s
[INFO]
Finished at: 2021-11-28T16:52:24+08:00
[INFO] ---
------
-
---
-
-------------------------
-
-----------
-
--
-
-----------
---
---
运行
```
>java -jar
ta
r
get\
boot-
01-helloworld-1.0-SNAPSHOT.jar
Error:
Invalid or corrup
t
j
a
rfile ta
r
get\boot-01-helloworld-1.0-SNAPSHOT.jar
```
新值
## 已解决
### 解决办法
关闭火绒保护文件(限制应用程序访问)功能。
遇到类似情况的可以看看自己的杀毒/安全软件。
## 以下原文
同学们有遇到这种情况吗?怎么解决呢?
相关日志如下:
```
>java -version
java v
e
rsion "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
```
```
>mvn -v
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: D:\Develop_Tools\Maven\apache-maven
-
3.8.4
Java vers
i
on: 1.8.0_18
1
, vendor: Oracle Corporation, runtime: D:\Develop_Tools\Java\jdk1.8.0_181\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
```
清理并打包:
```
>mvn clean
p
a
ckage
[INFO]
Sca
n
ning for projects...
[INFO]
[INFO]
-------------------< com.atguigu:boot-01-helloworld >-------------------
[INFO]
Building boot-01-helloworld 1.0-SNAPSHOT
[INFO] ---
------
-
--------
-
-------------[ jar ]---------
-
---------------
-
--
-
----
[INFO]
[INFO]
--- maven-clean-plug
i
n:3.1.0:clean (default-clean) @ boot-01-helloworld ---
[INFO]
Deleting D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target
[INFO]
[INFO]
--- maven-resour
c
es-plugin:3.1.0:resources (default-resources) @ boot-01-helloworld ---
[INFO]
Us
i
ng 'UTF-8' e
n
coding to copy filtered r
e
sourc
e
s.
[INFO]
Copying 1 resource
[INFO]
Copying 2 resources
[INFO]
[INFO]
--- maven-compiler-plugin:3.8.1:compile (default-compile) @ boot-01-helloworld ---
[INFO]
Changes detected - recompiling the modul
e
!
[INFO]
C
o
mpiling 7
source files to D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target\classes
[INFO]
[INFO] --- maven-
resources-plugin
:
3.1.0:testResou
r
ces
(default-testResources) @ boot-01-helloworld ---
[INFO]
Us
i
ng 'UTF-8'
enco
d
ing to
c
opy filtered res
o
urces.
[INFO]
skip non existing resourceDirectory D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\src\test\resources
[INFO]
[INFO]
--- maven-compiler-plugin:3.8.1:testCompile (d
e
fault-testCompile) @ boot-01-helloworld ---
[INFO]
No sources to compile
[INFO]
[INFO] ---
maven
-
surefire
-
plugin:2.22.2:test (default
-
test) @ boot
-
01
-
helloworld ---
[INFO]
N
o
tes
t
s to
run.
[INFO]
[INFO] ---
maven
-
jar
-
plugin:3.2.0:jar (default
-
jar) @ boot
-
01
-
helloworld
---
[INFO] Building jar: D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target\boot-01-helloworld-1.0-SNAPSHOT.jar
[INFO]
[INFO] ---
sp
r
ing-
boot-
maven-plugin:2.3.4.RELEASE:repackage (repackage) @ boot-01-helloworld ---
[INFO]
Replacing main ar
t
if
a
ct with
r
epackaged archive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.463 s
[INFO] Finished at: 2021-11-28T16:52:24+08:00
[INFO] ------------------------------------------------------------------------
运行
```
>java -jar target\boot-01-helloworld-1.0-SNAPSHOT.jar
Error: Invalid or corrupt jarfile target\boot-01-helloworld-1.0-SNAPSHOT.jar
```
李德银
修改了
标题
原值
直接克隆仓库打包运行依然 Error: Invalid or cor
r
upt jarfile targe
t
\boo
t
-01-hellowor
l
d-1.0-SNAPSHOT.jar
新值
[已解决]直接克隆仓库打包运行依然 Error: Invalid o
r
corrupt jarfile
t
arge
t
\boot-01-hel
l
oworld-1.0-SNAPSHOT.jar
李德银
修改了
描述
原值
## 已解决
### 解决办法
关闭火绒保护文件(限制应用程序访问)功能。
遇到类似情况的可以看看自己的杀毒/安全软件。
## 以下原文
同学们有遇到这种情况吗?怎么解决呢?
相关日志如下:
```
>java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
```
```
>mvn -v
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: D:\Develop_Tools\Maven\apache-maven-3.8.4
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: D:\Develop_Tools\Java\jdk1.8.0_181\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
```
清理并打包:
```
>mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< com.atguigu:boot-01-helloworld >-------------------
[INFO] Building boot-01-helloworld 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ boot-01-helloworld ---
[INFO] Deleting D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ boot-01-helloworld ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ boot-01-helloworld ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target\classes
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ boot-01-helloworld ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ boot-01-helloworld ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ boot-01-helloworld ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ boot-01-helloworld ---
[INFO] Building jar: D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target\boot-01-helloworld-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:2.3.4.RELEASE:repackage (repackage) @ boot-01-helloworld ---
[INFO] Replacing main artifact with repackaged archive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.463 s
[INFO] Finished at: 2021-11-28T16:52:24+08:00
[INFO] ------------------------------------------------------------------------
运行
```
>java -jar target\boot-01-helloworld-1.0-SNAPSHOT.jar
Error: Invalid or corrupt jarfile target\boot-01-helloworld-1.0-SNAPSHOT.jar
```
新值
## 已解决
### 解决办法
关闭火绒保护文件(限制应用程序访问)功能。
遇到类似情况的可以看看自己的杀毒/安全软件。
## 以下原文
同学们有遇到这种情况吗?怎么解决呢?
相关日志如下:
```
>java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
```
```
>mvn -v
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: D:\Develop_Tools\Maven\apache-maven-3.8.4
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: D:\Develop_Tools\Java\jdk1.8.0_181\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
```
清理并打包:
```
>mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< com.atguigu:boot-01-helloworld >-------------------
[INFO] Building boot-01-helloworld 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ boot-01-helloworld ---
[INFO] Deleting D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ boot-01-helloworld ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ boot-01-helloworld ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target\classes
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ boot-01-helloworld ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ boot-01-helloworld ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ boot-01-helloworld ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ boot-01-helloworld ---
[INFO] Building jar: D:\IdeaProjects\Demo\springboot2\boot-01-helloworld\target\boot-01-helloworld-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:2.3.4.RELEASE:repackage (repackage) @ boot-01-helloworld ---
[INFO] Replacing main artifact with repackaged archive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.463 s
[INFO] Finished at: 2021-11-28T16:52:24+08:00
[INFO] ------------------------------------------------------------------------
```
运行
```
>java -jar target\boot-01-helloworld-1.0-SNAPSHOT.jar
Error: Invalid or corrupt jarfile target\boot-01-helloworld-1.0-SNAPSHOT.jar
```
展开全部操作日志
折叠全部操作日志
登录
后才可以发表评论
状态
待办的
待办的
进行中
已完成
已关闭
负责人
未设置
标签
未设置
标签管理
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
未关联
master
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
参与者(1)