码迷,mamicode.com
首页 > 其他好文 > 详细

修改maven的war包生成路径

时间:2018-05-24 18:22:15      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:div   pack   tar   targe   put   aging   地址   保存   apach   

因为要配合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>

  

修改maven的war包生成路径

标签:div   pack   tar   targe   put   aging   地址   保存   apach   

原文地址:https://www.cnblogs.com/cztisthebest/p/9083720.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!