I am trying to execute multiple goals in maven
I have my Pom.xml like
<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:jmeter@jmeter-tests -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:create-graph@create-graphs</argument>
</arguments>
</configuration>
</plugin>
</plugins>
I have two arguments mentioned in the org.codehaus plugin.
running the below command with argument1 disabled works fine.
mvn org.codehaus.mojo:exec-maven-plugin:1.4.0:exec@runcommand
But when I run the command with both are arguments enabled gives me an error
failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:1.4.1:jmeter@jmeter-tests -Dmyhost=hix.qa.com -Dmyport=80 -Dmyprotocol=http -Dmythreads=5 -Dmyloopcount=20 -Dmyrampup=1 -Dmytest=ScreenerAPI.jmx
running goal1 and goal2 indivudally with parameters from cmd line works fine.
mvn de.codecentric:jmeter-graph-maven-plugin:0.1.0:create-graph@create-graphs
mvn com.lazerycode.jmeter:jmeter-maven-plugin:1.4.1:jmeter@jmeter-tests "-Dmyhost=hix.qa.com" "-Dmyport=80" "-Dmyprotocol=http" "-Dmythreads=5" "-Dmyloopcount=20" "-Dmyrampup=1" "-Dmytest=ScreenerAPI.jmx"
How to pass parameters to one goal from command line while running multiple goals?