我正在尝试对现有的Java应用程序测试AspectJ。日食
Run > Debug Configuration > Parameter tab > VM Parameters
我设置了以下设置。
-javaagent:lib/aspectjweaver-1.8.6.jar
当我按[Debug]时,出现以下错误。
Error occurred during initialization of VM agent library failed to
init: instrument Error opening zip file or JAR manifest missing :
lib/aspectjweaver-1.8.6.jar-noverify
通过
Windows > Show View > Others > Debug
,然后右键单击“属性”。我检查了命令行,它确实显示了
C:\pleiades\java\8\bin\javaw.exe
-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:61420 -Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=61419
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=localhost
-Dspring.application.admin.enabled=true
-javaagent:lib/aspectjweaver-1.8.6.jar-noverify
-XX:TieredStopAtLevel=1
-Dfile.encoding=UTF-8
-classpath
....
我不知道是什么增加了-新奇。我尝试在VM参数设置中添加空格或换行符,但它会截断空白。
-javaagent:lib/aspectjweaver-1.8.6.jar-noverify
我在整个项目结构中搜索“-noverify”,看到它被添加到根maven中。我正在使用的项目结构使用父maven。
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<argLine>-noverify</argLine>
<skipTests>true</skipTests>
</configuration>
</plugin>
根据我的理解,应该没有效果。另外,我删除了上面的插件,它仍然在我的代理设置中添加了-noverify。
有什么想法吗?