Class WebAppPropertyConverter

java.lang.Object
org.eclipse.jetty.maven.plugin.WebAppPropertyConverter

public class WebAppPropertyConverter extends Object
WebAppPropertyConverter Converts a webapp's configuration to a properties file, and vice versa.
  • Field Details

    • WEB_XML

      public static String WEB_XML
    • QUICKSTART_WEB_XML

      public static String QUICKSTART_WEB_XML
    • CONTEXT_XML

      public static String CONTEXT_XML
    • CONTEXT_PATH

      public static String CONTEXT_PATH
    • TMP_DIR

      public static String TMP_DIR
    • TMP_DIR_PERSIST

      public static String TMP_DIR_PERSIST
    • BASE_DIRS

      public static String BASE_DIRS
    • WAR_FILE

      public static String WAR_FILE
    • CLASSES_DIR

      public static String CLASSES_DIR
    • TEST_CLASSES_DIR

      public static String TEST_CLASSES_DIR
    • LIB_JARS

      public static String LIB_JARS
    • DEFAULTS_DESCRIPTOR

      public static String DEFAULTS_DESCRIPTOR
    • OVERRIDE_DESCRIPTORS

      public static String 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 convert
      propsFile - the file to put the properties into
      contextXml - 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 Exception
      Configure a webapp from a properties file.
      Parameters:
      webApp - the webapp to configure
      resource - the properties file to apply
      server - the Server instance to use
      jettyProperties - 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 Exception
      Configure a webapp from properties.
      Parameters:
      webApp - the webapp to configure
      webAppProperties - properties that describe the configuration of the webapp
      server - the jetty Server instance
      jettyProperties - jetty properties
      Throws:
      Exception
    • fromProperties

      public static void fromProperties(MavenWebAppContext webApp, File propsFile, Server server, Map<String,String> jettyProperties) throws Exception
      Configure a webapp from a properties file
      Parameters:
      webApp - the webapp to configure
      propsFile - the properties to apply
      server - the Server instance to use if there is a context xml file to apply
      jettyProperties - jetty properties to use if there is a context xml file to apply
      Throws:
      Exception