Documentation Home

Avalara Environment Setup

Prerequisites

You will want to keep note of the items listed below, as they may be in use with the Avalara Tax Module

  • Account Number
  • License Key
  • Company Code
  • Login
  • Password

First start out by adding the Avalara tax module to your existing project. Add this dependency to your pom.xml :

<dependency>
    <groupId>com.broadleafcommerce</groupId>
    <artifactId>broadleaf-avalara</artifactId>
    <version>2.0.0-GA</version> --Edit the version
</dependency>

Next you will want to add bl-avalara-applicationContext.xml to the patch config list in the Site web.xml, will look similar to this:

<context-param>
    <param-name>patchConfigLocation</param-name>
    <param-value>
        classpath:/bl-open-admin-contentClient-applicationContext.xml
        classpath:/bl-cms-contentClient-applicationContext.xml
        classpath:/bl-avalara-applicationContext.xml
        classpath:/applicationContext.xml
        /WEB-INF/applicationContext-datasource.xml
        /WEB-INF/applicationContext-email.xml
        /WEB-INF/applicationContext-security.xml
        /WEB-INF/applicationContext-filter.xml
        /WEB-INF/applicationContext.xml
    </param-value>
</context-param>

You will also need to add it to the web.xml under admin, will look similar to this:

<context-param>
    <param-name>patchConfigLocation</param-name>
    <param-value>
        classpath:/bl-open-admin-contentClient-applicationContext.xml
        classpath:/bl-open-admin-contentCreator-applicationContext.xml
        classpath:/bl-admin-applicationContext.xml
        classpath:/bl-cms-contentClient-applicationContext.xml
        classpath:/bl-cms-contentCreator-applicationContext.xml
        classpath:/bl-avalara-applicationContext.xml
        classpath:/applicationContext.xml
        /WEB-INF/applicationContext-datasource.xml
        /WEB-INF/applicationContext-admin-security.xml
        /WEB-INF/applicationContext-admin-filter.xml
        /WEB-INF/applicationContext-admin.xml
    </param-value>
</context-param>

Finally, you'll need to add bl-avalara-admin-applicationContext-servlet.xml in the admin's DispatcherService configuration in web.xml that should look similar to this:

<servlet>
    <servlet-name>admin</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath:/applicationContext-servlet-open-admin.xml
            classpath:/applicationContext-servlet-admin.xml
            classpath:/applicationContext-servlet-cms-contentClient.xml
            classpath:/applicationContext-servlet-cms-contentCreator.xml
            ...
            classpath:/bl-avalara-admin-applicationContext-servlet.xml
            ...
            /WEB-INF/applicationContext-servlet-admin.xml
            ...
        </param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>