Re: Excluding source directory branches during compilation

2007-01-15 Thread franz see

Good day to you, Roberto,

If you have something like src/main/java/trunk and src/main/java/branches,
you can simply do

project
  ...
  build
sourceDirectorysrc/main/java/trunk/sourceDirectory
  /build
/project

Cheers,
Franz


Roberto UserList wrote:
 
 Hi, all!
 I'd like to compile a subproject with Maven2 but i'd like not to compile
 files of all directory branches. How can I exclude a specific source
 directory?
 Tahnks in advance for help.
 Regards,
 Roberto.
 
 

-- 
View this message in context: 
http://www.nabble.com/Excluding-source-directory-branches-during-compilation-tf3013910s177.html#a8373047
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Excluding source directory branches during compilation

2007-01-15 Thread Roberto UserList

Franz, what can I do if there are, for example, two more directories:
src/main/java/trash1
src/main/java/traxh2
and I'd like only to compile the files inside trunk and branches
directories?
How can I tell Maven  not to compile files in trash1 and trash2 directories?
Tanks a lot in advance.
Regards,
Roberto.


On 1/15/07, franz see [EMAIL PROTECTED] wrote:



Good day to you, Roberto,

If you have something like src/main/java/trunk and src/main/java/branches,
you can simply do

project
...
build
   sourceDirectorysrc/main/java/trunk/sourceDirectory
/build
/project

Cheers,
Franz


Roberto UserList wrote:

 Hi, all!
 I'd like to compile a subproject with Maven2 but i'd like not to compile
 files of all directory branches. How can I exclude a specific source
 directory?
 Tahnks in advance for help.
 Regards,
 Roberto.



--
View this message in context:
http://www.nabble.com/Excluding-source-directory-branches-during-compilation-tf3013910s177.html#a8373047
Sent from the Maven - Users mailing list archive at Nabble.com.


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




Re: Excluding source directory branches during compilation

2007-01-15 Thread franz see

Good day to you, Roberto,

If you have only one source directory, you can use

project
  ...
  build
sourceDirectorysome/path/to/your/java/files/sourceDirectory
  /build
/project

But if have several directories, on top of my head, I guess you'd have to
use the resources plugin. In your case, if you have

.
 `-- src
  `-- main
   `-- java
|-- trash1
|-- traxh2
|-- trunk
`-- branches

and you want to compile two source directories: src/main/java/trunk and
src/main/java/branches, you can try something like...

project
  ...

  build
resources
  resource
directorysrc/main/java/trunk/directory
targetPath../../src/main/java/merge/targetPath
  /resource
  resource
directorysrc/main/java/branches/directory
targetPath../../src/main/java/merge/targetPath
  /resource
/resources

sourceDirectorysrc/main/java/merge/sourceDirectory
  /build

/project

This would copy your java files from trunk and branches into merge, and
compile those.

Furthermore, to ensure that the merged files are deleted when you do a mvn
clean, add this to your pom as well

project
  ...
  build
...

plugins
  plugin
artifactIdmaven-clean-plugin/artifactId
configuration
  filesets
fileset
  directorysrc/main/java/merge/directory
/fileset
  /filesets
/configuration
  /plugin
/plugins
  /build
/project

This will add src/main/java/merge to the list of directories maven will
delete with mvn clean.

Cheers,
Franz


Roberto UserList wrote:
 
 Franz, what can I do if there are, for example, two more directories:
 src/main/java/trash1
 src/main/java/traxh2
 and I'd like only to compile the files inside trunk and branches
 directories?
 How can I tell Maven  not to compile files in trash1 and trash2
 directories?
 Tanks a lot in advance.
 Regards,
 Roberto.
 
 
 On 1/15/07, franz see [EMAIL PROTECTED] wrote:


 Good day to you, Roberto,

 If you have something like src/main/java/trunk and
 src/main/java/branches,
 you can simply do

 project
 ...
 build
sourceDirectorysrc/main/java/trunk/sourceDirectory
 /build
 /project

 Cheers,
 Franz


 Roberto UserList wrote:
 
  Hi, all!
  I'd like to compile a subproject with Maven2 but i'd like not to
 compile
  files of all directory branches. How can I exclude a specific source
  directory?
  Tahnks in advance for help.
  Regards,
  Roberto.
 
 

 --
 View this message in context:
 http://www.nabble.com/Excluding-source-directory-branches-during-compilation-tf3013910s177.html#a8373047
 Sent from the Maven - Users mailing list archive at Nabble.com.


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


 
 

-- 
View this message in context: 
http://www.nabble.com/Excluding-source-directory-branches-during-compilation-tf3013910s177.html#a8382087
Sent from the Maven - Users mailing list archive at Nabble.com.


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