You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Bikramjit Singh <bs...@gmail.com> on 2017/03/07 22:48:07 UTC

maven assembly plugin not recognizing

I have following Question

How do I use <finalName> tag to give different name to two jars ? it is not
picking up the <finalName> for 2nd <executioin> ("client" )

Am I doing it wrong ?

I have following.

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <!--<version>3.0.0</version>-->
            <executions>
                <execution>
                    <id>core-assembly</id>
                    <phase>package</phase>
                    <goals>
                        <goal>single</goal>
                    </goals>
                    <configuration>
                        <archive>
                            <manifestEntries>

<Build-Version>${project.version}</Build-Version>
                            </manifestEntries>
                        </archive>
                        <descriptors>

<descriptor>src/main/core-descriptor.xml</descriptor>
                        </descriptors>
                        <appendAssemblyId>false</appendAssemblyId>

<outputDirectory>${project.basedir}/target/dist/framework/lib/server/</outputDirectory>
                        <finalName>core</finalName>
                    </configuration>
                </execution>
                <execution>
                    <id>client-assembly</id>
                    <phase>package</phase>
                    <goals>
                        <goal>single</goal>
                    </goals>
                    <configuration>
                        <archive>
                            <manifestEntries>

<Build-Version>${project.version}</Build-Version>
                            </manifestEntries>
                        </archive>
                        <descriptors>

<descriptor>src/main/client-descriptor.xml</descriptor>
                        </descriptors>
                        <appendAssemblyId>false</appendAssemblyId>

<outputDirectory>${project.basedir}/target/dist/framework/lib/client/</outputDirectory>
                        <finamName>client</finamName>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>


-- 
*Thanks*


*Bikramjit Singh*

Re: maven assembly plugin not recognizing

Posted by Bikramjit Singh <bs...@gmail.com>.
Thanks, I have it working with custom names when I don't mention the
<version> for plugin. is there any side effect of not mentioning the
version ?

bikram

On Wed, Mar 8, 2017 at 10:32 AM, Paul Munsey <Pa...@verifone.com>
wrote:

> finalName has limited use. It works for me at the build level, as seen
> here:
>     <build>
>         <finalName>my-name-1.2.3</finalName>
>         <plugins>
>         ...
>
> But even then, Maven won't install (mvn install) that name. As Anders
> mentioned, if you want multiple assembled artifacts with different names,
> use <appendAssemblyId>true</appendAssemblyId> and your package file's id
> will be included in the filename.
>
> Paul
>
> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> Behalf Of Anders Hammar
> Sent: Tuesday, March 07, 2017 10:44 PM
> To: Maven Users List
> Subject: Re: maven assembly plugin not recognizing <finalName>
>
> There is no finalName config parameter for the single goal, see [1]. I
> suggest that you use appendAssemblyId, which is the intended usage.
>
> [1] http://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html
>
> /Anders
>
> On Tue, Mar 7, 2017 at 11:48 PM, Bikramjit Singh <bs...@gmail.com>
> wrote:
>
> > I have following Question
> >
> > How do I use <finalName> tag to give different name to two jars ? it
> > is not picking up the <finalName> for 2nd <executioin> ("client" )
> >
> > Am I doing it wrong ?
> >
> > I have following.
> >
> > <build>
> >     <plugins>
> >         <plugin>
> >             <groupId>org.apache.maven.plugins</groupId>
> >             <artifactId>maven-assembly-plugin</artifactId>
> >             <!--<version>3.0.0</version>-->
> >             <executions>
> >                 <execution>
> >                     <id>core-assembly</id>
> >                     <phase>package</phase>
> >                     <goals>
> >                         <goal>single</goal>
> >                     </goals>
> >                     <configuration>
> >                         <archive>
> >                             <manifestEntries>
> >
> > <Build-Version>${project.version}</Build-Version>
> >                             </manifestEntries>
> >                         </archive>
> >                         <descriptors>
> >
> > <descriptor>src/main/core-descriptor.xml</descriptor>
> >                         </descriptors>
> >                         <appendAssemblyId>false</appendAssemblyId>
> >
> > <outputDirectory>${project.basedir}/target/dist/framework/lib/server/<
> > /
> > outputDirectory>
> >                         <finalName>core</finalName>
> >                     </configuration>
> >                 </execution>
> >                 <execution>
> >                     <id>client-assembly</id>
> >                     <phase>package</phase>
> >                     <goals>
> >                         <goal>single</goal>
> >                     </goals>
> >                     <configuration>
> >                         <archive>
> >                             <manifestEntries>
> >
> > <Build-Version>${project.version}</Build-Version>
> >                             </manifestEntries>
> >                         </archive>
> >                         <descriptors>
> >
> > <descriptor>src/main/client-descriptor.xml</descriptor>
> >                         </descriptors>
> >                         <appendAssemblyId>false</appendAssemblyId>
> >
> > <outputDirectory>${project.basedir}/target/dist/framework/lib/client/<
> > /
> > outputDirectory>
> >                         <finamName>client</finamName>
> >                     </configuration>
> >                 </execution>
> >             </executions>
> >         </plugin>
> >     </plugins>
> > </build>
> >
> >
> > --
> > *Thanks*
> >
> >
> > *Bikramjit Singh*
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>



-- 
*Thanks*

*Bikramjit Singh*

RE: maven assembly plugin not recognizing

Posted by Paul Munsey <Pa...@VERIFONE.com>.
finalName has limited use. It works for me at the build level, as seen here:
    <build>
        <finalName>my-name-1.2.3</finalName>
        <plugins>
        ...

But even then, Maven won't install (mvn install) that name. As Anders mentioned, if you want multiple assembled artifacts with different names, use <appendAssemblyId>true</appendAssemblyId> and your package file's id will be included in the filename.

Paul

-----Original Message-----
From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On Behalf Of Anders Hammar
Sent: Tuesday, March 07, 2017 10:44 PM
To: Maven Users List
Subject: Re: maven assembly plugin not recognizing <finalName>

There is no finalName config parameter for the single goal, see [1]. I suggest that you use appendAssemblyId, which is the intended usage.

[1] http://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html

/Anders

On Tue, Mar 7, 2017 at 11:48 PM, Bikramjit Singh <bs...@gmail.com>
wrote:

> I have following Question
>
> How do I use <finalName> tag to give different name to two jars ? it 
> is not picking up the <finalName> for 2nd <executioin> ("client" )
>
> Am I doing it wrong ?
>
> I have following.
>
> <build>
>     <plugins>
>         <plugin>
>             <groupId>org.apache.maven.plugins</groupId>
>             <artifactId>maven-assembly-plugin</artifactId>
>             <!--<version>3.0.0</version>-->
>             <executions>
>                 <execution>
>                     <id>core-assembly</id>
>                     <phase>package</phase>
>                     <goals>
>                         <goal>single</goal>
>                     </goals>
>                     <configuration>
>                         <archive>
>                             <manifestEntries>
>
> <Build-Version>${project.version}</Build-Version>
>                             </manifestEntries>
>                         </archive>
>                         <descriptors>
>
> <descriptor>src/main/core-descriptor.xml</descriptor>
>                         </descriptors>
>                         <appendAssemblyId>false</appendAssemblyId>
>
> <outputDirectory>${project.basedir}/target/dist/framework/lib/server/<
> /
> outputDirectory>
>                         <finalName>core</finalName>
>                     </configuration>
>                 </execution>
>                 <execution>
>                     <id>client-assembly</id>
>                     <phase>package</phase>
>                     <goals>
>                         <goal>single</goal>
>                     </goals>
>                     <configuration>
>                         <archive>
>                             <manifestEntries>
>
> <Build-Version>${project.version}</Build-Version>
>                             </manifestEntries>
>                         </archive>
>                         <descriptors>
>
> <descriptor>src/main/client-descriptor.xml</descriptor>
>                         </descriptors>
>                         <appendAssemblyId>false</appendAssemblyId>
>
> <outputDirectory>${project.basedir}/target/dist/framework/lib/client/<
> /
> outputDirectory>
>                         <finamName>client</finamName>
>                     </configuration>
>                 </execution>
>             </executions>
>         </plugin>
>     </plugins>
> </build>
>
>
> --
> *Thanks*
>
>
> *Bikramjit Singh*
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org

Re: maven assembly plugin not recognizing

Posted by Anders Hammar <an...@hammar.net>.
There is no finalName config parameter for the single goal, see [1]. I
suggest that you use appendAssemblyId, which is the intended usage.

[1] http://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html

/Anders

On Tue, Mar 7, 2017 at 11:48 PM, Bikramjit Singh <bs...@gmail.com>
wrote:

> I have following Question
>
> How do I use <finalName> tag to give different name to two jars ? it is not
> picking up the <finalName> for 2nd <executioin> ("client" )
>
> Am I doing it wrong ?
>
> I have following.
>
> <build>
>     <plugins>
>         <plugin>
>             <groupId>org.apache.maven.plugins</groupId>
>             <artifactId>maven-assembly-plugin</artifactId>
>             <!--<version>3.0.0</version>-->
>             <executions>
>                 <execution>
>                     <id>core-assembly</id>
>                     <phase>package</phase>
>                     <goals>
>                         <goal>single</goal>
>                     </goals>
>                     <configuration>
>                         <archive>
>                             <manifestEntries>
>
> <Build-Version>${project.version}</Build-Version>
>                             </manifestEntries>
>                         </archive>
>                         <descriptors>
>
> <descriptor>src/main/core-descriptor.xml</descriptor>
>                         </descriptors>
>                         <appendAssemblyId>false</appendAssemblyId>
>
> <outputDirectory>${project.basedir}/target/dist/framework/lib/server/</
> outputDirectory>
>                         <finalName>core</finalName>
>                     </configuration>
>                 </execution>
>                 <execution>
>                     <id>client-assembly</id>
>                     <phase>package</phase>
>                     <goals>
>                         <goal>single</goal>
>                     </goals>
>                     <configuration>
>                         <archive>
>                             <manifestEntries>
>
> <Build-Version>${project.version}</Build-Version>
>                             </manifestEntries>
>                         </archive>
>                         <descriptors>
>
> <descriptor>src/main/client-descriptor.xml</descriptor>
>                         </descriptors>
>                         <appendAssemblyId>false</appendAssemblyId>
>
> <outputDirectory>${project.basedir}/target/dist/framework/lib/client/</
> outputDirectory>
>                         <finamName>client</finamName>
>                     </configuration>
>                 </execution>
>             </executions>
>         </plugin>
>     </plugins>
> </build>
>
>
> --
> *Thanks*
>
>
> *Bikramjit Singh*
>