[ERROR] Failed to execute goal org.apache.maven.plugins:maven-ear-
plugin:2.6:generate-application-xml (default-generate-application-xml)
on project itaras-ear: Artifact[war:org.apache.maven.plugins:maven-war-
plugin] is not a dependency of the project.
Zuerst habe ich eine WAR-Datei für meine Anwendung erstellt. Jetzt bin ich dabei, meine EAR-Datei zu erstellen, die WAR als Abhängigkeit haben soll.Maven Fehler: Artefakt ist keine Abhängigkeit des Projekts
Ich habe ITARAS-EAR-Modul mit m2e-Plugin ausgeführt, wenn ich die oben genannte Fehlermeldung erhalten habe.
Modul WAR pom.xml ist unten.
<parent>
<groupId>itaras</groupId>
<artifactId>itaras</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>itaras-war</groupId>
<artifactId>itaras-war</artifactId>
<packaging>war</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>src\main\webapp\WEB-INF\web.xml</webXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
Modul EAR pom.xml ist hier.
<parent>
<groupId>itaras</groupId>
<artifactId>itaras</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>itaras-ear</artifactId>
<packaging>ear</packaging>
<dependencies>
<dependency>
<groupId>itaras-war</groupId>
<artifactId>itaras-war</artifactId>
<type>war</type>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.6</version>
<configuration>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<applicationXML>src/main/application/META-
INF/application.xml</applicationXML>
</configuration>
</plugin>
</plugins>
</build>
<groupId>itaras-ear</groupId>
</project>
Vielen Dank im Voraus. Korrigieren Sie mich, wenn ich im Grunde falsch gelaufen war :)
PS: Ich versuche, Materialien zu tun, ohne zu wissen, was es genau bedeutet. Probiere einfach Dinge aus, indem du sie durchsuchst – SRKprakash