org.jvnet.hudson.maven.plugins.hudson
Class ReplaceJobMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.jvnet.hudson.maven.plugins.hudson.AbstractHudsonMojo
          extended by org.jvnet.hudson.maven.plugins.hudson.AddJobMojo
              extended by org.jvnet.hudson.maven.plugins.hudson.ReplaceJobMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class ReplaceJobMojo
extends AddJobMojo

Goal which replaces a Hudson job's configuration


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jvnet.hudson.maven.plugins.hudson.AbstractHudsonMojo
AbstractHudsonMojo.JobClosure, AbstractHudsonMojo.PluginType
 
Field Summary
 
Fields inherited from class org.jvnet.hudson.maven.plugins.hudson.AbstractHudsonMojo
httpClient, hudsonURL, project, settings
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ReplaceJobMojo()
           
 
Method Summary
protected  java.net.URL createPostURL()
          Create the POST URL for the configuration of an existing job.
 void execute()
          Execute the mojo by calling AddJobMojo's execute method and then rebuilding the job.
protected  boolean jobExists()
          Always returns false to ensure that the job is posted.
 
Methods inherited from class org.jvnet.hudson.maven.plugins.hudson.AddJobMojo
createPayload, getJobName, postPayload
 
Methods inherited from class org.jvnet.hudson.maven.plugins.hudson.AbstractHudsonMojo
configurePlugin, createHudsonURL, createJobBuildURL, createJobConfigURL, createJobListURL, createOrChange, createOrChange, doPost, doPost, findServer, forEachJob, getDocumentFromHudson, getJobList, loadJobConfig, rebuildJob, saveJobConfig, setupClient
 
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
 

Constructor Detail

ReplaceJobMojo

public ReplaceJobMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Execute the mojo by calling AddJobMojo's execute method and then rebuilding the job.

Specified by:
execute in interface org.apache.maven.plugin.Mojo
Overrides:
execute in class AddJobMojo
Throws:
org.apache.maven.plugin.MojoExecutionException - if something goes wrong.
See Also:
AddJobMojo.execute()

createPostURL

protected java.net.URL createPostURL()
                              throws org.apache.maven.plugin.MojoExecutionException
Create the POST URL for the configuration of an existing job.

Overrides:
createPostURL in class AddJobMojo
Returns:
the URL to post to
Throws:
org.apache.maven.plugin.MojoExecutionException - if the URL is malformed
See Also:
AddJobMojo.createPostURL()

jobExists

protected boolean jobExists()
Always returns false to ensure that the job is posted.

Overrides:
jobExists in class AddJobMojo
Returns:
false
See Also:
AddJobMojo.jobExists()


Copyright © 1981-2008 MTV Networks. All Rights Reserved.