我开发了一个有两层的Web应用程序:前端层和后端。我使用distributionManagement在artifactory中部署了后端战争。现在我想部署前端。我使用maven程序集插件。我做了一个拉链。我想知道如何在神器中部署前端zip?谢谢您的帮助。
<!-- 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>
答案 0 :(得分:0)
您可以使用maven命令部署单独的文件: mvn -X clean package deploy:deploy-file -Dfile = / frontend-1.0.zip