Maven依赖项未复制到WEB-INF \ lib文件夹

时间:2014-05-27 04:27:06

标签: java maven

无论我mvn clean install做多少-U这个依赖(以及其他一些)都没有被target\app-1.0-SNAPSHOT\WEB-INF\lib文件夹处理:

    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-rest-webmvc</artifactId>
        <version>2.1.0.RELEASE</version>
    </dependency>

现在不知道为什么会这样,当在 pom.xml 中有<packaging>war</packaging>

构建

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.google.appengine</groupId>
                <artifactId>appengine-maven-plugin</artifactId>
                <version>${appengine.version}</version>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>install</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- Copies static web files from src/main/webapp to target/${webappDirectory} -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1.1</version>
                <executions>
                    <execution>
                        <!-- the exploded goal gets executed during compile phase -->
                        <phase>compile</phase>
                        <goals>
                            <goal>exploded</goal>
                            <goal>war</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <warName>${project.artifactId}</warName>
                    <webappDirectory>${webappDirectory}</webappDirectory>
                </configuration>
            </plugin>
        </plugins>
    </build>

0 个答案:

没有答案