如何在工件参考中部署带有 Maven 程序集插件的 zip 文件 [英] How deploy a zip file whith Maven assembly plugin in the artifactory referentiel
问题描述
我开发了一个具有两层的 Web 应用程序:前端层和后端.我使用distributionManagement 在artifactory 中部署了后端战争.现在我想部署前端.我使用 Maven 程序集插件.我做了一个拉链.我想知道如何在 artifactory 中部署前端 zip?感谢您的帮助.
I develop a web application that has two layers: a frontend layer and a backend. I deployed the backend war in artifactory using distributionManagement. Now I want to deploy the frontend. I use maven assembly plugin. I made a zip. I would like to know how to deploy the frontend zip in artifactory? Thank you for your help.
<!-- Maven assembly plugin -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>myArchive</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/zip.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
<!--My zip.xml-->
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>WebContent</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>WebContent</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>**/*.*</include>
</includes>
</fileSet>
</fileSets>
</assembly>
推荐答案
您可以使用 maven 命令来部署单独的文件:mvn -X clean package deploy:deploy-file -Dfile=/frontend-1.0.zip
You can use maven command to deploy separate files: mvn -X clean package deploy:deploy-file -Dfile=/frontend-1.0.zip
这篇关于如何在工件参考中部署带有 Maven 程序集插件的 zip 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!