Я получил эту ошибку после использования команды maven
Не удалось выполнить цель org.codehaus.izpack: izpack-maven-plugin: 5.1.3: izpack (по умолчанию) в проекте izpack-example: выполнение по умолчаниюцель org.codehaus.izpack: izpack-maven-plugin: 5.1.3: сбой izpack: для артефакта {com.example.test.installer: izpack-example: 1.0-SNAPSHOT: jar}: присоединенный артефакт должен иметь другой идентификаторчем его соответствующий основной артефакт.-> [Помощь 1]
Я пытался найти решение, должно быть что-то не так с зависимостями (как сказано в сообщении об ошибке), но все еще не могу понять это.
Вот мой файл 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.test.installer</groupId>
<artifactId>izpack-example</artifactId>
<version>1.0-SNAPSHOT</version>
<name>An Example of an installer using izpack</name>
<!-- seems like this needs to be "jar" to accomplish a build of java code too? a bit confused
on the difference between putting "pom" and "jar" here. -->
<packaging>jar</packaging>
<!-- maven repository where the izpack-maven-plugin and such live -->
<repositories>
<repository>
<id>codehaus-releases</id>
<url>https://nexus.codehaus.org/content/repositories/releases</url>
</repository>
</repositories>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<staging.dir>${project.build.directory}/staging</staging.dir>
<izpack.version>5.1.3</izpack.version>
</properties>
<!-- must have a dependency on our separate package that contains the custom
panels -->
<dependencies>
<dependency>
<groupId>com.example.test.installer</groupId>
<artifactId>izpack-panels</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<defaultGoal>package</defaultGoal>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<version>${izpack.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>2.3</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- copy all resources to the staging directory. -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<!-- here the phase you need -->
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${staging.dir}</outputDirectory>
<!-- recursive copy of all resource under src/main/izpack. this is the stuff to install as well as install.xml and panel data and such -->
<resources>
<resource>
<directory>src/main/izpack</directory>
<includes>
<include>**/*</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<!-- copy izpack custom (custom panels, etc.) jars to izpack staging custom -->
<id>copy-izpack-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${staging.dir}/custom</outputDirectory>
<excludeTransitive>false</excludeTransitive>
<stripVersion>true</stripVersion>
<overWriteReleases>true</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<includeArtifactIds>izpack-panels</includeArtifactIds> <!-- IMPORTANT: this causes *only* our custom panels to be copied -->
</configuration>
</execution>
</executions>
</plugin>
<!--
We need to tell the izpack-maven-plugin what to use as the base directory (this is our staging area), and also tell it the install file to use:
-->
<plugin>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-maven-plugin</artifactId>
<!-- <version>${izpack.version}</version> -->
<configuration>
<descriptorEncoding>UTF-8</descriptorEncoding>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals><goal>izpack</goal></goals>
<configuration>
<!-- base for relative paths in izpack descriptor -->
<baseDir>${staging.dir}</baseDir>
<installFile>${staging.dir}/install.xml</installFile>
<output>${project.build.directory}/${outname}</output>
</configuration>
</execution>
</executions>
<!-- must have a dependency here on any code used in the installer, otherwise the classloader
will not find it. So in this case we need our panels and then the package that contains the base classes
for the panels -->
<dependencies>
<dependency>
<groupId>org.codehaus.izpack</groupId>
<artifactId>izpack-panel</artifactId>
<version>${izpack.version}</version>
</dependency>
<dependency>
<groupId>com.example.test.installer</groupId>
<artifactId>izpack-panels</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
Большое спасибо