Skip to content

Conversation

@manolo
Copy link
Member

@manolo manolo commented Nov 25, 2025

Summary

Add extensions support to vaadin-maven-plugin so users can simplify their pom.xml configuration.

With <extensions>true</extensions>, prepare-frontend and build-frontend goals run automatically in their default phases without needing explicit <executions> blocks.

Before:

<plugin>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-maven-plugin</artifactId>
    <executions>
        <execution>
            <goals>
                <goal>prepare-frontend</goal>
                <goal>build-frontend</goal>
            </goals>
        </execution>
    </executions>
</plugin>

After:

<plugin>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-maven-plugin</artifactId>
    <extensions>true</extensions>
</plugin>

This is fully opt-in - users can still use the traditional syntax with explicit executions if they prefer.

Using extensions also makes it easier for us to change goals or phases in future versions without requiring users to update their pom.xml files.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this basically overwriting the default lifecycle? Could this conflict with other plugins?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list of 8 phases with their bound plugins has been unchanged since Maven 3.0 (2010), so this structure is safe and future-proof.

  When users set <extensions>true</extensions> on the plugin,
  prepare-frontend and build-frontend goals run automatically
  without needing explicit <executions> configuration.

  This simplifies pom.xml files significantly: just declare
  the plugin once with extensions enabled instead of multiple
  execution blocks for different profiles.
It fixes the issue that Maven try to resolve the plugin before the reactor build even starts.
Maven needs to load extensions during the project model building phase, which happens before any module is compiled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants