Я пытаюсь выполнить несколько целей в мавенавыполнение нескольких задач с параметрами в мавена
У меня есть pom.xml как
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>verify</phase>
<goals>
<goal>jmeter</goal>
</goals>
<configuration>
<testFilesIncluded>
<jMeterTestFile>${mytest}</jMeterTestFile>
</testFilesIncluded>
<propertiesUser>
<hostName>${myhost}</hostName>
<port>${myport}</port>
<protocol>${myprotocol}</protocol>
</propertiesUser>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>de.codecentric</groupId>
<artifactId>jmeter-graph-maven-plugin</artifactId>
<version>0.1.0</version>
<executions>
<execution>
<id>create-graphs</id>
<goals>
<goal>create-graph</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<id>runcommand</id>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>mvn</executable>
<arguments>
<argument>**com.lazerycode.jmeter:jmeter-maven-plugin:1.4.1:[email protected] -Dmyhost=hix.qa.com -Dmyport=80 -Dmyprotocol=http -Dmythreads=5 -Dmyloopcount=20 -Dmyrampup=1 -Dmytest=ScreenerAPI.jmx**</argument>
<argument>de.codecentric:jmeter-graph-maven-plugin:0.1.0:[email protected]</argument>
</arguments>
</configuration>
</plugin>
</plugins>
У меня есть два аргумента, упомянутые в орг. плагин codehaus.
Выполнение следующей команды с отключенным аргументом1 прекращает работу.
mvn org.codehaus.mojo:exec-maven-plugin:1.4.0:[email protected]
Но когда я запускаю команду с обоими аргументы включена дает мне ошибку
не удалось выполнить цели com.lazerycode.jmeter: JMeter-Maven-плагин: 1.4.1: JMeter @ JMeter тесты -Dmyhost = hix.qa.com -Dmyport = 80 -Dmyprotocol = HTTP -Dmythreads = 5 -Dmyloopcount = 20 -Dmyrampup = 1 -Dmytest = ScreenerAPI.jmx
работает и Цель 1 Цель 2 indivudally с параметрами от линии cmd отлично работает.
mvn de.codecentric:jmeter-graph-maven-plugin:0.1.0:[email protected]
mvn com.lazerycode.jmeter:jmeter-maven-plugin:1.4.1:[email protected] "-Dmyhost=hix.qa.com" "-Dmyport=80" "-Dmyprotocol=http" "-Dmythreads=5" "-Dmyloopcount=20" "-Dmyrampup=1" "-Dmytest=ScreenerAPI.jmx"
Как передать параметры одной цели из командной строки при запуске нескольких целей?
Вы используете очень старые версии плагина-метр-maven и плагин meter-graph-maven. Я бы предложил обновить до последних версий, которые намного надежнее. – Ardesco