maven profiles activated by file-exists not working.

My company's got a multi-module maven set up where different maven profiles (each with different dependencies or versions on the same dependencies) are activated by the file-exists activation.  Each module has 1 or more marker files that lets maven know which profiles to compile and run against.  

This all works fine from the command line but when i pull the entire structure into intellij, the correct profiles aren't used.  I've see that I can manually activate profiles via the Maven Projects tab, but that's an all or nothing thing. I can't assign profiles 1 & 3 to module A and profiles 2 and 3 to Module B.

Is there a way to do this IDEA?   I'm using version 10.0.1

Thanks

2 comments
Comment actions Permalink

We confirm this is a problem, our multimodule builds have the same issue.  The suggestion about being able to enable different profiles in different maven project trees seems a good idea as well.

0
Comment actions Permalink

Having an option to actually honor what maven wants to do instead of overriding the behavior might make sense as well. Unfortunately there are a lot of cases where mvn clean install works just fine from the command line (or even through the maven panel in intellij!) but intellij itself can't seem to figure out how to build the project.

0

Please sign in to leave a comment.