Closed benson-basis closed 9 years ago
We do not support multi module builds. Please use a composite.
Do properties copy across in non-multimodule builds?
We may not promote multi-module builds, but I think that's a separate thing, we should support migration paths at least.
If you include:
<inherited>true</inherited>
in your <plugin>
configuration for the tiles plugin, then the plugin will be inherited to child POMs and applied. As a maven lifecycle contributor - without this, the tiles plugin is only run against the parent POM and not against the children, in practice this shouldn't really be an issue as during a mvn clean install
the tiled parent will be installed and subsequently used by the children. However, when doing a help:effective-pom
with such filtering commands as -pl
- Maven looks at the source file of the parent pom and not the installed POM without invoking the lifecycle contributor and gives you a distorted view of execution.
Technically, Maven is "correct" since at it's core, the tiles plugin is a clever hack which has shortcomings when it comes to multi-module builds using <parent>
references within the same build session for this very reason - the parent pom.xml
on disk is not the same as one that gets deployed/processed.
If you need to continue using your multi-module build at present, I suggest redeclaring the tiles plugin in each child pom rather than parent and consider the move to breaking up your repositories and moving away from the parent structure.
So, I created a tile. tile.xml:
I've installed this artifact.
In the top pom of a multi-module project, I have:
The properties in the tile.xml are not seen by Maven when I try to use them with Maven 3.0.4. I assume that I'm missing something trivial here, but, what? mvn -X is not showing any signs of life. I am trying to use these properties as dependency versions.
I note that the examples I can find are all using older versions than 1.8 of the plugin; is there an example out there today I can clone and play with?