Class InstallDevCliMojo
- All Implemented Interfaces:
com.vaadin.flow.plugin.base.PluginAdapterBase,org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
vaadin-dev CLI and its agent skills into the project.
Creates .vaadin/vaadin-dev (plus the .ps1 and .cmd
launchers), the shared instructions under
.agents/skills/vaadin-devloop/ and the Claude adapter under
.claude/skills/vaadin-devloop/. No jars are staged into the project
and no agent configuration is touched - the CLI resolves the dev-loop daemon
from the project's own dependencies at first use.
It also provisions HotswapAgent into ~/.vaadin/devloop, which is the
only asset the loop downloads rather than resolving from a Maven repository.
That is deliberately the goal's job and not the first vaadin-dev
start: an image built with network access and developed in without it - a
container, a sandboxed agent environment - would otherwise install fine and
then fail to start the loop at all. Once the goal has succeeded, nothing in
the loop needs the network again. Machine-level, so nothing lands in the
project and one download serves every application on the machine.
The provisioning runs out of the daemon jar the project itself resolves - the same one the CLI will run - so the pinned agent version is the version the running daemon goes on to ask for. Hence the dependency resolution this goal requires, and hence no scope filter when looking for it: the daemon travels in as an optional dependency of the dev server, and a project is free to declare it provided or test instead.
Everything it writes is meant to be committed, like mvnw: it is
project tooling, and the point is that every developer and every agent on the
repository gets the same instructions. It is also rewritten whenever it
differs from the shipped copy, so a fix reaches a project by re-running the
goal - add your own skill beside these rather than editing them.
Unbound, so it never runs as a side effect of a normal build. Run it on the
application module: in a reactor that means -pl :app, which is also
where the CLI's own .vaadin/vaadin-dev invocations are rooted.
For internal use only. May be renamed or removed in a future release.
-
Field Summary
Fields inherited from class com.vaadin.flow.plugin.maven.FlowModeAbstractMojo
INCLUDE_FROM_COMPILE_DEPS_REGEX, productionModeFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidPerform whatever build-process behavior thisMojoimplements.
This is the main trigger for theMojoinside theMavensystem, and allows theMojoto communicate errors.Methods inherited from class com.vaadin.flow.plugin.maven.FlowModeAbstractMojo
applicationIdentifier, applicationProperties, buildFolder, bunEnable, eagerServerLoad, excludePostinstallPackages, execute, frontendDirectory, frontendExtraFileExtensions, frontendOutputDirectory, generatedTsFolder, getClassFinder, getJarFiles, isCommercialBannerEnabled, isDebugEnabled, isFrontendHotdeploy, isFrontendIgnoreVersionChecks, isHillaAvailable, isHillaAvailable, isHillaUsed, isHillaUsed, isJarProject, isNpmExcludeWebComponents, isPrepareFrontendCacheDisabled, isReactEnabled, javaResourceFolder, javaSourceFolder, logDebug, logDebug, logError, logError, logInfo, logWarn, logWarn, nodeDownloadRoot, nodeFolder, nodeVersion, npmFolder, openApiJsonFile, pnpmEnable, postinstallPackages, projectBaseDirectory, requireHomeNodeExec, servletResourceOutputDirectory, skipDevBundleBuild, triggerRefresh, useGlobalPnpm, webpackOutputDirectoryMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.plugin.base.PluginAdapterBase
createLookup
-
Constructor Details
-
InstallDevCliMojo
public InstallDevCliMojo()
-
-
Method Details
-
executeInternal
protected void executeInternal() throws org.apache.maven.plugin.MojoFailureExceptionDescription copied from class:FlowModeAbstractMojoPerform whatever build-process behavior thisMojoimplements.
This is the main trigger for theMojoinside theMavensystem, and allows theMojoto communicate errors.- Specified by:
executeInternalin classFlowModeAbstractMojo- Throws:
org.apache.maven.plugin.MojoFailureException- if an expected problem (such as a compilation failure) occurs. Throwing this exception causes a "BUILD FAILURE" message to be displayed.
-