修改maven的war包生成路径

因为要配合jenkins,所以控制了war包的生成目录:

<plugins>
    <!--打war包到指定的目录下 -->
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.8</version>
        <executions>
            <execution>
                <id>copy-war</id>
                <phase>package</phase>
                <goals>
                    <goal>copy</goal>
                </goals>
                <configuration>
                    <artifactItems>
                        <artifactItem>
                            <groupId>${project.groupId}</groupId>
                            <artifactId>${project.artifactId}</artifactId>
                            <version>${project.version}</version>
                            <type>${project.packaging}</type>
                        </artifactItem>
                    </artifactItems>
                    <!--指定war包保存地址-->
                    <outputDirectory>../target/</outputDirectory>
                </configuration>
            </execution>
        </executions>
    </plugin>
</plugins>

  

猜你喜欢

转载自www.cnblogs.com/cztisthebest/p/9083720.html