Package org.eclipse.jetty.maven.plugin
Class WebAppPropertyConverter
java.lang.Object
org.eclipse.jetty.maven.plugin.WebAppPropertyConverter
WebAppPropertyConverter
Converts a webapp's configuration to a properties file, and
vice versa.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
fromProperties
(MavenWebAppContext webApp, File propsFile, Server server, Map<String, String> jettyProperties) Configure a webapp from a properties filestatic void
fromProperties
(MavenWebAppContext webApp, String resource, Server server, Map<String, String> jettyProperties) Configure a webapp from a properties file.static void
fromProperties
(MavenWebAppContext webApp, Properties webAppProperties, Server server, Map<String, String> jettyProperties) Configure a webapp from properties.static void
toProperties
(MavenWebAppContext webApp, File propsFile, String contextXml) Convert a webapp to properties stored in a file.
-
Field Details
-
WEB_XML
-
QUICKSTART_WEB_XML
-
CONTEXT_XML
-
CONTEXT_PATH
-
TMP_DIR
-
TMP_DIR_PERSIST
-
BASE_DIRS
-
WAR_FILE
-
CLASSES_DIR
-
TEST_CLASSES_DIR
-
LIB_JARS
-
DEFAULTS_DESCRIPTOR
-
OVERRIDE_DESCRIPTORS
-
-
Constructor Details
-
WebAppPropertyConverter
public WebAppPropertyConverter()
-
-
Method Details
-
toProperties
public static void toProperties(MavenWebAppContext webApp, File propsFile, String contextXml) throws Exception Convert a webapp to properties stored in a file.- Parameters:
webApp
- the webapp to convertpropsFile
- the file to put the properties intocontextXml
- the optional context xml file related to the webApp- Throws:
Exception
- if any I/O exception occurs
-
fromProperties
public static void fromProperties(MavenWebAppContext webApp, String resource, Server server, Map<String, String> jettyProperties) throws ExceptionConfigure a webapp from a properties file.- Parameters:
webApp
- the webapp to configureresource
- the properties file to applyserver
- the Server instance to usejettyProperties
- jetty properties to use if there is a context xml file to apply- Throws:
Exception
-
fromProperties
public static void fromProperties(MavenWebAppContext webApp, Properties webAppProperties, Server server, Map<String, String> jettyProperties) throws ExceptionConfigure a webapp from properties.- Parameters:
webApp
- the webapp to configurewebAppProperties
- properties that describe the configuration of the webappserver
- the jetty Server instancejettyProperties
- jetty properties- Throws:
Exception
-
fromProperties
public static void fromProperties(MavenWebAppContext webApp, File propsFile, Server server, Map<String, String> jettyProperties) throws ExceptionConfigure a webapp from a properties file- Parameters:
webApp
- the webapp to configurepropsFile
- the properties to applyserver
- the Server instance to use if there is a context xml file to applyjettyProperties
- jetty properties to use if there is a context xml file to apply- Throws:
Exception
-