finalNameプロパティを指定してjarに必要な名前を付け、「jar-with-dependencies」サフィックスを回避するためにappendAssemblyIdをfalseにするように指定できます。
以下の構成では、「test.jar」というjarが出力されます。
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-4</version>
<executions>
<execution>
<id>jar-with-dependencies</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>test</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
更新:コメントに基づいて、組み込み記述子の使用は機能しません。これは、アセンブリプラグインの最近のバージョンのバグによるものだと思います。分類子のサポートは削除されていますが、組み込みの記述子を使用するとIDが修正されるため、大きな名前になります。
回避策として、 jar-with-dependencies記述子で使用されるアセンブリ記述子をコピーしてIDを変更できます。
この例では、アセンブリIDがfinalNameに追加されるため、region-full.jarという名前が必要な場合は、finalNameをregionとして、アセンブリIDをfullとして指定できます。これにより、region-full.jarという名前のファイルがターゲットに作成されますが、分類子として完全に使用される添付アーティファクトとしてMavenリポジトリにインストールされることに注意してください。このIDが他のアセンブリのIDと異なる限り、衝突は発生しません。
pomの構成は次のようになります。
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-4</version>
<executions>
<execution>
<id>jar-with-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/jar-assembly.xml</descriptor>
</descriptors>
<finalName>region</finalName>
</configuration>
</execution>
</executions>
</plugin>
src / main /assemblyのjar-assembly.xmlは次のようになります。
<assembly>
<id>full</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<unpack>true</unpack>
<scope>runtime</scope>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>${project.build.outputDirectory}</directory>
</fileSet>
</fileSets>
</assembly>