Fork me on GitHub

hpi:run

Full name:

org.jenkins-ci.tools:maven-hpi-plugin:1.114:run

Description:

Runs Jenkins with the current plugin project.

This only needs the source files to be compiled, so run in the compile phase.

To specify the HTTP port, use -Djetty.port=PORT

Attributes:

  • Requires a Maven project to be executed.
  • Invokes the execution of the lifecycle phase compile prior to executing itself.

Optional Parameters

Name Type Since Description
connectors Connector[] - List of connectors to use. If none are configured then the default is a single SelectChannelConnector at port 8080. You can override this default port number by using the system property jetty.port on the command line, eg: mvn -Djetty.port=9999 jetty:run. Consider using instead the <jettyXml> element to specify external jetty xml config file.
consoleForceReload boolean - If true, the context will be restarted after a line feed on the input console. Disabled by default.
Default value is: true.
User property is: jetty.consoleForceReload.
contextHandlers ContextHandler[] - List of other contexts to set up. Consider using instead the <jettyXml> element to specify external jetty xml config file. Optional.
contextXml String - Location of a context xml configuration file whose contents will be applied to the webapp AFTER anything in <webApp>.Optional.
daemon boolean -

Determines whether or not the server blocks when started. The default behavior (daemon = false) will cause the server to pause other processes while it continues to handle web requests. This is useful when starting the server with the intent to work with it interactively.

Often, it is desirable to let the server start and continue running subsequent processes in an automated build environment. This can be facilitated by setting daemon to true.


Default value is: ${jetty.daemon}.
defaultPort String - Specifies the HTTP port number. If connectors are configured in the Mojo, that'll take precedence.
User property is: port.
dependencyResolution String - Decides the level of dependency resolution. This controls what plugins are made available to the running Jenkins.
Default value is: test.
excludedGoals String[] jetty-7.5.2 List of goals that are NOT to be used
hudsonHome File - Path to $JENKINS_HOME. The launched Jenkins will use this directory as the workspace.
Default value is: ${HUDSON_HOME}.
User property is: hudsonHome.
jenkinsCoreId String 1.65 Optional string that represents "groupId:artifactId" of Jenkins core jar. If left unspecified, the default groupId/artifactId pair for Jenkins is looked for.
jenkinsHome File - Path to $JENKINS_HOME. The launched Jenkins will use this directory as the workspace.
Default value is: ${JENKINS_HOME}.
User property is: jenkinsHome.
jenkinsWarId String 1.68 Optional string that represents "groupId:artifactId" of Jenkins war. If left unspecified, the default groupId/artifactId pair for Jenkins is looked for.
jettyXml String - Comma separated list of a jetty xml configuration files whose contents will be applied before any plugin configuration. Optional.
localRepository ArtifactRepository - (no description)
Default value is: ${localRepository}.
loggers Map 1.98 List of loggers to define. Keys are logger names (usually package or class names); values are level names (such as FINE).
loginServices LoginService[] - List of security realms to set up. Consider using instead the <jettyXml> element to specify external jetty xml config file. Optional.
maskClasses String - [ws|tab|CR|LF]+ separated list of package prefixes that your plugin doesn't want to see from the core.

Tokens in this list is prefix-matched against the fully-qualified class name, so add "." to the end of each package name, like "com.foo. com.bar."


pluginFirstClassLoader boolean 1.94 (no description)
projectArtifacts Set - The artifacts for the project.
Default value is: ${project.artifacts}.
reload String - reload can be set to either 'automatic' or 'manual' if 'manual' then the context can be reloaded by a linefeed in the console if 'automatic' then traditional reloading on changed files is enabled.
Default value is: ${jetty.reload}.
requestLog RequestLog - A RequestLog implementation to use for the webapp at runtime. Consider using instead the <jettyXml> element to specify external jetty xml config file. Optional.
scanIntervalSeconds int - The interval in seconds to scan the webapp for changes and restart the context if necessary. Ignored if reload is enabled. Disabled by default.
Default value is: ${jetty.scanIntervalSeconds}.
skip boolean - Skip this mojo execution.
Default value is: ${jetty.skip}.
stopKey String - Key to provide when stopping jetty on executing java -DSTOP.KEY=<stopKey> -DSTOP.PORT=<stopPort> -jar start.jar --stop
stopPort int - Port to listen to stop jetty on executing -DSTOP.PORT=<stopPort> -DSTOP.KEY=<stopKey> -jar start.jar --stop
systemProperties Map 1.85 List of additional System properties to set
systemPropertiesFile File - File containing system properties to be set before execution Note that these properties will NOT override System properties that have been set on the command line, by the JVM, or directly in the POM via systemProperties. Optional.
Default value is: ${jetty.systemPropertiesFile}.
useProvidedScope boolean jetty-7.5.2 Whether or not to include dependencies on the plugin's classpath with <scope>provided</scope> Use WITH CAUTION as you may wind up with duplicate jars/classes.
Default value is: false.
warSourceDirectory File - Single directory for extra files to include in the WAR.
Default value is: ${basedir}/src/main/webapp.
webApp JettyWebAppContext - An instance of org.eclipse.jetty.webapp.WebAppContext that represents the webapp. Use any of its setters to configure the webapp. This is the preferred and most flexible method of configuration, rather than using the (deprecated) individual parameters like "tmpDirectory", "contextPath" etc.
webAppFile File - The location of the war file.

Normally this should be left empty, in which case the plugin loads it from the repository. But this parameter allows that to be overwritten.


Parameter Details

connectors:

List of connectors to use. If none are configured then the default is a single SelectChannelConnector at port 8080. You can override this default port number by using the system property jetty.port on the command line, eg: mvn -Djetty.port=9999 jetty:run. Consider using instead the <jettyXml> element to specify external jetty xml config file.
  • Type: org.eclipse.jetty.server.Connector[]
  • Required: No

consoleForceReload:

If true, the context will be restarted after a line feed on the input console. Disabled by default.
  • Type: boolean
  • Required: No
  • User Property: jetty.consoleForceReload
  • Default: true

contextHandlers:

List of other contexts to set up. Consider using instead the <jettyXml> element to specify external jetty xml config file. Optional.
  • Type: org.eclipse.jetty.server.handler.ContextHandler[]
  • Required: No

contextXml:

Location of a context xml configuration file whose contents will be applied to the webapp AFTER anything in <webApp>.Optional.
  • Type: java.lang.String
  • Required: No

daemon:

Determines whether or not the server blocks when started. The default behavior (daemon = false) will cause the server to pause other processes while it continues to handle web requests. This is useful when starting the server with the intent to work with it interactively.

Often, it is desirable to let the server start and continue running subsequent processes in an automated build environment. This can be facilitated by setting daemon to true.

  • Type: boolean
  • Required: No
  • Default: ${jetty.daemon}

defaultPort:

Specifies the HTTP port number. If connectors are configured in the Mojo, that'll take precedence.
  • Type: java.lang.String
  • Required: No
  • User Property: port

dependencyResolution:

Decides the level of dependency resolution. This controls what plugins are made available to the running Jenkins.
  • Type: java.lang.String
  • Required: No
  • Default: test

excludedGoals:

List of goals that are NOT to be used
  • Type: java.lang.String[]
  • Since: jetty-7.5.2
  • Required: No

hudsonHome:

Path to $JENKINS_HOME. The launched Jenkins will use this directory as the workspace.
  • Type: java.io.File
  • Required: No
  • User Property: hudsonHome
  • Default: ${HUDSON_HOME}

jenkinsCoreId:

Optional string that represents "groupId:artifactId" of Jenkins core jar. If left unspecified, the default groupId/artifactId pair for Jenkins is looked for.
  • Type: java.lang.String
  • Since: 1.65
  • Required: No

jenkinsHome:

Path to $JENKINS_HOME. The launched Jenkins will use this directory as the workspace.
  • Type: java.io.File
  • Required: No
  • User Property: jenkinsHome
  • Default: ${JENKINS_HOME}

jenkinsWarId:

Optional string that represents "groupId:artifactId" of Jenkins war. If left unspecified, the default groupId/artifactId pair for Jenkins is looked for.
  • Type: java.lang.String
  • Since: 1.68
  • Required: No

jettyXml:

Comma separated list of a jetty xml configuration files whose contents will be applied before any plugin configuration. Optional.
  • Type: java.lang.String
  • Required: No

localRepository:

(no description)
  • Type: org.apache.maven.artifact.repository.ArtifactRepository
  • Required: No
  • Default: ${localRepository}

loggers:

List of loggers to define. Keys are logger names (usually package or class names); values are level names (such as FINE).
  • Type: java.util.Map
  • Since: 1.98
  • Required: No

loginServices:

List of security realms to set up. Consider using instead the <jettyXml> element to specify external jetty xml config file. Optional.
  • Type: org.eclipse.jetty.security.LoginService[]
  • Required: No

maskClasses:

[ws|tab|CR|LF]+ separated list of package prefixes that your plugin doesn't want to see from the core.

Tokens in this list is prefix-matched against the fully-qualified class name, so add "." to the end of each package name, like "com.foo. com.bar."

  • Type: java.lang.String
  • Required: No

pluginFirstClassLoader:

(no description)
  • Type: boolean
  • Since: 1.94
  • Required: No

projectArtifacts:

The artifacts for the project.
  • Type: java.util.Set
  • Required: No
  • Default: ${project.artifacts}

reload:

reload can be set to either 'automatic' or 'manual' if 'manual' then the context can be reloaded by a linefeed in the console if 'automatic' then traditional reloading on changed files is enabled.
  • Type: java.lang.String
  • Required: No
  • Default: ${jetty.reload}

requestLog:

A RequestLog implementation to use for the webapp at runtime. Consider using instead the <jettyXml> element to specify external jetty xml config file. Optional.
  • Type: org.eclipse.jetty.server.RequestLog
  • Required: No

scanIntervalSeconds:

The interval in seconds to scan the webapp for changes and restart the context if necessary. Ignored if reload is enabled. Disabled by default.
  • Type: int
  • Required: No
  • Default: ${jetty.scanIntervalSeconds}

skip:

Skip this mojo execution.
  • Type: boolean
  • Required: No
  • Default: ${jetty.skip}

stopKey:

Key to provide when stopping jetty on executing java -DSTOP.KEY=<stopKey> -DSTOP.PORT=<stopPort> -jar start.jar --stop
  • Type: java.lang.String
  • Required: No

stopPort:

Port to listen to stop jetty on executing -DSTOP.PORT=<stopPort> -DSTOP.KEY=<stopKey> -jar start.jar --stop
  • Type: int
  • Required: No

systemProperties:

List of additional System properties to set
  • Type: java.util.Map
  • Since: 1.85
  • Required: No

systemPropertiesFile:

File containing system properties to be set before execution Note that these properties will NOT override System properties that have been set on the command line, by the JVM, or directly in the POM via systemProperties. Optional.
  • Type: java.io.File
  • Required: No
  • Default: ${jetty.systemPropertiesFile}

useProvidedScope:

Whether or not to include dependencies on the plugin's classpath with <scope>provided</scope> Use WITH CAUTION as you may wind up with duplicate jars/classes.
  • Type: boolean
  • Since: jetty-7.5.2
  • Required: No
  • Default: false

warSourceDirectory:

Single directory for extra files to include in the WAR.
  • Type: java.io.File
  • Required: No
  • Default: ${basedir}/src/main/webapp

webApp:

An instance of org.eclipse.jetty.webapp.WebAppContext that represents the webapp. Use any of its setters to configure the webapp. This is the preferred and most flexible method of configuration, rather than using the (deprecated) individual parameters like "tmpDirectory", "contextPath" etc.
  • Type: org.mortbay.jetty.plugin.JettyWebAppContext
  • Required: No

webAppFile:

The location of the war file.

Normally this should be left empty, in which case the plugin loads it from the repository. But this parameter allows that to be overwritten.

  • Type: java.io.File
  • Required: No