I have an assembly that I'm creating with a custom final name. When I run 'mvn clean package' the target folder contains the JAR with the correct name and the Zip assembly with a name the custom name. When I run 'mvn clean install' or 'mvn clean deploy', the Zip file is installed/deployed using the artifactId and the classifier from the assembly ID, instead of the name of the actual file. Why doesn't it use the name of the file as it is?
Example - pom.xml <project> <packaging>jar</packaging> <groupId>org.example</groupId> <artifactId>library</artifactId> <version>1.0-SNAPSHOT</version> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <goals> <goal>single</goal> </goals> <phase>package</phase> </execution> </executions> <configuration> <finalName>service-${project.version}</finalName> <descriptors> <descriptor>src/main/assembly/service-x86-win32.xml</descriptor> </descriptors> </configuration> </plugin> </plugins> </build> </project> service-x86-win32.xml <assembly> <id>x86-win32</id> <formats> <format>zip</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <files> <file> <source>${project.build.directory}/${project.build.finalName}.jar</source> <destName>datastore.war</destName> <fileMode>0644</fileMode> <outputDirectory>webapps</outputDirectory> </file> </files> </assembly> This example will produce the following files in 'target'. target/ library-1.0-SNAPSHOT.jar service-1.0-SNAPSHOT-x86-win32.zip When deployed or installed, the files end up being library/ library-1.0-SNAPSHOT.jar library-1.0-SNAPSHOT-x86-win32.zip ---------------------------------------------------------------------- CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.