プロジェクトの主要な成果物の名前を変更することはできないと思います。
とにかく、過去に私がこれまでに行ったことは、maven にファイルを新しい名前でコピーさせ、それをビルドの成果物に「添付」することでした。2 つのプラグインを構成することによって:
- コピーするmaven-ant-run
私のプロジェクトの主要なアーティファクトとともに私のレポにデプロイするために添付するmaven-build-helper 。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<configuration>
<target>
<copy file="${project.build.directory}/${project.build.finalName}.war"
tofile="${project.build.directory}/${project.build.finalName}.car" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
そして2番目:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-instrumented-jar</id>
<phase>verify</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.build.finalName}.car</file>
<type>car</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
お役に立てば幸いです。少なくとも、より良い解決策が見つかるまで。