com.liferay.maven.plugins
Class AbstractLiferayMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by com.liferay.maven.plugins.AbstractLiferayMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
DBBuilderMojo, ExtBuilderMojo, LangBuilderMojo, PluginDeployerMojo, PluginDirectDeployerMojo, SassToCssBuilderMojo, ServiceBuilderMojo, ThemeMergeMojo, ThumbnailBuilderMojo, WSDDBuilderMojo

public abstract class AbstractLiferayMojo
extends org.apache.maven.plugin.AbstractMojo

Author:
Mika Koivisto

Field Summary
protected  File appServerClassesPortalDir
           
protected  File appServerLibGlobalDir
           
protected  File appServerLibPortalDir
           
protected  File appServerPortalDir
           
protected  File appServerTldPortalDir
           
protected  org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
           
protected  org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
           
protected  org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
           
protected static boolean initialized
           
protected  String liferayVersion
           
protected  org.apache.maven.artifact.repository.ArtifactRepository localArtifactRepository
           
protected  String pluginType
           
static float PORTAL_VERSION_6_1
           
static float PORTAL_VERSION_6_2
           
protected  org.apache.maven.project.MavenProject project
           
protected  org.apache.maven.project.MavenProjectBuilder projectBuilder
           
protected  List remoteArtifactRepositories
           
protected  File workDir
           
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractLiferayMojo()
           
 
Method Summary
protected  void addDependencyToClassPath(List<String> classPath, org.apache.maven.model.Dependency dependency)
           
protected  void copyLibraryDependencies(File libDir, org.apache.maven.artifact.Artifact artifact)
           
protected  void copyLibraryDependencies(File libDir, org.apache.maven.artifact.Artifact artifact, boolean dependencyAddVersion, boolean dependencyAddClassifier, boolean copyTransitive)
           
protected  org.apache.maven.model.Dependency createDependency(String groupId, String artifactId, String version, String classifier, String type)
           
protected abstract  void doExecute()
           
 void execute()
           
protected  void executeTool(String toolClassName, ClassLoader classLoader, String[] args)
           
protected  float getPortalMajorVersion()
           
protected  ClassLoader getProjectClassLoader()
           
protected  List<String> getProjectClassPath()
           
protected  ClassLoader getToolsClassLoader()
           
protected  List<String> getToolsClassPath()
           
protected  void initPortalProperties()
           
protected  boolean isLiferayProject()
           
protected  org.apache.maven.artifact.Artifact resolveArtifact(org.apache.maven.model.Dependency dependency)
           
protected  URI resolveArtifactFileURI(org.apache.maven.model.Dependency dependency)
           
protected  org.apache.maven.project.MavenProject resolveProject(org.apache.maven.artifact.Artifact artifact)
           
protected  ClassLoader toClassLoader(List<String> classPath)
           
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORTAL_VERSION_6_1

public static final float PORTAL_VERSION_6_1
See Also:
Constant Field Values

PORTAL_VERSION_6_2

public static final float PORTAL_VERSION_6_2
See Also:
Constant Field Values

initialized

protected static boolean initialized

appServerClassesPortalDir

protected File appServerClassesPortalDir

appServerLibGlobalDir

protected File appServerLibGlobalDir

appServerLibPortalDir

protected File appServerLibPortalDir

appServerPortalDir

protected File appServerPortalDir

appServerTldPortalDir

protected File appServerTldPortalDir

archiverManager

protected org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager

artifactFactory

protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory

artifactResolver

protected org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver

liferayVersion

protected String liferayVersion

localArtifactRepository

protected org.apache.maven.artifact.repository.ArtifactRepository localArtifactRepository

pluginType

protected String pluginType

project

protected org.apache.maven.project.MavenProject project

projectBuilder

protected org.apache.maven.project.MavenProjectBuilder projectBuilder

remoteArtifactRepositories

protected List remoteArtifactRepositories

workDir

protected File workDir
Constructor Detail

AbstractLiferayMojo

public AbstractLiferayMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

addDependencyToClassPath

protected void addDependencyToClassPath(List<String> classPath,
                                        org.apache.maven.model.Dependency dependency)
                                 throws Exception
Throws:
Exception

copyLibraryDependencies

protected void copyLibraryDependencies(File libDir,
                                       org.apache.maven.artifact.Artifact artifact)
                                throws Exception
Throws:
Exception

copyLibraryDependencies

protected void copyLibraryDependencies(File libDir,
                                       org.apache.maven.artifact.Artifact artifact,
                                       boolean dependencyAddVersion,
                                       boolean dependencyAddClassifier,
                                       boolean copyTransitive)
                                throws Exception
Throws:
Exception

createDependency

protected org.apache.maven.model.Dependency createDependency(String groupId,
                                                             String artifactId,
                                                             String version,
                                                             String classifier,
                                                             String type)

doExecute

protected abstract void doExecute()
                           throws Exception
Throws:
Exception

executeTool

protected void executeTool(String toolClassName,
                           ClassLoader classLoader,
                           String[] args)
                    throws Exception
Throws:
Exception

getPortalMajorVersion

protected float getPortalMajorVersion()

getProjectClassLoader

protected ClassLoader getProjectClassLoader()
                                     throws Exception
Throws:
Exception

getProjectClassPath

protected List<String> getProjectClassPath()
                                    throws Exception
Throws:
Exception

getToolsClassLoader

protected ClassLoader getToolsClassLoader()
                                   throws Exception
Throws:
Exception

getToolsClassPath

protected List<String> getToolsClassPath()
                                  throws Exception
Throws:
Exception

initPortalProperties

protected void initPortalProperties()
                             throws Exception
Throws:
Exception

isLiferayProject

protected boolean isLiferayProject()

resolveArtifact

protected org.apache.maven.artifact.Artifact resolveArtifact(org.apache.maven.model.Dependency dependency)
                                                      throws Exception
Throws:
Exception

resolveArtifactFileURI

protected URI resolveArtifactFileURI(org.apache.maven.model.Dependency dependency)
                              throws Exception
Throws:
Exception

resolveProject

protected org.apache.maven.project.MavenProject resolveProject(org.apache.maven.artifact.Artifact artifact)
                                                        throws Exception
Throws:
Exception

toClassLoader

protected ClassLoader toClassLoader(List<String> classPath)
                             throws Exception
Throws:
Exception


Copyright © 2013. All Rights Reserved.