Maven: How to change path to target directory from command line?
(I want to use another target directory in some cases)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should use profiles.
And start maven with your profile
If you really want to define your directory from the command line you could do something like this (NOT recommended at all) :
And compile like this :
That’s because you can’t change the target directory by using
-Dproject.build.directory