Maven Chronos JMeter插件

时间:2010-09-11 12:52:36

标签: testing maven-2 jmeter performance-testing

是否有人使用Chronos作为JMeter + Maven插件。我正在努力尝试使用Maven JMeter插件,并考虑尝试一下

我为chronos设置了pom,但是当我执行“mvn verify”时遇到以下异常 -

Maven cannot calculate your build plan, given the following information:

Tasks:
- verify

Current project:
Group-Id: chronos1
Artifact-Id: chronos1
Version: 0.0.1-SNAPSHOT
From file: C:\SelNG\chronos\pom.xml


Error message: Failed to resolve plugin for mojo binding: org.codehaus.mojo:chronos-maven-plugin:1.0-SNAPSHOT:jmeter
Root error message: Unable to download the artifact from any repository

是否因为repo中没有插件? 我的pom是 -

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>chronos1</groupId>
  <artifactId>chronos1</artifactId>
  <packaging>jar</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <name>chronos1</name>
  <url>http://maven.apache.org</url>

  <dependencies>
        <dependency>
              <groupId>junit</groupId>
              <artifactId>junit</artifactId>
              <version>3.8.1</version>
              <scope>test</scope>
        </dependency>
  </dependencies>

  <properties>
        <jmeter.home>C:/Program Files/jakarta-jmeter-2.4</jmeter.home>
  </properties>

  <build>
        <plugins>
              <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>chronos-maven-plugin</artifactId>
                    <version>1.0-SNAPSHOT</version>
                    <configuration>
                          <input>${basedir}/src/jmeter/EducationSSL.jmx</input>
                    </configuration>
                    <executions>
                          <execution>
                                <id>jmeter-tests</id>
                                <phase>verify</phase>
                                <goals>
                                      <goal>jmeter</goal>
                                </goals>
                          </execution>
                    </executions>
              </plugin>
        </plugins>
  </build>
  <reporting>
        <plugins>
              <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>chronos-maven-plugin</artifactId>
                    <version>1.0-SNAPSHOT</version>
              </plugin>
        </plugins>
  </reporting>

由于 Tarun K

1 个答案:

答案 0 :(得分:2)

我对插件没有任何特殊经验,但对于Codehaus插件的SNAPSHOT版本,您可能需要声明codehaus快照存储库:

<project>
  ...
  <pluginRepositories>
    <pluginRepository>
      <id>snapshots.repository.codehaus.org</id>
      <url>http://snapshots.repository.codehaus.org/</url>
    </pluginRepository>
    ...
  </pluginRepositories>
  ...
</project>