You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by sarmahdi <sa...@hotmail.com> on 2012/03/24 16:45:59 UTC

Mvn command line options

Hello,

I did the mvn.bat --help and it gave me  a list of options.

I need to know that IF i want to write a batch or shell script for three
different projects. how can i do that. 

/echo Starting Maven build process

cd c:\demo1\workspace\finApp\
mvn.bat install

echo Finish finApp

cd c:\demo1\workspace\Communications\
mvn.bat install

echo Finish Communications/

It never reaches the the "echo Finish finApp" even. it stops after
completing the install on finApp.

What can I do to actually acheive a script that can build my projects one by
one.

Thanks
for the help

Syed... 

--
View this message in context: http://maven.40175.n5.nabble.com/Mvn-command-line-options-tp5591867p5591867.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: Mvn command line options

Posted by Wayne Fay <wa...@gmail.com>.
> Is there a way in eclipse that i can make a Parent POM project (with package
> type POM) which is in the work space that the other projects are located but
> not inside the parent project (like a relative reference to them would work

This is somewhat common for certain sets of Maven users (mostly Eclipse users).

Project dir
-jar (references parent as ../parent)
-war (ditto)
-ear (ditto)
-parent (references modules as ../jar etc)

Wayne

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


Re: Mvn command line options

Posted by sarmahdi <sa...@hotmail.com>.
Thanks Dirk, 
 Yes ! :) when i realized that i need something in batch scripting i did
search I used Start as well it makes a new window open and makes batch
commands in parallel.. but i actually needed call as you pointed out ..


Wayne,

Is there a way in eclipse that i can make a Parent POM project (with package
type POM) which is in the work space that the other projects are located but
not inside the parent project (like a relative reference to them would work
may be?)

I made a simple project changed the package type to pom and added the jar
and war and ear modules in it under <modules> but when i tried that it said
that it cannot see the child projects inside the parent projects folder. 
If i am able to have a parent project that doesnt touch the directopry
structure as it is now it will help me other wise i would need to move those
projects within the parent project and thats a bit of a change that will
have to go to my clearcase (SCM) and will confuse a lot of ppl. Why is that
an issue : cos Only iuse maven and no one else needs it.

Thanks.

--
View this message in context: http://maven.40175.n5.nabble.com/Mvn-command-line-options-tp5591867p5592956.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: Mvn command line options

Posted by Dirk Olmes <di...@xanthippe.ping.de>.
Am 24.03.2012 um 16:45 schrieb sarmahdi <sa...@hotmail.com>:

> Hello,
> 
> I did the mvn.bat --help and it gave me  a list of options.
> 
> I need to know that IF i want to write a batch or shell script for three
> different projects. how can i do that. 
> 
> /echo Starting Maven build process
> 
> cd c:\demo1\workspace\finApp\
> mvn.bat install
> 
> echo Finish finApp
> 
> cd c:\demo1\workspace\Communications\
> mvn.bat install
> 
> echo Finish Communications/
> 
> It never reaches the the "echo Finish finApp" even. it stops after
> completing the install on finApp.

That's the behaviour of windows batch scripts ... Try "call mvn.bat install" 

-dirk

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


Re: Mvn command line options

Posted by Dave King <de...@gmail.com>.
Try "cmd /?"?

There may be an option to keep going.

Regards,
Dave
 On Mar 24, 2012 9:46 AM, "sarmahdi" <sa...@hotmail.com> wrote:

> Hello,
>
> I did the mvn.bat --help and it gave me  a list of options.
>
> I need to know that IF i want to write a batch or shell script for three
> different projects. how can i do that.
>
> /echo Starting Maven build process
>
> cd c:\demo1\workspace\finApp\
> mvn.bat install
>
> echo Finish finApp
>
> cd c:\demo1\workspace\Communications\
> mvn.bat install
>
> echo Finish Communications/
>
> It never reaches the the "echo Finish finApp" even. it stops after
> completing the install on finApp.
>
> What can I do to actually acheive a script that can build my projects one
> by
> one.
>
> Thanks
> for the help
>
> Syed...
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Mvn-command-line-options-tp5591867p5591867.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: Mvn command line options

Posted by sarmahdi <sa...@hotmail.com>.
Oh i did not reject it. It the actual way of doing it i know and i understand
( a more logical way as well) but I have an eclipse workspace which i
mavenized and some vendors also use it to help in development and it will be
hard for them to get changes on their end. they usually arent flexible so
adding a new POM project will be a lil difficult. 


my question sounds more like a shell/batch scripting question now. hmm. 

Syed...

--
View this message in context: http://maven.40175.n5.nabble.com/Mvn-command-line-options-tp5591867p5592889.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: Mvn command line options

Posted by Wayne Fay <wa...@gmail.com>.
> As we're on the Maven list, a better way to do this is to simply define a
> new POM project that aggregates the modules you need built.  You would
> simply have a "modules" list with entries like "../finApp" and
> "../Communications". You would place this new module as a peer of "finApp"
> and "Communications".  Then, you just do "mvn install" in your new module.

This has already been suggested and rejected. I have no idea why.

Wayne

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


Re: Mvn command line options

Posted by David Karr <da...@gmail.com>.
On Sat, Mar 24, 2012 at 8:45 AM, sarmahdi <sa...@hotmail.com> wrote:

> Hello,
>
> I did the mvn.bat --help and it gave me  a list of options.
>
> I need to know that IF i want to write a batch or shell script for three
> different projects. how can i do that.
>
> /echo Starting Maven build process
>
> cd c:\demo1\workspace\finApp\
> mvn.bat install
>
> echo Finish finApp
>
> cd c:\demo1\workspace\Communications\
> mvn.bat install
>
> echo Finish Communications/
>
> It never reaches the the "echo Finish finApp" even. it stops after
> completing the install on finApp.
>
> What can I do to actually acheive a script that can build my projects one
> by
> one.
>

As we're on the Maven list, a better way to do this is to simply define a
new POM project that aggregates the modules you need built.  You would
simply have a "modules" list with entries like "../finApp" and
"../Communications". You would place this new module as a peer of "finApp"
and "Communications".  Then, you just do "mvn install" in your new module.

Re: Mvn command line options

Posted by Martin Schayna <ms...@gmail.com>.
Hi,

I don't know much about Windows cmd.exe, but I remember something like call
command:

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/call.mspx

Martin Schayna


On Sat, Mar 24, 2012 at 4:45 PM, sarmahdi <sa...@hotmail.com> wrote:

> Hello,
>
> I did the mvn.bat --help and it gave me  a list of options.
>
> I need to know that IF i want to write a batch or shell script for three
> different projects. how can i do that.
>
> /echo Starting Maven build process
>
> cd c:\demo1\workspace\finApp\
> mvn.bat install
>
> echo Finish finApp
>
> cd c:\demo1\workspace\Communications\
> mvn.bat install
>
> echo Finish Communications/
>
> It never reaches the the "echo Finish finApp" even. it stops after
> completing the install on finApp.
>
> What can I do to actually acheive a script that can build my projects one
> by
> one.
>
> Thanks
> for the help
>
> Syed...
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Mvn-command-line-options-tp5591867p5591867.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
>
>