You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by rajiv <ra...@gmail.com> on 2014/01/05 02:04:11 UTC

RE: Need an example of calling a batch file from maven please.

Hi I am using maven3
I want to execute my bat file from pom but it is not working please guide me
<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.4.3</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.7</version>
				<executions>
					<execution>
						<phase>run</phase>
						<configuration>
							<target name="RUN">
								<echo message="${basedir}"/>
								<exec executable="cmd"
					     dir="D:\Android Calabash\Reportplugin\Calabash\"
                          spawn="true">
									<arg value="/c"/>
									<arg value="cd Calabash"/>
									<arg value="D:\Android Calabash\Reportplugin\Calabash\run.bat"/>
								</exec>
							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

When i run  from cmd prompt

i used following commands
>mvn target:run
>mvn verify
>mvn run
>mvn exe:run
>mvn package

only build success but bat file not run




--
View this message in context: http://maven.40175.n5.nabble.com/Need-an-example-of-calling-a-batch-file-from-maven-please-tp47519p5780288.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Need an example of calling a batch file from maven please.

Posted by Barrie Treloar <ba...@gmail.com>.
On 5 January 2014 11:34, rajiv <ra...@gmail.com> wrote:
> Hi I am using maven3
> I want to execute my bat file from pom but it is not working please guide me

[del]

>
> i used following commands
>>mvn target:run
>>mvn verify
>>mvn run
>>mvn exe:run
>>mvn package
>
> only build success but bat file not run

Maven is not Ant.
There is too much here to explain properly and you would be much
better served to spend a few minutes reading one of the freely
available books at http://maven.apache.org/articles.html

This will give you some of the overview you need on you Maven journey.

I suspect you will even find example of how to invoke the ant plugin.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org