Page 1 of 1

Batch stops and prompts me

Posted: 14 May 2010 05:27
by nicdo77
Hello

I have a little problem
I created a batch i named mvncp.bat, helping me to launch a sequence of maven commands
The batch is liek this

Code: Select all

mvn clean
mvn package


Problem is, the batch stops after the first line and prompts me. Im expecting it to execute the second instruction automatically but that is not what it does.

Code: Select all

[b]C:\workspaces\Bra_Cat_SplashTool_Core>mvncp.bat[/b]

[b]C:\workspaces\Bra_Cat_SplashTool_Core>mvn clean[/b]
[INFO] Scanning for projects...
[INFO] snapshot com.buongiorno.gpp.wwf.portlets:cat-dependencies:1.0.0-ALPHA-SNAPSHOT: checking for updates from buongio
rno
Downloading: http://artifactory.buongiorno.com/artifactory/repo/com/buongiorno/gpp/wwf/portlets/cat-dependencies/1.0.0-A
LPHA-SNAPSHOT/cat-dependencies-1.0.0-ALPHA-SNAPSHOT.pom
[INFO] snapshot com.buongiorno.wwf:wwf-platform:2.4-ALPHA-SNAPSHOT: checking for updates from buongiorno
Downloading: http://artifactory.buongiorno.com/artifactory/repo/com/buongiorno/wwf/wwf-platform/2.4-ALPHA-SNAPSHOT/wwf-p
latform-2.4-ALPHA-SNAPSHOT.pom
[INFO] snapshot com.buongiorno:group-base:5.0-SNAPSHOT: checking for updates from buongiorno
Downloading: http://artifactory.buongiorno.com/artifactory/repo/com/buongiorno/group-base/5.0-SNAPSHOT/group-base-5.0-SN
APSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] Building com.buongiorno.bra.cat:wwf-splashTool:war:1.0.0.0-ALPHA-SNAPSHOT cvs $Name:  $
[INFO]    task-segment: [clean]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Fri May 14 13:17:38 CEST 2010
[INFO] Final Memory: 9M/16M
[INFO] ------------------------------------------------------------------------
[b]C:\workspaces\Bra_Cat_SplashTool_Core>[/b]



Nicolas

Re: Batch stops and prompts me

Posted: 14 May 2010 08:38
by avery_larry
is mvn a script or executable? If it's a script, then you need to call it

call mvn clean
call mvn package


Otherwise it's probably something with the way mvn exits. You could try the start command:

start /wait "" mvn clean
start /wait "" mvn package

Re: Batch stops and prompts me

Posted: 18 May 2010 04:25
by nicdo77
Sorry i forgot to answer and thank you.
Indeed it worked as you said, so thanks a lot :-)
Im new to batch scripts and i have to say i like this!