You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ben Anderson <be...@gmail.com> on 2004/11/03 13:23:58 UTC

maven test:test

Hi,
I have this in my project.xml
  <build>
    <sourceDirectory>${maven.src.dir}/com</sourceDirectory>
    <resources>
      <resource>
        <directory>${maven.src.dir}</directory>
        <includes>
          <include>*.xml</include>
          <include>*.dtd</include>
        </includes>
      </resource>
    </resources>
    <unitTest>
      <includes>
        <include>${maven.src.dir}/**/*Test*.java</include>
      </includes>
      <excludes>
        <exclude>${maven.src.dir}/**/TestAll.java</exclude>
        <exclude>${maven.src.dir}/**/*Abstract*.java</exclude>
      </excludes>
    </unitTest>
  </build>

my maven.src.dir I define elsewhere, but that's beside the point.  I
have a Test file right along side the rest of my src code.  When I do
java:compile, it gets compiled.  But when I do test:test I get "no
tests to run".  I tried taking out the ${maven.src.dir} inside the
<unitTest> tags, but that didn't help.  Any ideas what I'm doing
wrong?
Thanks,
Ben

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


Re: maven test:test

Posted by "matthew.hawthorne" <ma...@apache.org>.
Ben Anderson wrote:
> That did it - I didn't have <unitTestSourceDirectory> defined - I was
> just going off of this:
> http://maven.apache.org/reference/user-guide.html#POM_Inheritance
> 
> Once again I will say that it'd be pretty much impossible to use maven
> w/out being on this list or else delving into the code for every
> little thing as the documentation is so poor.  But I'm not complaining
> because this list has been very good to me :-)

If you have complaints, then I'd say go ahead and complain.  It's better 
than complaining, then saying that you're not really complaining.

While I wouldn't agree with you that the documentation is "poor", I 
would say that, like almost all documentation that I've seen, it could 
be improved.

I've found it very possible to use Maven successfully without asking 
questions on the list, as I'm sure many others have as well.

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


Re: maven test:test

Posted by Brett Porter <br...@gmail.com>.
Ben,

You are more than welcome to take your experiences, improve the
documentation and we'll apply it (and even give you the credit!)

:)

Thanks,
Brett


On Wed, 3 Nov 2004 07:35:34 -0500, Ben Anderson
<be...@gmail.com> wrote:
> That did it - I didn't have <unitTestSourceDirectory> defined - I was
> just going off of this:
> http://maven.apache.org/reference/user-guide.html#POM_Inheritance
> 
> Once again I will say that it'd be pretty much impossible to use maven
> w/out being on this list or else delving into the code for every
> little thing as the documentation is so poor.  But I'm not complaining
> because this list has been very good to me :-)
> 
> Thanks,
> Ben
> 
> 
> 
> 
> On Wed, 3 Nov 2004 05:30:09 -0700, Charles Daniels <cj...@yahoo.com> wrote:
> > Try adding these within <build>:
> >
> > <sourceDirectory>${maven.src.dir}</sourceDirectory>
> > <unitTestSourceDirectory>${maven.src.dir}</unitTestSourceDirectory>
> >
> > Notice that /com is not specified.
> >
> >
> >
> > > -----Original Message-----
> > > From: Ben Anderson [mailto:benanderson.us@gmail.com]
> > > Sent: Wednesday, November 03, 2004 5:24 AM
> > > To: users@maven.apache.org
> > > Subject: maven test:test
> > >
> > > Hi,
> > > I have this in my project.xml
> > >   <build>
> > >     <sourceDirectory>${maven.src.dir}/com</sourceDirectory>
> > >     <resources>
> > >       <resource>
> > >         <directory>${maven.src.dir}</directory>
> > >         <includes>
> > >           <include>*.xml</include>
> > >           <include>*.dtd</include>
> > >         </includes>
> > >       </resource>
> > >     </resources>
> > >     <unitTest>
> > >       <includes>
> > >         <include>${maven.src.dir}/**/*Test*.java</include>
> > >       </includes>
> > >       <excludes>
> > >         <exclude>${maven.src.dir}/**/TestAll.java</exclude>
> > >         <exclude>${maven.src.dir}/**/*Abstract*.java</exclude>
> > >       </excludes>
> > >     </unitTest>
> > >   </build>
> > >
> > > my maven.src.dir I define elsewhere, but that's beside the point.  I
> > > have a Test file right along side the rest of my src code.  When I do
> > > java:compile, it gets compiled.  But when I do test:test I get "no
> > > tests to run".  I tried taking out the ${maven.src.dir} inside the
> > > <unitTest> tags, but that didn't help.  Any ideas what I'm doing
> > > wrong?
> > > Thanks,
> > > Ben
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

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


Re: maven test:test

Posted by Ben Anderson <be...@gmail.com>.
That did it - I didn't have <unitTestSourceDirectory> defined - I was
just going off of this:
http://maven.apache.org/reference/user-guide.html#POM_Inheritance

Once again I will say that it'd be pretty much impossible to use maven
w/out being on this list or else delving into the code for every
little thing as the documentation is so poor.  But I'm not complaining
because this list has been very good to me :-)

Thanks,
Ben


On Wed, 3 Nov 2004 05:30:09 -0700, Charles Daniels <cj...@yahoo.com> wrote:
> Try adding these within <build>:
> 
> <sourceDirectory>${maven.src.dir}</sourceDirectory>
> <unitTestSourceDirectory>${maven.src.dir}</unitTestSourceDirectory>
> 
> Notice that /com is not specified.
> 
> 
> 
> > -----Original Message-----
> > From: Ben Anderson [mailto:benanderson.us@gmail.com]
> > Sent: Wednesday, November 03, 2004 5:24 AM
> > To: users@maven.apache.org
> > Subject: maven test:test
> >
> > Hi,
> > I have this in my project.xml
> >   <build>
> >     <sourceDirectory>${maven.src.dir}/com</sourceDirectory>
> >     <resources>
> >       <resource>
> >         <directory>${maven.src.dir}</directory>
> >         <includes>
> >           <include>*.xml</include>
> >           <include>*.dtd</include>
> >         </includes>
> >       </resource>
> >     </resources>
> >     <unitTest>
> >       <includes>
> >         <include>${maven.src.dir}/**/*Test*.java</include>
> >       </includes>
> >       <excludes>
> >         <exclude>${maven.src.dir}/**/TestAll.java</exclude>
> >         <exclude>${maven.src.dir}/**/*Abstract*.java</exclude>
> >       </excludes>
> >     </unitTest>
> >   </build>
> >
> > my maven.src.dir I define elsewhere, but that's beside the point.  I
> > have a Test file right along side the rest of my src code.  When I do
> > java:compile, it gets compiled.  But when I do test:test I get "no
> > tests to run".  I tried taking out the ${maven.src.dir} inside the
> > <unitTest> tags, but that didn't help.  Any ideas what I'm doing
> > wrong?
> > Thanks,
> > Ben
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> 
>

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


RE: maven test:test

Posted by Charles Daniels <cj...@yahoo.com>.
Try adding these within <build>:

<sourceDirectory>${maven.src.dir}</sourceDirectory>
<unitTestSourceDirectory>${maven.src.dir}</unitTestSourceDirectory> 

Notice that /com is not specified.

> -----Original Message-----
> From: Ben Anderson [mailto:benanderson.us@gmail.com] 
> Sent: Wednesday, November 03, 2004 5:24 AM
> To: users@maven.apache.org
> Subject: maven test:test
> 
> Hi,
> I have this in my project.xml
>   <build>
>     <sourceDirectory>${maven.src.dir}/com</sourceDirectory>
>     <resources>
>       <resource>
>         <directory>${maven.src.dir}</directory>
>         <includes>
>           <include>*.xml</include>
>           <include>*.dtd</include>
>         </includes>
>       </resource>
>     </resources>
>     <unitTest>
>       <includes>
>         <include>${maven.src.dir}/**/*Test*.java</include>
>       </includes>
>       <excludes>
>         <exclude>${maven.src.dir}/**/TestAll.java</exclude>
>         <exclude>${maven.src.dir}/**/*Abstract*.java</exclude>
>       </excludes>
>     </unitTest>
>   </build>
> 
> my maven.src.dir I define elsewhere, but that's beside the point.  I
> have a Test file right along side the rest of my src code.  When I do
> java:compile, it gets compiled.  But when I do test:test I get "no
> tests to run".  I tried taking out the ${maven.src.dir} inside the
> <unitTest> tags, but that didn't help.  Any ideas what I'm doing
> wrong?
> Thanks,
> Ben
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


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