2
我处于maven使用的入门级别。我希望我能清楚地解释我的问题,我想创建一个包含war文件的ear文件。而且我打算从一开始就用它来创建一个战争文件。另外我想在我的项目中的pom.xml中做到这一点,并且只有一个pom.xml,这是问题;使用maven-ear-plugin创建war文件并将其定义在一个pom.xml中
- 我可以创建ear文件,并且其中包含我在一个pom.xml文件中同时创建的这个war文件吗?
- 当我尝试在webmodule标记中创建war文件时,这里是我遇到的问题“Artifact [war:denem.denem:denem]不是项目的依赖项。”我明白这就是为什么我添加依赖本文件中的相同的pom.xml但这次我遇到的问题
(顺便说一下我的命令来建立这个POM是“MVN清洁套装”)
“1个神器需要缺少
的神器:。
com.denem.denem:com.denem.de2:ear:v0.1"
它试图找到这场战争文件,但我想创建它无法找到它在这里,在我的pom.xml文件中的代码;
<parent>
<groupId>denem.denem</groupId>
<artifactId>com.denem.denem</artifactId>
<version>v0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>denem.denem</groupId>
<artifactId>com.denem.de2</artifactId>
<version>v0.1</version>
<packaging>ear</packaging>
<properties>
<cxf.version>2.2.5</cxf.version>
</properties>
<dependencies>
<dependency>
<groupId>denem.denem</groupId>
<artifactId>denem</artifactId>
<version>v0.1</version>
<type>war</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.5</version>
<configuration>
<finalName>edu</finalName>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<modules>
<webModule>
<groupId>denem.denem</groupId>
<artifactId>denem</artifactId>
<contextRoot>/WebContent</contextRoot>
</webModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
我想我做的很多事情是错误的。但如果你能帮助我,我会很高兴。不管怎样,谢谢你。