maven assembly plugin not recognizing <finalName>

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

maven assembly plugin not recognizing <finalName>

Bikramjit Singh
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*
Reply | Threaded
Open this post in threaded view
|

Re: maven assembly plugin not recognizing <finalName>

Anders Hammar
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 <[hidden email]>
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*
>
Reply | Threaded
Open this post in threaded view
|

RE: maven assembly plugin not recognizing <finalName>

Paul Munsey
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: [hidden email] [mailto:[hidden email]] 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 <[hidden email]>
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: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: maven assembly plugin not recognizing <finalName>

Bikramjit Singh
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 <[hidden email]>
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: [hidden email] [mailto:[hidden email]] 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 <[hidden email]>
> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
*Thanks*

*Bikramjit Singh*