You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by solo turn <so...@gmail.com> on 2006/10/18 22:56:19 UTC
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: clear separation of source and target
Posted by Brad Davis <bd...@saintandreas.org>.
solo turn wrote:
> is it possible to do that by:
> * configuring maven to put generated files somewhere out of this
> directory, or
This really depends on how you're generating things. In my instance I'm
using maven to call ant to call XJC and generate code from a schema.
This ends up going into a src/generated/java source folder, but that's
configured in the XJC task, and I would imagine its going to be the same
for other code generation tools. You tell the tool where you want it
and assume that the pom location is going to be the root for any
relative path.
> * configuring the source code control by excluding a directory resp a
> fixed set of directories
> ?
Again, this is system dependent. We use CVS where I work and so
excluding something from source control is a matter of adding it to the
.cvsignore file, thus telling source control tools not to include the
generated files when syncing with source control. This is going to be a
part of the source control system though, not maven.
Brad
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: clear separation of source and target
Posted by solo turn <so...@gmail.com>.
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, Greg_Vaughn@countrywide.com <Gr...@countrywide.com> 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
> greg_vaughn@countrywide.com
>
>
>
> "solo turn" <so...@gmail.com>
> 10/18/2006 03:56 PM
> Please respond to
> "Maven Users List" <us...@maven.apache.org>
>
>
> To
> "Maven Developers List" <us...@maven.apache.org>
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
> ======================================================================
> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: clear separation of source and target
Posted by Rémy Sanlaville <re...@gmail.com>.
Solo,
It's difficult to reply like this. It depends of your organisation,
projects.
Prehaps, you can create your corporate pom which all yours projects
inherits.
But I think it's difficult to generalize the XDoclect plugin for all your
projects.
A better way is to look at profile ?
Rémy
2006/10/20, solo turn <so...@gmail.com>:
>
> thanks a lot remy,
>
> how could you do this for a lot of projects without adding it to every
> pom?
>
> -solo.
>
>
Re: clear separation of source and target
Posted by solo turn <so...@gmail.com>.
thanks a lot remy,
how could you do this for a lot of projects without adding it to every pom?
-solo.
On 10/19/06, Rémy Sanlaville <re...@gmail.com> wrote:
> I do it with XDoclet like this and it works well :
>
> <artifactId>xdoclet-maven-plugin</artifactId>
> <executions>
> <execution>
> <phase>generate-sources</phase>
> <goals>
> <goal>xdoclet</goal>
> </goals>
> <configuration>
> <tasks>
> <ejbdoclet
> destDir="${project.build.directory}/generated-sources/xdoclet"
> ejbSpec="2.1" verbose="true" force="true">
> <fileset dir="${project.build.sourceDirectory}">
> <include name="**/*Bean.java"></include>
> <include name="**/*MDB.java"></include>
> </fileset>
> ...
>
> HTH,
>
> Rémy
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: clear separation of source and target
Posted by Rémy Sanlaville <re...@gmail.com>.
I do it with XDoclet like this and it works well :
<artifactId>xdoclet-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>xdoclet</goal>
</goals>
<configuration>
<tasks>
<ejbdoclet
destDir="${project.build.directory}/generated-sources/xdoclet"
ejbSpec="2.1" verbose="true" force="true">
<fileset dir="${project.build.sourceDirectory}">
<include name="**/*Bean.java"></include>
<include name="**/*MDB.java"></include>
</fileset>
...
HTH,
Rémy
Re: clear separation of source and target
Posted by Gr...@Countrywide.Com.
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
greg_vaughn@countrywide.com
"solo turn" <so...@gmail.com>
10/18/2006 03:56 PM
Please respond to
"Maven Users List" <us...@maven.apache.org>
To
"Maven Developers List" <us...@maven.apache.org>
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
======================================================================
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.
======================================================================