Hi franz, Thanks franz! The solution to the problem was to create two executions and bind it to the same phase. In each execution, specify a different ID.
Case solved. franz see wrote: > > > > Tony Truong wrote: >> >> Hi Franz, >> >> Thanks for you quick reply. >> >> For one thing, -Dtest only runs one singular test. What I want though is >> to run that specified test, then have it execute the rest of the tests. >> >> It would also be desirable if I could specify this in the pom rather than >> in command line/runtime. >> >> Tony. >> >> franz see wrote: >>> >>> >>> Tony Truong wrote: >>>> >>>> To all, >>>> >>>> I need to run a specific JWebunit test before the other tests, since >>>> this JWebunit test sets up the web app environment. How would I be able >>>> to do this with the surefire plugin? >>>> >>>> Tony. >>>> >>> >>> Good day to you, Tony, >>> >>> add -Dtest=[test class name] to your mvn command. >>> >>> Cheers, >>> Franz >>> >> >> > > > Good day to you, Tony, > > Sorry about that, my bad. Anyway, here's another suggestion. > > Try binding the test goal to the test-compile phase (the phase right > before test) and to the test phase. Also, specify that the only test you > would run during the test-compile is that specific JWebunit test case. > > Specifically, try adding this > > <project> > [...] > <build> > <pluginManagement> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-surefire-plugin</artifactId> > <executions> > <execution> > <id>1</id> > <phase>test-compile</phase> > <goals> > <goal>test</goal> > </goals> > <configuration> > <test>[...your initial test...] > </configuration> > </execution> > <execution> > <id>2</id> > <goals> > <goal>test</goal> > </goals> > </execution> > </executions> > </plugin> > </plugins> > </pluginManagement> > </build> > [...] > </project> > -- View this message in context: http://www.nabble.com/-m2--Executing-a-Test-First-tf2101214.html#a5791954 Sent from the Maven - Users forum at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]