Package com.vaadin.integration.maven
Class AbstractThemeMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.codehaus.mojo.gwt.AbstractGwtMojo
-
- org.codehaus.mojo.gwt.AbstractGwtModuleMojo
-
- org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo
-
- com.vaadin.integration.maven.AbstractThemeMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo,GwtModuleReader
- Direct Known Subclasses:
CompileThemeMojo,UpdateThemeMojo
public abstract class AbstractThemeMojo extends AbstractGwtShellMojo
Abstract base class for theme compilation related Mojos.
-
-
Field Summary
-
Fields inherited from class org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo
widgetsetMode
-
Fields inherited from class org.codehaus.mojo.gwt.AbstractGwtMojo
artifactFactory, artifactMetadataSource, classpathBuilder, GWT_GROUP_ID, gwtSdkFirstInClasspath, localRepository, modulePathPrefix, remoteRepositories, resolver, VAADIN_GROUP_ID, warSourceDirectory
-
-
Constructor Summary
Constructors Constructor Description AbstractThemeMojo()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidcheckVaadinVersion()protected java.io.FileconfigureThemeClasspath(JavaCommand cmd, java.lang.String theme)Configure the classpath for theme update/compilation.voiddoExecute()protected java.lang.String[]getThemes()Return the available themes in the project source/resources folder.protected booleanisAtLeastVaadinVersion(int major, int minor)protected booleanisVaadin7()protected booleanisVaadin71()protected abstract voidprocessTheme(java.lang.String theme)-
Methods inherited from class org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo
addArgumentDeploy, addArgumentGen, addCompileSourceArtifacts, addPersistentUnitCache, createJavaCommand, createWidgetsetRequest, execute, getExtraJvmArgs, getJvm, getLogLevel, getStyle, postProcessClassPath, setTimeOut
-
Methods inherited from class org.codehaus.mojo.gwt.AbstractGwtModuleMojo
getGwtModules, getModules, readModule
-
Methods inherited from class org.codehaus.mojo.gwt.AbstractGwtMojo
addClasspathElements, addCompileSourceRoot, getArtifact, getClasspath, getGenerateDirectory, getGwtDevJar, getGwtUserJar, getJarAndDependencies, getLocalRepository, getOutputDirectory, getProject, getProjectArtifacts, getProjectRuntimeArtifacts, getRemoteRepositories, isGenerator, resolve, setupGenerateDirectory
-
-
-
-
Method Detail
-
doExecute
public final void doExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Specified by:
doExecutein classAbstractGwtShellMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
checkVaadinVersion
protected abstract void checkVaadinVersion() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
isVaadin7
protected boolean isVaadin7()
-
isVaadin71
protected boolean isVaadin71()
-
isAtLeastVaadinVersion
protected boolean isAtLeastVaadinVersion(int major, int minor)
-
processTheme
protected abstract void processTheme(java.lang.String theme) throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
configureThemeClasspath
protected java.io.File configureThemeClasspath(JavaCommand cmd, java.lang.String theme) throws org.apache.maven.plugin.MojoExecutionException
Configure the classpath for theme update/compilation.- Parameters:
cmd- command for which to configure the classpaththeme- theme path relative to a resource directory- Returns:
- the first suitable theme directory found (to be used as the output directory)
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getThemes
protected java.lang.String[] getThemes()
Return the available themes in the project source/resources folder. If a theme has been set by expression, only that theme is returned. It is possible to specify more themes, comma separated.- Returns:
- the theme names
-
-