我有一个 web 应用程序 (TestWeb) 和多个 java 依赖项项目 (TestCommon、TestModule)。我能够使用 maven 构建所有 3 个项目。它已经从中创建了 war 文件和 jar 文件。我需要使用 Maven 创建 .ear 文件。我怎样才能创造耳朵并建造它们?测试网/pom.xml<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>TestWeb</groupId> <artifactId>TestWeb</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>war</packaging> <build> <sourceDirectory>src</sourceDirectory> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.0</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.4</version> <configuration> <warSourceDirectory>WebContent</warSourceDirectory> <failOnMissingWebXml>false</failOnMissingWebXml> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>TestCommon</groupId> <artifactId>TestCommon</artifactId> <version>0.0.1-SNAPSHOT</version> <scope>compile</scope> </dependency> <dependency> <groupId>TestModule</groupId> <artifactId>TestModule</artifactId> <version>0.0.1-SNAPSHOT</version> <scope>compile</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> </dependencies></project>
添加回答
举报
0/150
提交
取消