问题描述
我是 maven 新手。我有一个存储库,其中包含 Ansible 剧本及其配置和清单文件。我想要做的就是使用 Jenkinsfile、SCM Checkout 并将 ansible 工件上传到具有版本增量的 nexus。 我能够打包一个war文件并上传到nexus。但是,当我解压缩 war 文件时,它只包含以下文件。
98 07-07-2021 16:53 meta-inf/MANIFEST.MF
0 07-07-2021 16:53 meta-inf/
802 07-07-2021 16:53 meta-inf/maven/devansible/AB-ANSIBLE/pom.xml
86 07-07-2021 16:53 meta-inf/maven/devansible/AB-ANSIBLE/pom.properties
现在我知道它不起作用,我如何使用 maven 将存储库/文件夹打包为 rar、war 或 tar 任何内容。 pom.xml 如下所示。
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>devansible</groupId>
<artifactId>AB-ANSIBLE</artifactId>
<version>1.2.0</version>
<packaging>war</packaging>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<!-- Use this to include a selection of jars that will be included in the WAR -->
<packagingIncludes>${basedir}/*</packagingIncludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)