复制默认的target下面的jar包到项目指定位置(微服务项目)

<!-- 指定到相对路径下-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-artifact</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>
                            <outputDirectory>./../jar</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐