Maven: How to activate profile based on whether child module contains a file?

I’m using Maven 3.1.1 on Mac 10.9.1. I want to activate a profile based on whether certain child modules contain a file. I have tried the following


but this profile doesn’t get activated when running “mvm clean install” despite the fact I’ve verified that the child modules in question contain the file. I also tried ${project.basedir} without luck. Any ideas how I make this happen?


Since you define the profile in the parent POM (I guess) you should try this


Furthermore, you should try running Maven in debug mode to get more information at runtime:

mvm -X clean install

Need Your Help

How to enter information in one cell based on text in another cell

excel excel-formula conditional-statements

I would like to enter information in a cell based on the text contained in a different cell. Specifically, if a cell in column A contains text that includes "insurance," "retirement," or "401K," th...

Huge dictionary Python not working

python dictionary process large-data

I have a really big dictionary in Python . . . it isn't compiling in CodeRunner or in Xcode