简体   繁体   English

如何在工件参考中部署带有Maven程序集插件的zip文件

[英]How deploy a zip file whith Maven assembly plugin in the artifactory referentiel

I develop a web application that has two layers: a frontend layer and a backend. 我开发了一个具有两层的Web应用程序:前端层和后端。 I deployed the backend war in artifactory using distributionManagement. 我使用distributionManagement在后端中部署了后端战争。 Now I want to deploy the frontend. 现在,我想部署前端。 I use maven assembly plugin. 我使用Maven程序集插件。 I made a zip. 我做了一个拉链。 I would like to know how to deploy the frontend zip in artifactory? 我想知道如何在工件中部署前端zip? 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM