You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "wangq/Wang Qiang(IT)" <wa...@COSCON.COM> on 2007/08/04 10:17:41 UTC

two questions about maven

Dear Sirs

I'm maven's new user.

There are some questions I want to ask you. Can you help me

1 ) how can maven scm checkout two different directories into another two target directory. For Example, in cvs , I have two directories : /source/main , /source/test. I want to checkout them into /src/main/java and /src/test/java respectively (because this is maven default directory).  I don't want to use command line. but I don't know how to config in the POM.xml. Can you give me an example?

 

2 ) I want to use <includse> and <excludes> element to filter the .project file and bin directory. I only want to check out *.java file . In POM ,I configure as follows:

<executions>

         <execution>

             <id>check-out1</id>

             <phase>generate-sources</phase>

             <goals>

                   <goal>checkout</goal>

             </goals>

             <configuration>

                        <connectionType>developerConnection</connectionType>     

                        <checkoutDirectory>${project.basedir}/src</checkoutDirectory>

                        <includes>*.java</includes>

                        <excludes>.project, bin</excludes>

            </configuration>

 </execution>

 

but the .project file and bin directory are still checked out . what's wrong

 

 

Thanks a lot for  you help.

 

qiang wang




DISCLAIMER:
This e-mail is confidential for COSCO CONTAINER LINES (COSCON) and may also be privileged. Any unauthorized use, copying, or dissemination of it and any attachments to it, is prohibited. If you have received this e-mail in error, please delete it immediately, unread and notify the sender as soon as possible. COSCON does not warrant this email is virus-free and is not liable for any losses or responsibilities arising from any virus being transmitted by this email. Internet communications are not secure and COSCON does not accept legal responsibility for the contents of this message.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: two questions about maven

Posted by Antony Stubbs <an...@gmail.com>.
This seems to be working _against_ the maven way...

Why do you need this? Why not just configure your pom to tell maven where
your java and test java actually is?


wangq/Wang Qiang(IT) wrote:
> 
> Dear Sirs
> 
> I'm maven's new user.
> 
> There are some questions I want to ask you. Can you help me
> 
> 1 ) how can maven scm checkout two different directories into another two
> target directory. For Example, in cvs , I have two directories :
> /source/main , /source/test. I want to checkout them into /src/main/java
> and /src/test/java respectively (because this is maven default directory). 
> I don't want to use command line. but I don't know how to config in the
> POM.xml. Can you give me an example?
> 
>  
> 
> 2 ) I want to use <includse> and <excludes> element to filter the .project
> file and bin directory. I only want to check out *.java file . In POM ,I
> configure as follows:
> 
> <executions>
> 
>          <execution>
> 
>              <id>check-out1</id>
> 
>              <phase>generate-sources</phase>
> 
>              <goals>
> 
>                    <goal>checkout</goal>
> 
>              </goals>
> 
>              <configuration>
> 
>                        
> <connectionType>developerConnection</connectionType>     
> 
>                        
> <checkoutDirectory>${project.basedir}/src</checkoutDirectory>
> 
>                         <includes>*.java</includes>
> 
>                         <excludes>.project, bin</excludes>
> 
>             </configuration>
> 
>  </execution>
> 
>  
> 
> but the .project file and bin directory are still checked out . what's
> wrong
> 
>  
> 
>  
> 
> Thanks a lot for  you help.
> 
>  
> 
> qiang wang
> 
> 
> 
> 
> DISCLAIMER:
> This e-mail is confidential for COSCO CONTAINER LINES (COSCON) and may
> also be privileged. Any unauthorized use, copying, or dissemination of it
> and any attachments to it, is prohibited. If you have received this e-mail
> in error, please delete it immediately, unread and notify the sender as
> soon as possible. COSCON does not warrant this email is virus-free and is
> not liable for any losses or responsibilities arising from any virus being
> transmitted by this email. Internet communications are not secure and
> COSCON does not accept legal responsibility for the contents of this
> message.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/two-questions-about-maven-tf4222566s177.html#a12045716
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: two questions about maven

Posted by Eric Redmond <er...@gmail.com>.
Well, sure. I think we can all agree that the default answer to any of these
kinds of questions is "just do it the default Maven way". I presumed he was
dealing with a legacy layout - otherwise why the hell would you use CVS
anyway? :)

-- 
Eric Redmond
http://blog.propellors.net

On 8/7/07, Dave Hoffer <DH...@xrite.com> wrote:
>
> Why don't you change your code structure in cvs so you can just checkout
> the folder structure the way Maven wants it?
>
> In the long run it is better to go the Maven way instead of working
> around it.  In time you will have more folders...resources, etc to deal
> with and it is much easier to go with a standard.
>
> -Dave
>
> -----Original Message-----
> From: Eric Redmond [mailto:eric.redmond@gmail.com]
> Sent: Tuesday, August 07, 2007 8:34 PM
> To: Maven Users List
> Subject: Re: two questions about maven
>
> On 8/4/07, wangq/Wang Qiang(IT) <wa...@coscon.com> wrote:
> >
> > Dear Sirs
> >
> > I'm maven's new user.
> >
> > There are some questions I want to ask you. Can you help me
> >
> > 1 ) how can maven scm checkout two different directories into another
> two
> > target directory. For Example, in cvs , I have two directories :
> > /source/main , /source/test. I want to checkout them into
> /src/main/java and
> > /src/test/java respectively (because this is maven default directory).
> I
> > don't want to use command line. but I don't know how to config in the
> > POM.xml. Can you give me an example?
>
>
> Try creating two separate execution elements... like you do below, just
> two
> of them.
>
> 2 ) I want to use <includse> and <excludes> element to filter the
> .project
> > file and bin directory. I only want to check out *.java file . In POM
> ,I
> > configure as follows:
> >
> > <executions>
> >
> >          <execution>
> >
> >              <id>check-out1</id>
> >
> >              <phase>generate-sources</phase>
> >
> >              <goals>
> >
> >                    <goal>checkout</goal>
> >
> >              </goals>
> >
> >              <configuration>
> >
> >
> >
> <connectionType>developerConnection</connectionType>
> >
> >                         <checkoutDirectory>${project.basedir
> > }/src</checkoutDirectory>
> >
> >                         <includes>*.java</includes>
> >
> >                         <excludes>.project, bin</excludes>
> >
> >             </configuration>
> >
> > </execution>
>
>
> They are file patterns. Try: <includes>**/*.java</includes>. You should
> not
> require excludes.
>
> but the .project file and bin directory are still checked out . what's
> wrong
> >
> >
> >
> >
> >
> > Thanks a lot for  you help.
> >
> >
> >
> > qiang wang
> >
> >
> >
> >
> > DISCLAIMER:
> > This e-mail is confidential for COSCO CONTAINER LINES (COSCON) and may
> > also be privileged. Any unauthorized use, copying, or dissemination of
> it
> > and any attachments to it, is prohibited. If you have received this
> e-mail
> > in error, please delete it immediately, unread and notify the sender
> as soon
> > as possible. COSCON does not warrant this email is virus-free and is
> not
> > liable for any losses or responsibilities arising from any virus being
> > transmitted by this email. Internet communications are not secure and
> COSCON
> > does not accept legal responsibility for the contents of this message.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> Eric Redmond
> http://blog.propellors.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

RE: two questions about maven

Posted by Dave Hoffer <DH...@xrite.com>.
Why don't you change your code structure in cvs so you can just checkout
the folder structure the way Maven wants it?  

In the long run it is better to go the Maven way instead of working
around it.  In time you will have more folders...resources, etc to deal
with and it is much easier to go with a standard.

-Dave

-----Original Message-----
From: Eric Redmond [mailto:eric.redmond@gmail.com] 
Sent: Tuesday, August 07, 2007 8:34 PM
To: Maven Users List
Subject: Re: two questions about maven

On 8/4/07, wangq/Wang Qiang(IT) <wa...@coscon.com> wrote:
>
> Dear Sirs
>
> I'm maven's new user.
>
> There are some questions I want to ask you. Can you help me
>
> 1 ) how can maven scm checkout two different directories into another
two
> target directory. For Example, in cvs , I have two directories :
> /source/main , /source/test. I want to checkout them into
/src/main/java and
> /src/test/java respectively (because this is maven default directory).
I
> don't want to use command line. but I don't know how to config in the
> POM.xml. Can you give me an example?


Try creating two separate execution elements... like you do below, just
two
of them.

2 ) I want to use <includse> and <excludes> element to filter the
.project
> file and bin directory. I only want to check out *.java file . In POM
,I
> configure as follows:
>
> <executions>
>
>          <execution>
>
>              <id>check-out1</id>
>
>              <phase>generate-sources</phase>
>
>              <goals>
>
>                    <goal>checkout</goal>
>
>              </goals>
>
>              <configuration>
>
>
>
<connectionType>developerConnection</connectionType>
>
>                         <checkoutDirectory>${project.basedir
> }/src</checkoutDirectory>
>
>                         <includes>*.java</includes>
>
>                         <excludes>.project, bin</excludes>
>
>             </configuration>
>
> </execution>


They are file patterns. Try: <includes>**/*.java</includes>. You should
not
require excludes.

but the .project file and bin directory are still checked out . what's
wrong
>
>
>
>
>
> Thanks a lot for  you help.
>
>
>
> qiang wang
>
>
>
>
> DISCLAIMER:
> This e-mail is confidential for COSCO CONTAINER LINES (COSCON) and may
> also be privileged. Any unauthorized use, copying, or dissemination of
it
> and any attachments to it, is prohibited. If you have received this
e-mail
> in error, please delete it immediately, unread and notify the sender
as soon
> as possible. COSCON does not warrant this email is virus-free and is
not
> liable for any losses or responsibilities arising from any virus being
> transmitted by this email. Internet communications are not secure and
COSCON
> does not accept legal responsibility for the contents of this message.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Eric Redmond
http://blog.propellors.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: two questions about maven

Posted by Eric Redmond <er...@gmail.com>.
On 8/4/07, wangq/Wang Qiang(IT) <wa...@coscon.com> wrote:
>
> Dear Sirs
>
> I'm maven's new user.
>
> There are some questions I want to ask you. Can you help me
>
> 1 ) how can maven scm checkout two different directories into another two
> target directory. For Example, in cvs , I have two directories :
> /source/main , /source/test. I want to checkout them into /src/main/java and
> /src/test/java respectively (because this is maven default directory).  I
> don't want to use command line. but I don't know how to config in the
> POM.xml. Can you give me an example?


Try creating two separate execution elements... like you do below, just two
of them.

2 ) I want to use <includse> and <excludes> element to filter the .project
> file and bin directory. I only want to check out *.java file . In POM ,I
> configure as follows:
>
> <executions>
>
>          <execution>
>
>              <id>check-out1</id>
>
>              <phase>generate-sources</phase>
>
>              <goals>
>
>                    <goal>checkout</goal>
>
>              </goals>
>
>              <configuration>
>
>
>                         <connectionType>developerConnection</connectionType>
>
>                         <checkoutDirectory>${project.basedir
> }/src</checkoutDirectory>
>
>                         <includes>*.java</includes>
>
>                         <excludes>.project, bin</excludes>
>
>             </configuration>
>
> </execution>


They are file patterns. Try: <includes>**/*.java</includes>. You should not
require excludes.

but the .project file and bin directory are still checked out . what's wrong
>
>
>
>
>
> Thanks a lot for  you help.
>
>
>
> qiang wang
>
>
>
>
> DISCLAIMER:
> This e-mail is confidential for COSCO CONTAINER LINES (COSCON) and may
> also be privileged. Any unauthorized use, copying, or dissemination of it
> and any attachments to it, is prohibited. If you have received this e-mail
> in error, please delete it immediately, unread and notify the sender as soon
> as possible. COSCON does not warrant this email is virus-free and is not
> liable for any losses or responsibilities arising from any virus being
> transmitted by this email. Internet communications are not secure and COSCON
> does not accept legal responsibility for the contents of this message.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Eric Redmond
http://blog.propellors.net