Eddy
Eddy

Reputation: 3723

how to change Maven default project output directory?

Hello everyone:

I need help , I'm new to maven. when I try to run my first maven command

in Windows 7 like:

mvn archetype:generate \
    -DgroupId=com.helloworld.test \
    -DpackageName=com.helloworld.test \
    -Dpackage=com.helloworld.test \
    -DartifactId=hello

and it succeed, and here is an output:

[INFO] project created from Archetype in dir: C:\Windows\system32\helloworld
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

my question is: how to change the default output directory ? like:

d:\maven\project\helloworld

thank you very much.

Upvotes: 1

Views: 1710

Answers (1)

Jigar Joshi
Jigar Joshi

Reputation: 240860

Either execute command from target directory or pass -Dbasedir=/path/to/dir

Upvotes: 1

Related Questions