Springboot maven jetty版本无法更改

时间:2016-11-01 21:04:27

标签: maven spring-boot jetty embedded-jetty

我的JDK是:

java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
Chethans-Macbook-Pro-2:viglink chethanshankar$ 

我的maven版本是:

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00)
Maven home: /usr/local/Cellar/maven/3.3.9/libexec
Java version: 1.7.0_79, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.6", arch: "x86_64", family: "mac"

我想将spring-boot的Jetty版本更改为: 8.1.15.v20140411

我的pom中有以下内容:

<properties>
    <jetty.version>8.1.15.v20140411</jetty.version>
    <jetty-jsp.version>2.2.0.v201112011158</jetty-jsp.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
        <exclusions>
            <exclusion>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-tomcat</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-jetty</artifactId>
        <exclusions>
            <exclusion>
                <groupId>org.eclipse.jetty.websocket</groupId>
                <artifactId>*</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

“mvn dependency:tree”和“mvn clean install”编译为:

[INFO] +- org.springframework.boot:spring-boot-starter-jetty:jar:1.4.1.RELEASE:compile
[INFO] |  +- org.eclipse.jetty:jetty-servlets:jar:9.3.11.v20160721:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-continuation:jar:9.3.11.v20160721:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-http:jar:9.3.11.v20160721:compile
[INFO] |  |  |  \- (org.eclipse.jetty:jetty-util:jar:9.3.11.v20160721:compile - omitted for duplicate)
[INFO] |  |  +- org.eclipse.jetty:jetty-util:jar:9.3.11.v20160721:compile
[INFO] |  |  \- org.eclipse.jetty:jetty-io:jar:9.3.11.v20160721:compile
[INFO] |  |     \- (org.eclipse.jetty:jetty-util:jar:9.3.11.v20160721:compile - omitted for duplicate)
[INFO] |  +- org.eclipse.jetty:jetty-webapp:jar:9.3.11.v20160721:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-xml:jar:9.3.11.v20160721:compile
[INFO] |  |  |  \- (org.eclipse.jetty:jetty-util:jar:9.3.11.v20160721:compile - omitted for duplicate)
[INFO] |  |  \- org.eclipse.jetty:jetty-servlet:jar:9.3.11.v20160721:compile
[INFO] |  |     \- org.eclipse.jetty:jetty-security:jar:9.3.11.v20160721:compile
[INFO] |  |        \- org.eclipse.jetty:jetty-server:jar:9.3.11.v20160721:compile
[INFO] |  |           +- (javax.servlet:javax.servlet-api:jar:3.1.0:compile - omitted for duplicate)
[INFO] |  |           +- (org.eclipse.jetty:jetty-http:jar:9.3.11.v20160721:compile - omitted for duplicate)
[INFO] |  |           \- (org.eclipse.jetty:jetty-io:jar:9.3.11.v20160721:compile - omitted for duplicate)
[INFO] |  +- org.eclipse.jetty.websocket:websocket-server:jar:9.3.11.v20160721:compile
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-common:jar:9.3.11.v20160721:compile
[INFO] |  |  |  +- org.eclipse.jetty.websocket:websocket-api:jar:9.3.11.v20160721:compile
[INFO] |  |  |  +- (org.eclipse.jetty:jetty-util:jar:9.3.11.v20160721:compile - omitted for duplicate)
[INFO] |  |  |  \- (org.eclipse.jetty:jetty-io:jar:9.3.11.v20160721:compile - omitted for duplicate)
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-client:jar:9.3.11.v20160721:compile
[INFO] |  |  |  +- (org.eclipse.jetty:jetty-util:jar:9.3.11.v20160721:compile - omitted for duplicate)
[INFO] |  |  |  +- (org.eclipse.jetty:jetty-io:jar:9.3.11.v20160721:compile - omitted for duplicate)
[INFO] |  |  |  \- (org.eclipse.jetty.websocket:websocket-common:jar:9.3.11.v20160721:compile - omitted for duplicate)
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-servlet:jar:9.3.11.v20160721:compile
[INFO] |  |  |  +- (org.eclipse.jetty.websocket:websocket-api:jar:9.3.11.v20160721:compile - omitted for duplicate)
[INFO] |  |  |  \- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO] |  |  +- (org.eclipse.jetty:jetty-servlet:jar:9.3.11.v20160721:compile - omitted for duplicate)
[INFO] |  |  \- (org.eclipse.jetty:jetty-http:jar:9.3.11.v20160721:compile - omitted for duplicate)

我的主要课程:

@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class })
public class Application {
    public static void main(String[] args) throws Exception {        
        SpringApplication app = new SpringApplication(Application.class,
                SpringComponentScanConfiguration.class,
                CommonDataLayerConfigurer.class,
                CommonSchedulingConfigurer.class,
                CommonSpringContextConfiguration.class);
        app.setBannerMode(Banner.Mode.CONSOLE);
        app.run( args);

    }
}

我做错了什么?如何在我的pom中更改Jetty版本?感谢。

2 个答案:

答案 0 :(得分:3)

要使属性覆盖工作,您需要将spring-boot-starter-parent声明为父pom。

(1)没有spring-boot作为父级 - Jetty v9.2.9.v20150224

如果您不希望使用spring-boot作为您的父母pom(正如您在评论中所述),则需要:

  • jetty-servlets
  • 中排除spring-boot-starter-jetty
  • 自己包含jetty-servlets目标版本。

示例,基于您提供的dependency:tree

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.package.groupid</groupId>
    <artifactId>appname</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <properties>
        <jetty.version>9.2.9.v20150224</jetty.version>
        <servlet-api.version>3.1.0</servlet-api.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>1.4.1.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jetty</artifactId>

            <exclusions>
                <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.eclipse.jetty.websocket</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-annotations</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-client</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-continuation</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-deploy</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-http</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-io</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>apache-jstl</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>apache-jsp</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-jmx</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-plus</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-security</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlets</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-util</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-webapp</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-xml</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty.websocket</groupId>
            <artifactId>javax-websocket-server-impl</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty.websocket</groupId>
            <artifactId>websocket-client</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty.websocket</groupId>
            <artifactId>websocket-server</artifactId>
            <version>${jetty.version}</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>${servlet-api.version}</version>
        </dependency>


    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>com.alexbt.Launcher</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

(2)没有spring-boot作为父级 - jetty v8.1.15.v20140411

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.package.groupid</groupId>
    <artifactId>appname</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>1.4.1.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jetty</artifactId>

            <exclusions>
                <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.eclipse.jetty.websocket</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.eclipse.jetty.aggregate</groupId>
            <artifactId>jetty-all-server</artifactId>
            <version>8.1.15.v20140411</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>com.alexbt.Launcher</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

(3)以spring-boot为父

的示例

使用以下内容(取自Spring-Boot documentation):

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <!-- Inherit defaults from Spring Boot -->
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.4.1.RELEASE</version>
    </parent>

    <groupId>com.example</groupId>
    <artifactId>myproject</artifactId>
    <version>0.0.1-SNAPSHOT</version>

    <properties>
        <jetty.version>8.1.15.v20140411</jetty.version>
        <jetty-jsp.version>2.2.0.v201112011158</jetty-jsp.version>
    </properties>

    <!-- Add typical dependencies for a web application -->
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
    </dependencies>

    <!-- Package as an executable jar -->
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

Jetty 9.2

顺便说一句,Jetty 9.2版与JDK 7(see table here)兼容。

答案 1 :(得分:1)

谢谢。没有父母与Jetty合作,我得到了春天的启动:

    <jetty.version>9.2.17.v20160517</jetty.version>
    <hibernate.version>4.3.5.Final</hibernate.version>

关键是:

  1. 排除 spring-boot Tomcat和 include spring-boot jetty jar。
  2. AND 包括所有弹跳式Jetty罐子。(不能强调这一点)
  3. Spring Boot文档略有误导,因为它没有指定当你不从spring-boot parent继承时必须包含所有单独的tomcat / jetty jar。

    http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using-boot-maven-without-a-parent

    我附加了整个pom.xml,您可以省略与&#34; companyABC&#34;相关的依赖项。希望它对其他人有用。

    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <parent>
            <groupId>com.companyABC</groupId>
            <artifactId>companyABC-parent-account</artifactId>
            <version>1.1.10-SNAPSHOT</version>
            <relativePath>../companyABC-parent/account/pom.xml</relativePath>
        </parent>
        <modelVersion>4.0.0</modelVersion>
    
        <groupId>com.companyABC</groupId>
        <artifactId>companyABC-campaign-io</artifactId>
        <version>1.1.6-SNAPSHOT</version>
    
        <properties>
            <jetty.version>9.2.17.v20160517</jetty.version>
            <hibernate.version>4.3.5.Final</hibernate.version>
            <snippetsDirectory>${project.build.directory}/generated-snippets</snippetsDirectory>
            <!-- TODO ? set this with an environmental variable -->
            <springboot.root>/mnt/persistent/springboot</springboot.root>
            <springboot.version>1.4.0.RELEASE</springboot.version>
    
            <companyABC.test.version>1.1.0</companyABC.test.version>
            <companyABC.core.version>1.1.27</companyABC.core.version>
            <companyABC.account.version>1.1.10</companyABC.account.version>
        </properties>
    
        <profiles>
            <profile>
                <id>release-mode</id>
                <build>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-plugin</artifactId>
                            <configuration>
                                <!-- dont skip test to have the doc created -->
                                <skipTests>false</skipTests>
                                <includes>
                                    <include>**/*Documentation.java</include>
                                </includes>
                                <systemPropertyVariables>
                                    <companyABC_env>test</companyABC_env>
                                    <spring.profiles.active>test</spring.profiles.active>
                                </systemPropertyVariables>
                                <!-- <argLine>${surefire.default.argLine}</argLine> 
                                    <forkCount>1</forkCount> <reuseForks>true</reuseForks> -->
                            </configuration>
                        </plugin>
                    </plugins>
                </build>
            </profile>
        </profiles>
    
        <dependencyManagement>
            <dependencies>
                <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-dependencies</artifactId>
                    <version>1.4.0.RELEASE</version>
                    <type>pom</type>
                    <scope>import</scope>
                </dependency>
            </dependencies>
        </dependencyManagement>
    
        <dependencies>
            <!--TODO swap parent above with this block below (wasn't working 
                earlier) -->
            <!--<dependency> -->
            <!--&lt;!&ndash; Import dependency management from Spring Boot &ndash;&gt; -->
            <!--<groupId>org.springframework.boot</groupId> -->
            <!--<artifactId>spring-boot-dependencies</artifactId> -->
            <!--<version>1.4.0.RELEASE</version> -->
            <!--<type>pom</type> -->
            <!--<scope>import</scope> -->
            <!--</dependency> -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
                <exclusions>
                    <exclusion>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-tomcat</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-jetty</artifactId>
                <exclusions>
                    <exclusion>
                        <groupId>org.eclipse.jetty</groupId>
                        <artifactId>jetty-servlets</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.eclipse.jetty</groupId>
                        <artifactId>jetty-continuation</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.eclipse.jetty</groupId>
                        <artifactId>jetty-http</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.eclipse.jetty</groupId>
                        <artifactId>jetty-util</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.eclipse.jetty</groupId>
                        <artifactId>jetty-io</artifactId>
                    </exclusion>
    
                    <exclusion>
                        <groupId>org.eclipse.jetty</groupId>
                        <artifactId>jetty-webapp</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.eclipse.jetty</groupId>
                        <artifactId>jetty-xml</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.eclipse.jetty</groupId>
                        <artifactId>jetty-servlet</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.eclipse.jetty</groupId>
                        <artifactId>jetty-security</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.eclipse.jetty</groupId>
                        <artifactId>jetty-server</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.eclipse.jetty</groupId>
                        <artifactId>jetty-webapp</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.eclipse.jetty</groupId>
                        <artifactId>jetty-annotations</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.eclipse.jetty</groupId>
                        <artifactId>jetty-plus</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.eclipse.jetty</groupId>
                        <artifactId>jetty-jndi</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.eclipse.jetty.websocket</groupId>
                        <artifactId>websocket-client</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.eclipse.jetty.websocket</groupId>
                        <artifactId>websocket-server</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.eclipse.jetty.websocket</groupId>
                        <artifactId>javax-websocket-server-impl</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
    
    
    
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-servlets</artifactId>
                <version>${jetty.version}</version>
            </dependency>
    
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-servlets</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-continuation</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-http</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-util</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-io</artifactId>
                <version>${jetty.version}</version>
            </dependency>
    
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-webapp</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-xml</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-servlet</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-security</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-server</artifactId>
                <version>${jetty.version}</version>
            </dependency>
    
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-annotations</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-plus</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-jndi</artifactId>
                <version>${jetty.version}</version>
            </dependency>
    
            <dependency>
                <groupId>org.eclipse.jetty.websocket</groupId>
                <artifactId>websocket-client</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty.websocket</groupId>
                <artifactId>websocket-server</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty.websocket</groupId>
                <artifactId>javax-websocket-server-impl</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>19.0</version>
            </dependency>
    
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>1.10</version>
            </dependency>
            <dependency>
                <groupId>com.companyABC</groupId>
                <artifactId>companyABC-email</artifactId>
                <version>${companyABC.account.version}</version>
            </dependency>
            <dependency>
                <groupId>com.companyABC</groupId>
                <artifactId>companyABC-user</artifactId>
                <version>${companyABC.account.version}</version>
            </dependency>
            <dependency>
                <groupId>com.companyABC</groupId>
                <artifactId>companyABC-common</artifactId>
                <version>${companyABC.core.version}</version>
            </dependency>
            <dependency>
                <groupId>com.companyABC</groupId>
                <artifactId>companyABC-utils</artifactId>
                <version>${companyABC.core.version}</version>
            </dependency>
    
            <!--TODO figure out if there's a better way of handling this? -->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>2.7.2</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>2.7.2</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>2.7.2</version>
            </dependency>
    
            <!-- needed for hibernate for some reason -->
            <dependency>
                <groupId>javax.el</groupId>
                <artifactId>javax.el-api</artifactId>
                <version>2.2.4</version>
            </dependency>
    
            <!-- TODO figure out why this isn't imported automatically (is a 
                dependency of companyABC-fulltextsearch -->
            <!-- <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> 
                <version>2.3.4</version> </dependency> -->
    
            <!-- test -->
            <dependency>
                <groupId>com.companyABC</groupId>
                <artifactId>companyABC-test</artifactId>
                <version>${companyABC.test.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.companyABC</groupId>
                <artifactId>companyABC-common</artifactId>
                <exclusions>
                    <exclusion>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-core</artifactId>
                    </exclusion>
    
                    <exclusion>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-ehcache</artifactId>
                    </exclusion>
                </exclusions>
                <version>${companyABC.core.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-core</artifactId>
                <version>${hibernate.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-ehcache</artifactId>
                <version>${hibernate.version}</version>
            </dependency>
    
            <!--Test deps -->
            <dependency>
                <groupId>org.springframework.restdocs</groupId>
                <artifactId>spring-restdocs-restassured</artifactId>
                <version>1.1.2.RELEASE</version>
                <scope>test</scope>
            </dependency>
            <dependency> 
                <groupId>org.springframework.restdocs</groupId>
                <artifactId>spring-restdocs-mockmvc</artifactId>
                <version>1.1.2.RELEASE</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-test</artifactId>
                <version>${springboot.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    
        <build>
            <extensions>
                <!-- Add support for the "deb" packaging -->
                <extension>
                    <groupId>org.vafer</groupId>
                    <artifactId>jdeb</artifactId>
                    <version>1.4</version>
                </extension>
            </extensions>
    
            <plugins>
                <!--Allows packaging of artifact as executable jar -->
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                </plugin>
    
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <configuration>
                        <source>1.7</source>
                        <target>1.7</target>
                        <fork>true</fork>
                        <maxmem>1024m</maxmem>
                    </configuration>
                </plugin>
    
                <!-- Standard restdocs config -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <includes>
                            <include>**/*Documentation.java</include>
                            <include>**/*Test.java</include>
                        </includes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.asciidoctor</groupId>
                    <artifactId>asciidoctor-maven-plugin</artifactId>
                    <version>1.5.2</version>
                    <executions>
                        <execution>
                            <id>generate-docs</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>process-asciidoc</goal>
                            </goals>
                            <configuration>
                                <backend>html</backend>
                                <doctype>book</doctype>
                                <attributes>
                                    <snippets>${snippetsDirectory}</snippets>
                                </attributes>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
    
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.7</version>
                    <executions>
                        <execution>
                            <id>copy-resources</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>
                                    ${project.build.outputDirectory}/static/docs
                                </outputDirectory>
                                <resources>
                                    <resource>
                                        <directory>
                                            ${project.build.directory}/generated-docs
                                        </directory>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
    
                <!-- Debian packaging -->
                <plugin>
                    <artifactId>jdeb</artifactId>
                    <groupId>org.vafer</groupId>
                    <version>1.4</version>
                    <configuration>
                        <controlDir>[[baseDir]]/src/config/deb</controlDir>
                        <classifier>all</classifier>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>jdeb</goal>
                            </goals>
                            <configuration>
                                <controlDir>${basedir}/src/deb/control</controlDir>
                                <dataSet>
                                    <data>
                                        <src>${project.build.directory}/${project.build.finalName}.jar</src>
                                        <type>file</type>
                                        <mapper>
                                            <type>perm</type>
                                            <prefix>${springboot.root}/campaign</prefix>
                                            <filemode>644</filemode>
                                            <user>root</user>
                                            <group>root</group>
                                        </mapper>
                                    </data>
                                </dataSet>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
    
                <!-- These probably need to be refactored -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <configuration>
                        <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <useReleaseProfile>false</useReleaseProfile>
                        <localCheckout>true</localCheckout>
                        <pushChanges>false</pushChanges>
                        <arguments>-DskipTests=true -P release-mode,prod</arguments>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.10</version>
                </plugin>
            </plugins>
        </build>
    
    
        <repositories>
            <repository>
                <id>companyABC-repo</id>
                <url>http://nexus/content/groups/public</url>
                <snapshots>
                    <updatePolicy>always</updatePolicy>
                </snapshots>
                <releases>
                    <updatePolicy>always</updatePolicy>
                </releases>
            </repository>
        </repositories>
    
        <pluginRepositories>
            <pluginRepository>
                <id>companyABC-repo</id>
                <url>http://nexus/content/groups/public</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </pluginRepository>
        </pluginRepositories>
    
        <distributionManagement>
            <!-- use the following if you're not using a snapshot version. -->
            <repository>
                <id>companyABC-nexus</id>
                <name>RepositoryProxy</name>
                <url>http://nexus/content/repositories/releases</url>
            </repository>
    
            <!-- use the following if you ARE using a snapshot version. -->
            <snapshotRepository>
                <id>companyABC-nexus</id>
                <name>RepositoryProxy</name>
                <url>http://nexus/content/repositories/snapshots</url>
            </snapshotRepository>
        </distributionManagement>
    
        <scm>
            <connection>scm:git:git@github.com:companyABC/companyABC.git</connection>
            <url>scm:git:git@github.com:companyABC/companyABC.git</url>
            <developerConnection>scm:git:git@github.com:companyABC/companyABC.git</developerConnection>
            <tag>companyABC-campaign-1.0.0</tag>
        </scm>
    </project>