• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

MVN Conditional Tests

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd like to have my mvn pom only perform certain tests when a condition is met (eg: environment variable).

Eg, if testDbUrl is defined - perform all dao tests under test/dao; otherwise perform all other tests.

I've tried setting a property in my settings.xml and then using that in a profile that attempts to override the surefire test plugin to no avail.

Build scraps:

Settings.xml (excerpt) :


pom.xml (excerpt)
 
Craig Taylor
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To clarify : I've resolved one of the issues I was having in regards to the surefire environment not reflecting the profile changes.

I'm still left with the issue of a profile defining a property (in my settings.xml) not being able to active a profile in the pom.xml.

In the example above the settings.xml : Development profile should set a testDaoUrl which, in the pom.xml should active the DevTest profile iff the testDaoUrl property exists.

Thanks,
 
reply
    Bookmark Topic Watch Topic
  • New Topic