提问人:aakraj 提问时间:9/27/2023 最后编辑:aakraj 更新时间:9/28/2023 访问量:26
尝试执行 mvn verify 时出错 - 无法执行目标 com.lazerycode.jmeter:jmeter-analysis-maven-plugin:1.0.6:analyze
Error when trying to execute mvn verify - Failed to execute goal com.lazerycode.jmeter:jmeter-analysis-maven-plugin:1.0.6:analyze
问:
我正在尝试使用 jmeter-maven-plugin 执行集成测试,但即使所有测试都成功通过,也出现错误 -mvn clean verify
Failed to execute goal com.lazerycode.jmeter:jmeter-analysis-maven-plugin:1.0.6:analyze (default) on project my-integrationtests: Error analysing: /Users/...../integration-tests/target/8165f138-3899-407e-ad2f-51402e4693e7/jmeter/bin/templates.dtd (No such file or directory)
版本:
Apache Maven 3.6.3 Java version: 17.0.6 Default locale: en_IN, platform encoding: UTF-8 OS name: "mac os x", version: "13.5.2", arch: "x86_64", family: "mac"
聚 甲醛:
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>3.7.0</version>
<executions>
<execution>
<id>configuration</id>
<goals>
<goal>configure</goal>
</goals>
</execution>
<execution>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
<execution>
<id>jmeter-check-results</id>
<goals>
<goal>results</goal>
</goals>
</execution>
</executions>
<configuration>
<generateReports>true</generateReports>
<appendResultsTimestamp>true</appendResultsTimestamp>
</configuration>
</plugin>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-analysis-maven-plugin</artifactId>
<version>1.0.6</version>
<executions>
<execution>
<phase>post-integration-test</phase>
<goals>
<goal>analyze</goal>
</goals>
<configuration>
<source>${project.build.directory}/**/*.xml</source>
<targetDirectory>${project.build.directory}/jmeter/results</targetDirectory>
<sourceDirFailed>true</sourceDirFailed>
<processAllFilesFound>true</processAllFilesFound>
</configuration>
</execution>
</executions>
</plugin>
在生成的目标文件夹中,我可以看到模板.dtd位于模板文件夹(模板/模板.dtd)中,而不是直接在垃圾箱(bin/templates,.dtd)中
原木:
[ERROR] Failed to execute goal com.lazerycode.jmeter:jmeter-analysis-maven-plugin:1.0.6:analyze (default) on project my-integrationtests: Error analysing: /Users/...../integration-tests/target/55550f20-5509-45a8-b069-4daaf645953a/jmeter/bin/templates.dtd (No such file or directory) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.lazerycode.jmeter:jmeter-analysis-maven-plugin:1.0.6:analyze (default) on project my-integrationtests: Error analysing
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error analysing
at com.lazerycode.jmeter.analyzer.AnalyzeMojo.execute (AnalyzeMojo.java:233)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.io.FileNotFoundException: /Users/...../integration-tests/target/55550f20-5509-45a8-b069-4daaf645953a/jmeter/bin/templates.dtd (No such file or directory)
at java.io.FileInputStream.open0 (Native Method)
at java.io.FileInputStream.open (FileInputStream.java:216)
at java.io.FileInputStream.<init> (FileInputStream.java:157)
at java.io.FileInputStream.<init> (FileInputStream.java:111)
at sun.net.www.protocol.file.FileURLConnection.connect (FileURLConnection.java:86)
at sun.net.www.protocol.file.FileURLConnection.getInputStream (FileURLConnection.java:189)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity (XMLEntityManager.java:653)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity (XMLEntityManager.java:1397)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity (XMLEntityManager.java:1363)
at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource (XMLDTDScannerImpl.java:257)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch (XMLDocumentScannerImpl.java:1152)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next (XMLDocumentScannerImpl.java:1040)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next (XMLDocumentScannerImpl.java:943)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next (XMLDocumentScannerImpl.java:605)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument (XMLDocumentFragmentScannerImpl.java:542)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse (XML11Configuration.java:889)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse (XML11Configuration.java:825)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse (XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse (AbstractSAXParser.java:1224)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse (SAXParserImpl.java:637)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse (SAXParserImpl.java:326)
at com.lazerycode.jmeter.analyzer.parser.JMeterResultParser.aggregate (JMeterResultParser.java:58)
at com.lazerycode.jmeter.analyzer.ResultAnalyzer.analyze (ResultAnalyzer.java:42)
at com.lazerycode.jmeter.analyzer.AnalyzeMojo.analyze (AnalyzeMojo.java:318)
at com.lazerycode.jmeter.analyzer.AnalyzeMojo.execute (AnalyzeMojo.java:217)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
答: 暂无答案
评论