Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9213091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:40:09+00:00 2026-06-18T01:40:09+00:00

I am having a problem with some functionality I need configured. Here is a

  • 0

I am having a problem with some functionality I need configured.
Here is a part of my POM, where I configured a project to be assembled into two different files: FirstNameProject-VERSION-bin.zip and SecondNameProject-VERSION-bin.zip.
The idea is that I had to maintain those names set, even if the original artefact is common.

<?xml version="1.0" encoding="UTF-8"?>

http://maven.apache.org/xsd/maven-4.0.0.xsd&#8221;>
4.0.0

<groupId>com.project.my</groupId>
<artifactId>MyGenericProject</artifactId>
<name>Generic Project</name>

<version>2.0.2-SNAPSHOT</version>
...
<build>
     <plugins>
        ....
        <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.2.1</version>
            <executions>
                <execution>
                    <id>first</id>
                    <configuration>
                        <finalName>FirstNameProject-${project.version}-bin</finalName>
                        <appendAssemblyId>false</appendAssemblyId>
                        <descriptors>
                            <descriptor>src/main/assembly/resources_first.xml</descriptor>
                        </descriptors>
                    </configuration>
                    <phase>package</phase>
                    <goals>
                        <goal>single</goal>
                    </goals>
                </execution>
                <execution>
                    <id>second</id>
                    <configuration>
                        <finalName>FirstNameProject-${project.version}-bin</finalName>
                        <appendAssemblyId>false</appendAssemblyId>
                        <descriptors>
                            <descriptor>src/main/assembly/resources_second.xml</descriptor>
                        </descriptors>
                    </configuration>
                    <phase>package</phase>
                    <goals>
                        <goal>single</goal>
                    </goals>
                </execution>                   
            </executions>
        </plugin>
    </plugins>
</build>

This is working properly and in the mvn package logs I can see:

[INFO] --- maven-assembly-plugin:2.2.1:single (first) @ MyGenericProject ---
[INFO] Reading assembly descriptor: src/main/assembly/resources_first.xml
[INFO] Building zip: C:\MyPath\MyProject_trunk\target\FirstNameProject-2                                                                   .0.2-bin.zip
[INFO]
[INFO] --- maven-assembly-plugin:2.2.1:single (second) @ MyGenericProject ---
[INFO] Reading assembly descriptor: src/main/assembly/resources_second.xml
[INFO] Building zip: C:\MyPath\MyProject_trunk\target\SecondNameProject-2.0                                                                   .2-bin.zip

The problem is that, at during install, it just reverts to the generic name and install the the rightly named file as the Generic one!

[INFO] — maven-install-plugin:2.3.1:install (default-install) @ MyGenericProject —
[INFO] Installing C:\MyPath\MyProject_trunk\target\MyGenericProject-2.0.2-SNAPSHOT.jar to C:.m2\repository\com\project\my\MyGenericProject\2.0.2-SNAPSHOT\MyGenericProject-2.0.2-SNAPSHOT.jar
[INFO] Installing C:\MyPath\MyProject_trunk\pom.xml to C:.m2\repository\com\project\my\MyGenericProject\2.0.2-SNAPSHOT\MyGenericProject-2.0.2-SNAPSHOT.pom
[INFO] Installing C:\MyPath\MyProject_trunk\target\FirstNameProject-2.0.2-SNAPSHOT-bin.zip to C:.m2\repository\com\project\my\MyGenericProject\2.0.2-SNAPSHOT\MyGenericProject-2.0.2-SNAPSHOT.zip

I am imagining that this is because the install plugin has no visibility on exactly how the assembly plugin was configured so I ask you: how can I configure the install plugin so that I will end up with FirstNameProject-VERSION-bin.zip and SecondNameProject-VERSION-bin.zip installed in my repository??

I hope I was clear enough,
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:40:10+00:00Added an answer on June 18, 2026 at 1:40 am

    It sounds like Maven is “attaching” the assembly artifact to the project under the default name. The first option is to scour the assembly plugin configuration to see if there’s a way to control this. Looking through it myself, I don’t see a way to do this. I would have thought it would have used your final name configuration, but if it doesn’t, it doesn’t.

    The workaround I can offer, and I would hope someone can offer something more standard, is to configure the assembly to NOT attach itself.

    Next, take the file it creates, the one with the name you want, and use the build-helper plugin to attach the file under the precise coordinates that you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok, so I'm having a bit of a problem here. I need to be
I'm having some problem with validations for multiple fields, specifically with case-sensitive unique validations
i am having some problem with position: absolute div. IE7 displays it next to
I'm having some problem with this statement declare @result int select @result = (select
I am having some problem with jsonp and jquery. This is my code -
I'm having some problem consuming REST Service and want to figure out what I'm
I'm having some problem with MKMapView / annotations / UINavigationController. Basically, i manage my
I've having this problem with some JavaScript code. I've simplified it in the error
I'm having a problem with some code I've written. I've had to anonymize it,
I'm having a problem with some T-SQL in a SP on SQLServer 2005 comparing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.