0

I have a Maven project which I assemble using the following command in the Terminal (Command Line):

mvn clean package -DskipTests=true

This assembles the project in a zip file inside the 'target' folder. I want like to know if it's possible to assemble the project in a different directory inside my machine.

Update on the duplicate claim: This is not a duplicate to the 'maven: how to place the output jar into another folder' because that question asks how to fix the jars' output from the POM file. My question is about being able to assemble the maven project in a zip file from the command line, so that the directory can be changed every time it's assembled if desired.

zb226
  • 9,586
  • 6
  • 49
  • 79
KJTWF
  • 9
  • 8
  • Why do you like to do that? – khmarbaise Feb 08 '18 at 19:55
  • I have a central test automation repository that tests 2 different projects. The apps are built and then the zip file is opened to run the tests, it's done automatically through Jenkins. It works perfectly I just need to be able to assemble them directly to the projects to avoid manually dragging and dropping. – KJTWF Feb 09 '18 at 17:36
  • If you are looking to change the directory that is used as your target directory. I believe this question has a solution: https://stackoverflow.com/questions/3908013/maven-how-to-change-path-to-target-directory-from-command-line – ilooner Feb 14 '18 at 18:34

0 Answers0