org.nuiton.wikitty.plugin
Class WPDeployJarMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.nuiton.plugin.AbstractPlugin
          extended by org.nuiton.wikitty.plugin.AbstractWPMojo
              extended by org.nuiton.wikitty.plugin.AbstractWPLoadDependencyMojo
                  extended by org.nuiton.wikitty.plugin.WPDeployJarMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable, org.nuiton.plugin.Plugin

public class WPDeployJarMojo
extends AbstractWPLoadDependencyMojo
implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

To deploy a wikitty publication jar.

Since:
3.2
Version:
$Id: WPDeployJarMojo.java 1215 2011-08-30 14:37:34Z tchemit $
Author:
tchemit , mfortun
Is defined by the goal name:
deploy-jar
Requires the dependencies in this specified scope:
runtime
Requires to be online to run:
true
Requires a Maven project to run:
true

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.nuiton.plugin.Plugin
org.nuiton.plugin.Plugin.InitState, org.nuiton.plugin.Plugin.Packaging
 
Field Summary
protected  boolean chmod
          Whether to run the "chmod" command on the remote site after the deploy.
protected  String chmodMode
          The mode used by the "chmod" command.
protected  String chmodOptions
          The options used by the "chmod" command.
protected  org.codehaus.plexus.PlexusContainer container
           
protected  File fileToDeploy
          file to deploy
protected  org.apache.maven.execution.MavenSession mavenSession
           
protected  org.apache.maven.wagon.proxy.ProxyInfo proxyInfo
           
protected  org.apache.maven.plugins.site.wagon.repository.Repository repository
           
protected  String serverId
          Id of server.
protected  String serverUrl
          URL of server to use to log into server.
protected  org.apache.maven.settings.Settings settings
          The current user system settings for use in Maven.
protected  org.apache.maven.settings.crypto.SettingsDecrypter settingsDecrypter
           
protected  org.apache.maven.wagon.Wagon wagon
           
protected  org.apache.maven.artifact.manager.WagonManager wagonManager
           
protected  Map<String,org.apache.maven.wagon.Wagon> wagons
          All available wagons.
 
Fields inherited from class org.nuiton.wikitty.plugin.AbstractWPLoadDependencyMojo
factory, installer, repositoryFactory
 
Fields inherited from class org.nuiton.wikitty.plugin.AbstractWPMojo
APPLICATION_DIR_NAME, applicationName, IMAGES_RESOURCES_DIR_NAME, JAR_RESOURCES_DIR_NAME, MAIN_DIR_NAME, project, RESOURCES_DIR_NAME, SRC_DIR_NAME, verbose, wikittyServiceUrl
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
WPDeployJarMojo()
           
 
Method Summary
 void contextualize(org.codehaus.plexus.context.Context context)
          
protected  void doAction()
           
protected  String getMavenVersion()
           
 org.apache.maven.wagon.proxy.ProxyInfo getProxyInfo()
           Get the ProxyInfo of the proxy associated with the host and the protocol of the given repository.
protected  void init()
           
protected  boolean isMaven3OrMore()
           
 
Methods inherited from class org.nuiton.wikitty.plugin.AbstractWPMojo
getApplicationName, getProject, getWikittyServiceUrl, isVerbose, setApplicationName, setProject, setVerbose, setWikittyServiceUrl
 
Methods inherited from class org.nuiton.plugin.AbstractPlugin
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, afterExecute, backupFile, checkEncoding, checkPackaging, checkResource, checkRunOnceDone, checkSkip, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, getBackupFile, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFile
 
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
 
Methods inherited from interface org.apache.maven.plugin.Mojo
getLog, setLog
 

Field Detail

serverId

protected String serverId
Id of server.

Is defined by:
expression:
${serverId}
Is required.

serverUrl

protected String serverUrl
URL of server to use to log into server.

Is defined by:
expression:
${serverUrl}
Is required.

chmod

protected boolean chmod
Whether to run the "chmod" command on the remote site after the deploy. Defaults to "true".

Is defined by:
expression:
${maven.site.chmod}
default-value:
true

chmodMode

protected String chmodMode
The mode used by the "chmod" command. Only used if chmod = true. Defaults to "g+w,a+rX".

Is defined by:
expression:
${maven.site.chmod.mode}
default-value:
g+w,a+rX

chmodOptions

protected String chmodOptions
The options used by the "chmod" command. Only used if chmod = true. Defaults to "-Rf".

Is defined by:
expression:
${maven.site.chmod.options}
default-value:
-Rf

wagonManager

protected org.apache.maven.artifact.manager.WagonManager wagonManager
Is a Plexus component defined by:

settings

protected org.apache.maven.settings.Settings settings
The current user system settings for use in Maven.

Is defined by:
expression:
${settings}
Is readonly.
Is required.

mavenSession

protected org.apache.maven.execution.MavenSession mavenSession
Is defined by:
expression:
${session}
Is readonly.
Is required.

container

protected org.codehaus.plexus.PlexusContainer container

repository

protected org.apache.maven.plugins.site.wagon.repository.Repository repository

wagons

protected Map<String,org.apache.maven.wagon.Wagon> wagons
All available wagons.

Since:
1.0
Is a Plexus component defined by:
role:
org.apache.maven.wagon.Wagon

settingsDecrypter

protected org.apache.maven.settings.crypto.SettingsDecrypter settingsDecrypter
Is a Plexus component defined by:

proxyInfo

protected org.apache.maven.wagon.proxy.ProxyInfo proxyInfo

wagon

protected org.apache.maven.wagon.Wagon wagon

fileToDeploy

protected File fileToDeploy
file to deploy

Is defined by:
expression:
${fileToDeploy}
Is required.
Constructor Detail

WPDeployJarMojo

public WPDeployJarMojo()
Method Detail

init

protected void init()
             throws Exception
Overrides:
init in class AbstractWPLoadDependencyMojo
Throws:
Exception

doAction

protected void doAction()
                 throws Exception
Specified by:
doAction in class org.nuiton.plugin.AbstractPlugin
Throws:
Exception

isMaven3OrMore

protected boolean isMaven3OrMore()

getMavenVersion

protected String getMavenVersion()

getProxyInfo

public org.apache.maven.wagon.proxy.ProxyInfo getProxyInfo()

Get the ProxyInfo of the proxy associated with the host and the protocol of the given repository.

Extract from J2SE Doc : Networking Properties - nonProxyHosts : "The value can be a list of hosts, each separated by a |, and in addition a wildcard character (*) can be used for matching"

Defensively support for comma (",") and semi colon (";") in addition to pipe ("|") as separator.

Returns:
a ProxyInfo object instantiated or null if no matching proxy is found

contextualize

public void contextualize(org.codehaus.plexus.context.Context context)
                   throws org.codehaus.plexus.context.ContextException

Specified by:
contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Throws:
org.codehaus.plexus.context.ContextException


Copyright © 2011 CodeLutin. All Rights Reserved.