Open VadimPitenko opened 1 year ago
I suspect this is more a maven issue than tiles itself. The tiles extension is triggered from the afterProjectsRead
call of AbstractMavenLifecycleParticipant
:
Invoked after all MavenProject instances have been created. This callback is intended to allow extensions to manipulate MavenProjects before they are sorted and actual build execution starts.
At this point in time, I suspect the properties have not been resolved (which is known to cause some other limitations/oddities elsewhere) which may be preventing the extension from running.
Is there any particular reason for declaring the packaging type as a property - that seems awfully odd to me.
Hey @talios, thank you for the quick response!
Absolutely agree with you regarding using properties for packaging :)
However, there is a problem. The organization I'm working in is actively using the Maven Tiles plugin. Also, we use Micronaut. The thing is that Micronaut CLI generates projects with packaging property. So, each time somebody in the organization creates a project they face this issue.
This is not a priority cause we can mitigate it. However, would be nice to fix it.
Environment Details
Tiles plugin version: 2.31
Problem Description
Tiles plugin fails to recognize the property template in POM packaging tag. So, if we specify the packaging tag this way
<packaging>${packaging}</packaging>
, plugin doesn't run tiles configuration.Expected behavior
mvn clean install
triggersit.session.maven.tiles:maven-jetty-tile:0.8-SNAPSHOT
, so we can see such logs in console:Actual behavior
Expected behavior
section.mvn clean install
. There will be no expected logs in console. That means that tile is not applied.<packaging>jar</packaging>
, tile is applied successfully.Steps to reproduce
Install the
maven-tiles-examples
to local maven repository. Runmvn clean install
.NOTE: I was unable a build project with
tiles-maven-plugin
version1.1-SNAPSHOT
, so I've replaced it in each module of the project with2.31
.maven-jetty-tile
to your stub Micronaut app:mvn clean install
.maven-jetty-tile
was not injected.packaging
tag value explicitly. Change the<packaging>${packaging}</packaging>
to<packaging>jar</packaging>
.mvn clean install
.