You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by mike jones <mi...@gmail.com> on 2005/11/29 12:42:02 UTC

Confinguartion for different executions

Hi
I have the following on my POM to try and run different unit tests at
different phases of the lifecycle but I cant seem to configure the 2nd
execution.

Below is what I have tried last, but I have tried lots of vairations of this

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <executions>
          <execution>
            <configuration>
              <id>unit-test</id>
              <phase>test</phase>
              <includes>
                <include implementation="java.lang.String
">**/*.java</include>
              </includes>
              <excludes>
                <exclude implementation="java.lang.String
">**/initialadmindata/*.java</exclude>
              </excludes>
            </configuration>
            <id>unit-test</id>
            <phase>test</phase>
          </execution>
          <execution>
            <id>initial-admin-data</id>
            <configuration>
              <id>unit-test</id>
              <phase>test</phase>
              <includes>
                <include implementation="java.lang.String
">**/InitialAdminSuite.java</include>
              </includes>
            </configuration>
            <phase>integration-test</phase>
            <goals>
              <goal>test</goal>
            </goals>
          </execution>
        </executions>
      </plugin>



Any help would be appreciated.
Cheers
Mike




--
d-_-b \m/(>_<)\m/ (9ò_ó)-o(@_o)

Re: Confinguartion for different executions

Posted by Anuerin Diaz <ra...@gmail.com>.
Binding Antrun to multiple phases is now added in the user multi-guide
section: http://docs.codehaus.org/display/MAVENUSER/Mini+Guides

ciao!

On 11/29/05, mike jones <mi...@gmail.com> wrote:
> aghhh I figured it out.
> I thought that I needed two executions to run it twice, but its run by
> default at the test lifecyle and the config in the <plugin> tag configures
> this.
> I just needed one more execution defined at the other phase to run with a
> different execution.
>
<snip>

--

"Programming, an artform that fights back"

Anuerin G. Diaz
Registered Linux User #246176
Friendly Linux Board @ http://mandrivausers.org/index.php
http://capsule.ramfree17.org , when you absolutely have nothing else
better to do

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


Re: Confinguartion for different executions

Posted by mike jones <mi...@gmail.com>.
aghhh I figured it out.
I thought that I needed two executions to run it twice, but its run by
default at the test lifecyle and the config in the <plugin> tag configures
this.
I just needed one more execution defined at the other phase to run with a
different execution.

eg

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <includes>
            <include implementation="java.lang.String
">**/OneTest.java</include>
          </includes>
          <phase>test</phase>
        </configuration>
        <executions>
          <execution>
            <id>two</id>
            <configuration>
              <includes>
                <include implementation="java.lang.String
">**/TwoTest.java</include>
              </includes>
              <phase>integration-test</phase>
            </configuration>
            <phase>integration-test</phase>
            <goals>
              <goal>test</goal>
            </goals>
          </execution>
        </executions>
      </plugin>



Cheers
Mike




On 29/11/05, Anuerin Diaz <ra...@gmail.com> wrote:
>
> hi,
>
>   you said you are trying to run different unit tests at different
> phases but your example below binds two executions to the same phase
> (test). i havent tried stacking executions on a single phase but what
> prevents you from combining those two into a single antrun execution?
>
> ciao!
>
> On 11/29/05, mike jones <mi...@gmail.com> wrote:
> > Hi
> > I have the following on my POM to try and run different unit tests at
> > different phases of the lifecycle but I cant seem to configure the 2nd
> > execution.
> >
> > Below is what I have tried last, but I have tried lots of vairations of
> this
> >
> >      <plugin>
> >        <groupId>org.apache.maven.plugins</groupId>
> >        <artifactId>maven-surefire-plugin</artifactId>
> >        <executions>
> >          <execution>
> >            <configuration>
> >              <id>unit-test</id>
> >              <phase>test</phase>
> >              <includes>
> >                <include implementation="java.lang.String
> > ">**/*.java</include>
> >              </includes>
> >              <excludes>
> >                <exclude implementation="java.lang.String
> > ">**/initialadmindata/*.java</exclude>
> >              </excludes>
> >            </configuration>
> >            <id>unit-test</id>
> >            <phase>test</phase>
> >          </execution>
> >          <execution>
> >            <id>initial-admin-data</id>
> >            <configuration>
> >              <id>unit-test</id>
> >              <phase>test</phase>
> >              <includes>
> >                <include implementation="java.lang.String
> > ">**/InitialAdminSuite.java</include>
> >              </includes>
> >            </configuration>
> >            <phase>integration-test</phase>
> >            <goals>
> >              <goal>test</goal>
> >            </goals>
> >          </execution>
> >        </executions>
> >      </plugin>
> >
> >
> >
> > Any help would be appreciated.
> > Cheers
> > Mike
> >
> >
> >
> >
> > --
> > d-_-b \m/(>_<)\m/ (9ò_ó)-o(@_o)
> >
> >
>
>
> --
>
> "Programming, an artform that fights back"
>
> Anuerin G. Diaz
> Registered Linux User #246176
> Friendly Linux Board @ http://mandrivausers.org/index.php
> http://capsule.ramfree17.org , when you absolutely have nothing else
> better to do
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
d-_-b \m/(>_<)\m/ (9ò_ó)-o(@_o)

Re: Confinguartion for different executions

Posted by Anuerin Diaz <ra...@gmail.com>.
hi,

  you said you are trying to run different unit tests at different
phases but your example below binds two executions to the same phase
(test). i havent tried stacking executions on a single phase but what
prevents you from combining those two into a single antrun execution?

ciao!

On 11/29/05, mike jones <mi...@gmail.com> wrote:
> Hi
> I have the following on my POM to try and run different unit tests at
> different phases of the lifecycle but I cant seem to configure the 2nd
> execution.
>
> Below is what I have tried last, but I have tried lots of vairations of this
>
>      <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-surefire-plugin</artifactId>
>        <executions>
>          <execution>
>            <configuration>
>              <id>unit-test</id>
>              <phase>test</phase>
>              <includes>
>                <include implementation="java.lang.String
> ">**/*.java</include>
>              </includes>
>              <excludes>
>                <exclude implementation="java.lang.String
> ">**/initialadmindata/*.java</exclude>
>              </excludes>
>            </configuration>
>            <id>unit-test</id>
>            <phase>test</phase>
>          </execution>
>          <execution>
>            <id>initial-admin-data</id>
>            <configuration>
>              <id>unit-test</id>
>              <phase>test</phase>
>              <includes>
>                <include implementation="java.lang.String
> ">**/InitialAdminSuite.java</include>
>              </includes>
>            </configuration>
>            <phase>integration-test</phase>
>            <goals>
>              <goal>test</goal>
>            </goals>
>          </execution>
>        </executions>
>      </plugin>
>
>
>
> Any help would be appreciated.
> Cheers
> Mike
>
>
>
>
> --
> d-_-b \m/(>_<)\m/ (9ò_ó)-o(@_o)
>
>


--

"Programming, an artform that fights back"

Anuerin G. Diaz
Registered Linux User #246176
Friendly Linux Board @ http://mandrivausers.org/index.php
http://capsule.ramfree17.org , when you absolutely have nothing else
better to do

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