Documentation Center

Building your web application (Java)

About this task

By default only the core DXA module is enabled.

You need to the following procedure only once and not for every web application you want to build.

Procedure

  1. Run the following Maven command to generate a list of all publically available Maven archetypes:
    mvn archetype:generate
  2. Filter the archetype list to find the DXA archetype. Type dxa.
  3. Select dxa-webapp-archetype.
  4. Choose the version of the archetype.
  5. Specify the groupId, artifactId, version, and package.
    A subdirectory named after the groupId is created.
  6. Move to the subdirectory named after the groupId you specified.
  7. Set the following configuration values:
    • If you are working with SDL Tridion 2013 SP1:
      1. Add the cd_licenses.xml to the %TOMCAT_HOME%\webapps\<webappdir>\WEB-INF\classes directory.
      2. In the %TOMCAT_HOME%\webapps\<webappdir>\WEB-INF\classes directory, edit the following configuration files:
        • cd_storage_conf.xml - modify the database settings to point to a Tridion broker database in which the content that the web application should use is deployed.
        • cd_dynamic_conf.xml - set the URLs to Tridion publications mapping.
        • cwd_engine_conf.xml - set Tridion Contextual Web Delivery engine configuration if you want to use Contextual Image Delivery for serving images.
    • If you are working with SDL Web 8:
      • In the %TOMCAT_HOME%\webapps\<webappdir>\WEB-INF\classes directory, edit the cd_client_conf.xml and cwd_client_conf.xml configuration files, where you can specify the Discovery Service URL or OAuth credentials.
  8. Run the following Maven command to build your application:
    mvn clean package -P<VERSION>

    where <VERSION> can be either 2013sp1 or web8.

What to do next

Once your web application is built, you can run it.