org.efaps.maven.plugin.install
Class GenerateInstallationMojo

java.lang.Object
  extended by org.efaps.maven.plugin.EFapsAbstractMojo
      extended by org.efaps.maven.plugin.install.AbstractEFapsInstallMojo
          extended by org.efaps.maven.plugin.install.GenerateInstallationMojo
All Implemented Interfaces:
org.apache.maven.plugin.Mojo

@Goal(name="generate-installation",
      requiresDependencyResolutionScope="compile",
      defaultPhase=GENERATE_SOURCES)
public class GenerateInstallationMojo
extends AbstractEFapsInstallMojo

Author:
The eFaps Team

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
GenerateInstallationMojo()
           
 
Method Summary
protected  void copyFiles(java.lang.String _rootPackage)
          Copy all eFaps installation files from the eFaps root directory in the related target classes directory.
 void execute()
          Generates the installation XML file and copies all eFaps definition installation files.
protected  java.lang.String generateInstallFile()
          Generates the installation XML file.
protected  java.lang.String[] getCopyFiles(java.io.File _rootFile)
          Uses the copyIncludes and copyExcludes together with the root directory AbstractEFapsInstallMojo.getEFapsDir() to get all related and matched files.
 
Methods inherited from class org.efaps.maven.plugin.install.AbstractEFapsInstallMojo
getApplications, getEFapsDir, getFiles, getOutputDirectory, getTypeMapping, getVersionFile
 
Methods inherited from class org.efaps.maven.plugin.EFapsAbstractMojo
abortTransaction, commitTransaction, convertToMap, getClasspathElements, getLog, getPassWord, getUserName, init, reloadCache, setLog, startTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenerateInstallationMojo

public GenerateInstallationMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Generates the installation XML file and copies all eFaps definition installation files.

Throws:
org.apache.maven.plugin.MojoExecutionException - on error
org.apache.maven.plugin.MojoFailureException - on error
See Also:
generateInstallFile(), copyFiles(String)

generateInstallFile

protected java.lang.String generateInstallFile()
                                        throws org.apache.maven.plugin.MojoExecutionException,
                                               org.apache.maven.plugin.MojoFailureException
Generates the installation XML file.

Returns:
root package path
Throws:
org.apache.maven.plugin.MojoExecutionException - if version file could not read or interpreted
org.apache.maven.plugin.MojoFailureException - if application name in version file is not given
See Also:
to get the version file (defining all versions to install), target directory, name and path of the installation XML file in the target directory

copyFiles

protected void copyFiles(java.lang.String _rootPackage)
                  throws org.apache.maven.plugin.MojoExecutionException
Copy all eFaps installation files from the eFaps root directory in the related target classes directory.

Parameters:
_rootPackage - root package include application sub directory
Throws:
org.apache.maven.plugin.MojoExecutionException - if some files could not be copied
See Also:
to get source directory, to get target directory, get all files to copy

getCopyFiles

protected java.lang.String[] getCopyFiles(java.io.File _rootFile)
Uses the copyIncludes and copyExcludes together with the root directory AbstractEFapsInstallMojo.getEFapsDir() to get all related and matched files. The files are used to idendtify which are copied in the target directory.

The instance variable copyIncludes defines includes; if not specified by maven, the default value is:
  • **/*.css
  • **/*.gif
  • **/*.java
  • **/*.js
  • **/*.png
  • **/*.properties
  • **/*.xml
  • **/*.xsl

  • The instance variable defines excludes; if not specified by maven , the default value is:
  • **/version.xml
  • Parameters:
    _rootFile -
    Returns:
    String array of files to copy
    See Also:
    copyIncludes, copyExcludes, definition of the default includes, definition of the default excludes


    Copyright © 2002-2010 The eFaps Team. All Rights Reserved.