public abstract class AbstractGwtMojo
extends org.apache.maven.plugin.AbstractMojo
Provide methods to build classpath for GWT SDK tools.
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.maven.artifact.factory.ArtifactFactory |
artifactFactory |
protected org.apache.maven.artifact.metadata.ArtifactMetadataSource |
artifactMetadataSource |
protected ClasspathBuilder |
classpathBuilder |
static String |
GWT_GROUP_ID
GWT artifacts groupId
|
protected boolean |
gwtSdkFirstInClasspath
Deprecated.
tweak your dependencies and/or split your project with a client-only module
|
protected org.apache.maven.artifact.repository.ArtifactRepository |
localRepository |
protected String |
modulePathPrefix
Prefix to prepend to module names inside
webappDirectory or in URLs in DevMode. |
protected List<org.apache.maven.artifact.repository.ArtifactRepository> |
remoteRepositories |
protected org.apache.maven.artifact.resolver.ArtifactResolver |
resolver |
static String |
VAADIN_GROUP_ID |
protected File |
warSourceDirectory
Location of the web application static resources (same as maven-war-plugin parameter)
|
| Constructor and Description |
|---|
AbstractGwtMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
addClasspathElements(Collection<?> elements,
URL[] urls,
int startPosition)
Add classpath elements to a classpath URL set
|
protected void |
addCompileSourceRoot(File path) |
protected org.apache.maven.artifact.Artifact |
getArtifact(String groupId,
String artifactId,
String classifier) |
Collection<File> |
getClasspath(String scope)
Build the GWT classpath for the specified scope
|
File |
getGenerateDirectory() |
protected Collection<File> |
getGwtDevJar() |
protected Collection<File> |
getGwtUserJar() |
protected Collection<File> |
getJarAndDependencies(String artifactId) |
org.apache.maven.artifact.repository.ArtifactRepository |
getLocalRepository() |
File |
getOutputDirectory() |
org.apache.maven.project.MavenProject |
getProject() |
Set<org.apache.maven.artifact.Artifact> |
getProjectArtifacts() |
Set<org.apache.maven.artifact.Artifact> |
getProjectRuntimeArtifacts() |
List<org.apache.maven.artifact.repository.ArtifactRepository> |
getRemoteRepositories() |
protected boolean |
isGenerator()
Whether to use processed resources and compiled classes (
false), or raw resources (true ). |
protected org.apache.maven.artifact.Artifact |
resolve(String groupId,
String artifactId,
String version,
String type,
String classifier) |
protected File |
setupGenerateDirectory() |
getLog, getPluginContext, setLog, setPluginContextpublic static final String GWT_GROUP_ID
public static final String VAADIN_GROUP_ID
@Component protected org.apache.maven.artifact.resolver.ArtifactResolver resolver
@Component protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
@Component protected ClasspathBuilder classpathBuilder
@Parameter(defaultValue="${localRepository}",
required=true,
readonly=true)
protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
@Parameter(defaultValue="${project.remoteArtifactRepositories}",
required=true,
readonly=true)
protected List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositories
@Component protected org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource
@Parameter(property="gwt.modulePathPrefix") protected String modulePathPrefix
webappDirectory or in URLs in DevMode.
Could also be seen as a suffix to webappDirectory.
@Parameter(defaultValue="${basedir}/src/main/webapp")
protected File warSourceDirectory
@Deprecated @Parameter(defaultValue="false", property="gwt.gwtSdkFirstInClasspath") protected boolean gwtSdkFirstInClasspath
public File getOutputDirectory()
protected int addClasspathElements(Collection<?> elements, URL[] urls, int startPosition) throws org.apache.maven.plugin.MojoExecutionException
elements - the initial URL seturls - the urls to addstartPosition - the position to insert URLSorg.apache.maven.plugin.MojoExecutionException - some error occuredpublic Collection<File> getClasspath(String scope) throws org.apache.maven.plugin.MojoExecutionException
scope - Artifact.SCOPE_COMPILE or Artifact.SCOPE_TESTorg.apache.maven.plugin.MojoExecutionException - if classPath building failedprotected boolean isGenerator()
false), or raw resources (true ).protected Collection<File> getGwtDevJar() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected Collection<File> getGwtUserJar() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected Collection<File> getJarAndDependencies(String artifactId) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected org.apache.maven.artifact.Artifact getArtifact(String groupId, String artifactId, String classifier)
protected org.apache.maven.artifact.Artifact resolve(String groupId, String artifactId, String version, String type, String classifier) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void addCompileSourceRoot(File path)
path - file to add to the project compile directoriespublic org.apache.maven.project.MavenProject getProject()
public org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
public List<org.apache.maven.artifact.repository.ArtifactRepository> getRemoteRepositories()
protected File setupGenerateDirectory()
public File getGenerateDirectory()
public Set<org.apache.maven.artifact.Artifact> getProjectArtifacts()
public Set<org.apache.maven.artifact.Artifact> getProjectRuntimeArtifacts()
Copyright © 2012–2026 Vaadin Ltd. All rights reserved.