Solo,

The conventional approach is that Maven will put all build artifacts in the "target" directory. And then you setup your version control system to ignore this directory. It works very well. Unless you have an extremely compelling reason to deviate from this convention, I wouldn't.

The details of setting up an "ignore" list depends on which version control system you are using. Here are two examples. Run these commands from the root of your module (the directory in which "target" will appear). I assume that "target" is the first ignore for the directory; if not, you should use 'svn propedit', and you won't need to 'cvs add'.

Subversion:
  svn propset svn:ignore target .
  svn commit -m "ignore target" .
(or use the "add to svn:ignore" command in a GUI tool to add the target dir to the ignore list, and commit the change to the directory in which you are ignoring "target")

CVS:
  echo "target" >> .cvsignore
  cvs add .cvsignore
  cvs commit -m "ignore target" .cvsignore
(or use the "add to .cvsignore" command in a GUI tool to add the target directory to the ignore list, and commit the change to / creation of the .cvsignore file)

You can add more than one pattern to an ignore list. Here's an example of the ignore list from one module in my current project:

.settings
.classpath
.project
velocity.log*
target

-Max

solo turn wrote:
thanks greg,

this is a very user friendly documentation ... no default values are
there so you have to guess or code read what it stands for :)

our motivation is that all files should be organised by "backup
class", i.e. we want a simpe way to throw away all built files if
necessary, and we do not want to backup it.

also i'd consider setting one company rule " where to put all
build/generated things would be simpler.

why do you think the scm approach better? do you have a sample ignore file?

best regards,

solo.

On 10/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I've never tried configuring maven to put generated files outside of its
default location, but this link
http://maven.apache.org/ref/current/maven-model/maven.html#class_build
seems to imply it can by setting the <build><directory> element.

I have setup both cvs and svn to ignore certain directories. Either one
should work for you, but I'd recommend the scm approach. The details will
depend on which scm tool you use.

Greg Vaughn
[EMAIL PROTECTED]



"solo turn" <[EMAIL PROTECTED]>
10/18/2006 03:56 PM
Please respond to
"Maven Users List" <[email protected]>


To
"Maven Developers List" <[email protected]>
cc

Subject
clear separation of source and target






hi,

is there an easy possibility to separate source code (which we write)
from generated things?

we'd prefer to keep the directory where  the pom is to stay clean of
all built and generated things to use source code control systems like
mercurial or darcs on that tree.

is it possible to do that by:
 * configuring maven to put generated files somewhere out of this
directory, or
 * configuring the source code control by excluding a directory resp a
fixed set of directories
?

-solo.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




======================================================================
Confidentiality Notice: The information contained in and transmitted with this communication is strictly confidential, is intended only for the use of the intended recipient, and is the property of Countrywide Financial Corporation or its affiliates and subsidiaries. If you are not the intended recipient, you are hereby notified that any use of the information contained in or transmitted with the communication or dissemination, distribution, or copying of this communication is strictly prohibited by law. If you have received this communication in error, please immediately return this communication to the sender and delete the original message and any copy of it in your possession.
======================================================================



---------------------------------------------------------------------
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]

Reply via email to