Thank you. That looks pretty close to what I was looking for. (The perfect solution would not involve modifying the pom and could therefore be used with any arbitrary project. But this might be manageable. Thanks.)
-----Original Message----- From: Lester Ecarma [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 21, 2005 2:58 PM To: Maven Users List Subject: Re: overridding the output directory Hi, Try adding the ff: to your pom <build> <directory>${directory}</directory> </build> <properties> <directory>target</directory> </properties> Then, you may issue something like mvn -Ddirectory=tmp/outputDirectory package This will spit out the jar file in the specified directory (${basedir}/tmp/outputDirectory). If you want the compiled classes and test classes to be placed in the same directory, you may extend the pom fragment to <build> <directory>${directory}</directory> <outputDirectory>${directory}/classes</outputDirectory> <testOutputDirectory>${directory}/test-classes</testOutputDirectory> </build> <properties> <directory>target</directory> </properties> To clean just issue something like mvn -Ddirectory=tmp clean Hope this works for you. -Lester Christopher Cobb wrote: >I would occasionally like to put my jar file in a different directory. Is >there something along the lines of: > > > >mvn -Dproject.build.outputDirectory=/tmp/outputDirectory package > > > >that will allow me to do a one-off build without having to modify >configuration files? The line above does not do anything different than the >standard build. > > > > > > > > > > > > >----------------------------------------- >Attention: >Any views expressed in this message are those of the individual sender, >except where the message states otherwise and the sender is authorized >to state them to be the views of any such entity. The information >contained in this message and or attachments is intended only for the >person or entity to which it is addressed and may contain confidential >and/or privileged material. If you received this in error, please >contact the sender and delete the material from any system and destroy >any copies. > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]