I'm using the compile project and compile functions in gradle to decide whether to get dependencies from a remote repository or build locally based on a profile.
if (profile.equals("local")) {
compile project(":module1")
compile project(":module2")
} else {
compile('me.who.name:module1:1.0.0-SNAPSHOT')
compile('me.who.name:module2:1.0.0-SNAPSHOT')
}
But, in maven I didn't find a way to do the above.
Does Maven have features like Gradle's 'compile project'?
I don't want to use <parent/>
No, AFAIK Maven cannot do anything like that.
But maybe, if you elaborate on the problem behind your question, we might find a Maven solution for that.