Hey, I think you can rename your acceptance tests with some thing like *AcceptenceTest*.java and then create different profiles for build with and without acceptence test. See <profiles> in maven documentation. Probably while running normal build you will like to exclude **/*AcceptenceTest*.java files
Say you create a profile named "acceptencetest" Say you create a profile named "dev" >From command line you can use mvn clean install -Dacceptencetest : this will run full build along with acceptence tests if you use mvn clean install -Ddev : it will skip acceptence as you will mention excludes in this profile. I hope i am understanding your problem correctly. Bryan Young-4 wrote: > > That's disappointing to hear. I would imagine separating > integration/acceptance tests is a fairly common > issue. > > Altering the layout of the source tree isn't really an option for me (big > corporate environment). > > The link you sent had an interesting idea. If I exclude the Acceptance > Tests from the test phase and include > only the Acceptance Tests in the integration test phase, I think that > would > give me the results I want. There > was an example POM, but no example of how to use it. > > Running the POM from the example seems to run the UTs, but not the ATs. > How > would I explicitly run the > integration test phase using that POM? > > Thanks for the help > > Bryan > > On Wed, Aug 27, 2008 at 9:39 AM, Wendy Smoak <[EMAIL PROTECTED]> wrote: > >> On Wed, Aug 27, 2008 at 7:33 AM, Bryan Young <[EMAIL PROTECTED]> wrote: >> > I would like to build my project skipping my acceptance tests, but >> still >> run >> > my unit tests. This seems simple enough if I alter the >> includes/excludes >> > for the surefire plugin, but I want to make this decision at the >> command >> > line. Essentially what I want is a property like this: >> > -Dmaven.acceptance.test.skip=true which still runs my regular unit >> tests. >> >> Unless someone has fixed this while I wasn't looking, which happens >> occasionally, the base problem is that Maven doesn't have good support >> for integration/acceptance tests-- there is only *one* >> testSourceDirectory so you have to jump through hoops with >> includes/excludes and extra surefire executions to make it work. >> >> The best bet is to move the acceptance tests to a separate module. >> Then you can use a profile to selectively enable or disable it. >> >> There is some info on the wiki: >> http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing >> >> -- >> Wendy >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- View this message in context: http://www.nabble.com/Disabling-acceptance-tests-from-the-command-line-tp19182310p19186714.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
