You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jochen Wiedmann <jo...@gmail.com> on 2005/12/30 22:34:58 UTC
maven jar plugin: Manifest Entries?
Hi,
how do I add manifest entries to the generated Jar file? I have tried
various things in the style of
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<manifestEntries>
<manifestEntry>
<key>Name</key>
<value>org/apache/xmlrpc/</value>
</manifestEntry>
</manifestEntries>
</manifest>
</archive>
</configuration>
</plugin>
none of which seem to be working?
Regards,
Jochen
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven jar plugin: Manifest Entries?
Posted by Man-Chi Leung <ma...@gmail.com>.
this is my pom, it works fine!
<build>
<plugins>
<!-- PLUGIN: jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<!-- Configure this for different project -->
<mainClass>com.mycompany.app.App</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
Best Regards,
Manchi Leung
On Dec 31, 2005, at 5:34 AM, Jochen Wiedmann wrote:
>
> Hi,
>
> how do I add manifest entries to the generated Jar file? I have
> tried various things in the style of
>
> <plugin>
> <artifactId>maven-jar-plugin</artifactId>
> <configuration>
> <archive>
> <manifest>
> <manifestEntries>
> <manifestEntry>
> <key>Name</key>
> <value>org/apache/xmlrpc/</value>
> </manifestEntry>
> </manifestEntries>
> </manifest>
> </archive>
> </configuration>
> </plugin>
>
> none of which seem to be working?
>
>
> Regards,
>
> Jochen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
Re: maven jar plugin: Manifest Entries?
Posted by Sachin Patel <sp...@gmail.com>.
It works. manifestFile is a var under MavenArchiveConfiguration so
it needs to be declared under <archive>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
MavenArchiveConfiguration
- sachin
On Mar 17, 2006, at 8:31 AM, Sachin Patel wrote:
> I've opened MNG-2156 on this.
>
> - sachin
>
>
>
> On Mar 16, 2006, at 8:02 PM, Sachin Patel wrote:
>
>> Yes, this is exactly what I have. I took a quick peak at the
>> plugin code and I didn't see any reference to specifying a
>> manifestFile either.
>>
>> ...
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-jar-plugin</artifactId>
>> <configuration>
>> <archive>
>> <manifest>
>> <manifestFile>META-INF/MANIFEST.MF</manifestFile>
>> </manifest>
>> </archive>
>> </configuration>
>> </plugin>
>>
>>
>>
>>
>> - sachin
>>
>>
>>
>> On Mar 16, 2006, at 6:13 PM, Alexandre Poitras wrote:
>>
>>> <build>
>>> <plugins>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>> <artifactId>maven-jar-plugin</artifactId>
>>> <configuration>
>>> <archive>
>>> <manifest>
>>> <manifestFile>/path/to/MANIFEST.MF</manifestFile>
>>> </manifest>
>>> </archive>
>>> </configuration>
>>> </plugin>
>>> </plugins>
>>> </build>
>>>
>>> According to the documentation, this should work. Is it what you
>>> have
>>> in your pom.xml file?
>>>
>>> On 3/16/06, Sachin Patel <sp...@gmail.com> wrote:
>>>> Adding the following manifestFile element failed to work for me
>>>> as I
>>>> get the following error..
>>>>
>>>> [INFO] Failed to configure plugin parameters for:
>>>> org.apache.maven.plugins:maven-jar-plugin:2.1-SNAPSHOT
>>>> Cause: Cannot find setter nor field in
>>>> org.apache.maven.archiver.ManifestConfiguration for 'manifestFile'
>>>>
>>>> Is this element no longer supported? If not, then how can I
>>>> accomplish merging an existing manifest in my project with the
>>>> maven generated one? I'm looking for a replacement for the m1
>>>> manifest override property.
>>>>
>>>> thx
>>>>
>>>> - sachin
>>>>
>>>>
>>>>
>>>> On Dec 30, 2005, at 10:32 PM, Alexandre Poitras wrote:
>>>>
>>>>> And I think to add custom entries, you need to write them in a
>>>>> base
>>>>> manifest file wich you specify to be added to the generated
>>>>> manifest
>>>>> file.
>>>>> You just need to add this line to your plugin configuration :
>>>>>
>>>>> <manifest>
>>>>> <manifestFile>/path/to/MANIFEST.MF</manifestFile>
>>>>> </manifest>
>>>>>
>>>>>
>>>>> On 12/30/05, Alexandre Poitras <al...@gmail.com>
>>>>> wrote:
>>>>>> From your example, I am guessing you are looking for a way to
>>>>>> specify
>>>>>> the classpath.
>>>>>> If that the case, you work too hard. Maven is all about
>>>>>> laziness and
>>>>>> of course it can generate the class path for you :
>>>>>>
>>>>>> <plugins>
>>>>>> <plugin>
>>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>>> <artifactId>maven-jar-plugin</artifactId>
>>>>>> <configuration>
>>>>>> <archive>
>>>>>> <manifest>
>>>>>> <addClasspath>true</addClasspath>
>>>>>> </manifest>
>>>>>> </archive>
>>>>>> </configuration>
>>>>>> </plugin>
>>>>>> </plugins>
>>>>>>
>>>>>> Voilà, everything is always in sync with your dependencies. I
>>>>>> like
>>>>>> the
>>>>>> magic of Maven :)
>>>>>> I hope it help!
>>>>>>
>>>>>> On 12/30/05, Jochen Wiedmann <jo...@gmail.com> wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> how do I add manifest entries to the generated Jar file? I have
>>>>>>> tried
>>>>>>> various things in the style of
>>>>>>>
>>>>>>> <plugin>
>>>>>>> <artifactId>maven-jar-plugin</artifactId>
>>>>>>> <configuration>
>>>>>>> <archive>
>>>>>>> <manifest>
>>>>>>> <manifestEntries>
>>>>>>> <manifestEntry>
>>>>>>> <key>Name</key>
>>>>>>> <value>org/apache/xmlrpc/</value>
>>>>>>> </manifestEntry>
>>>>>>> </manifestEntries>
>>>>>>> </manifest>
>>>>>>> </archive>
>>>>>>> </configuration>
>>>>>>> </plugin>
>>>>>>>
>>>>>>> none of which seem to be working?
>>>>>>>
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Jochen
>>>>>>>
>>>>>>>
>>>>>>> ----------------------------------------------------------------
>>>>>>> ----
>>>>>>> -
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Alexandre Poitras
>>>>>> Québec, Canada
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Alexandre Poitras
>>>>> Québec, Canada
>>>>>
>>>>> ------------------------------------------------------------------
>>>>> ---
>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>>
>>>>
>>>> -------------------------------------------------------------------
>>>> --
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>
>>>
>>> --
>>> Alexandre Poitras
>>> Québec, Canada
>>>
>>> --------------------------------------------------------------------
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven jar plugin: Manifest Entries?
Posted by Sachin Patel <sp...@gmail.com>.
I've opened MNG-2156 on this.
- sachin
On Mar 16, 2006, at 8:02 PM, Sachin Patel wrote:
> Yes, this is exactly what I have. I took a quick peak at the
> plugin code and I didn't see any reference to specifying a
> manifestFile either.
>
> ...
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-jar-plugin</artifactId>
> <configuration>
> <archive>
> <manifest>
> <manifestFile>META-INF/MANIFEST.MF</manifestFile>
> </manifest>
> </archive>
> </configuration>
> </plugin>
>
>
>
>
> - sachin
>
>
>
> On Mar 16, 2006, at 6:13 PM, Alexandre Poitras wrote:
>
>> <build>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-jar-plugin</artifactId>
>> <configuration>
>> <archive>
>> <manifest>
>> <manifestFile>/path/to/MANIFEST.MF</manifestFile>
>> </manifest>
>> </archive>
>> </configuration>
>> </plugin>
>> </plugins>
>> </build>
>>
>> According to the documentation, this should work. Is it what you have
>> in your pom.xml file?
>>
>> On 3/16/06, Sachin Patel <sp...@gmail.com> wrote:
>>> Adding the following manifestFile element failed to work for me as I
>>> get the following error..
>>>
>>> [INFO] Failed to configure plugin parameters for:
>>> org.apache.maven.plugins:maven-jar-plugin:2.1-SNAPSHOT
>>> Cause: Cannot find setter nor field in
>>> org.apache.maven.archiver.ManifestConfiguration for 'manifestFile'
>>>
>>> Is this element no longer supported? If not, then how can I
>>> accomplish merging an existing manifest in my project with the
>>> maven generated one? I'm looking for a replacement for the m1
>>> manifest override property.
>>>
>>> thx
>>>
>>> - sachin
>>>
>>>
>>>
>>> On Dec 30, 2005, at 10:32 PM, Alexandre Poitras wrote:
>>>
>>>> And I think to add custom entries, you need to write them in a base
>>>> manifest file wich you specify to be added to the generated
>>>> manifest
>>>> file.
>>>> You just need to add this line to your plugin configuration :
>>>>
>>>> <manifest>
>>>> <manifestFile>/path/to/MANIFEST.MF</manifestFile>
>>>> </manifest>
>>>>
>>>>
>>>> On 12/30/05, Alexandre Poitras <al...@gmail.com> wrote:
>>>>> From your example, I am guessing you are looking for a way to
>>>>> specify
>>>>> the classpath.
>>>>> If that the case, you work too hard. Maven is all about
>>>>> laziness and
>>>>> of course it can generate the class path for you :
>>>>>
>>>>> <plugins>
>>>>> <plugin>
>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>> <artifactId>maven-jar-plugin</artifactId>
>>>>> <configuration>
>>>>> <archive>
>>>>> <manifest>
>>>>> <addClasspath>true</addClasspath>
>>>>> </manifest>
>>>>> </archive>
>>>>> </configuration>
>>>>> </plugin>
>>>>> </plugins>
>>>>>
>>>>> Voilà, everything is always in sync with your dependencies. I like
>>>>> the
>>>>> magic of Maven :)
>>>>> I hope it help!
>>>>>
>>>>> On 12/30/05, Jochen Wiedmann <jo...@gmail.com> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> how do I add manifest entries to the generated Jar file? I have
>>>>>> tried
>>>>>> various things in the style of
>>>>>>
>>>>>> <plugin>
>>>>>> <artifactId>maven-jar-plugin</artifactId>
>>>>>> <configuration>
>>>>>> <archive>
>>>>>> <manifest>
>>>>>> <manifestEntries>
>>>>>> <manifestEntry>
>>>>>> <key>Name</key>
>>>>>> <value>org/apache/xmlrpc/</value>
>>>>>> </manifestEntry>
>>>>>> </manifestEntries>
>>>>>> </manifest>
>>>>>> </archive>
>>>>>> </configuration>
>>>>>> </plugin>
>>>>>>
>>>>>> none of which seem to be working?
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Jochen
>>>>>>
>>>>>>
>>>>>> -----------------------------------------------------------------
>>>>>> ---
>>>>>> -
>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Alexandre Poitras
>>>>> Québec, Canada
>>>>>
>>>>
>>>>
>>>> --
>>>> Alexandre Poitras
>>>> Québec, Canada
>>>>
>>>> -------------------------------------------------------------------
>>>> --
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>
>>>
>>> --------------------------------------------------------------------
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>>
>> --
>> Alexandre Poitras
>> Québec, Canada
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven jar plugin: Manifest Entries?
Posted by Sachin Patel <sp...@gmail.com>.
Yes, this is exactly what I have. I took a quick peak at the plugin
code and I didn't see any reference to specifying a manifestFile either.
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<manifestFile>META-INF/MANIFEST.MF</manifestFile>
</manifest>
</archive>
</configuration>
</plugin>
- sachin
On Mar 16, 2006, at 6:13 PM, Alexandre Poitras wrote:
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-jar-plugin</artifactId>
> <configuration>
> <archive>
> <manifest>
> <manifestFile>/path/to/MANIFEST.MF</manifestFile>
> </manifest>
> </archive>
> </configuration>
> </plugin>
> </plugins>
> </build>
>
> According to the documentation, this should work. Is it what you have
> in your pom.xml file?
>
> On 3/16/06, Sachin Patel <sp...@gmail.com> wrote:
>> Adding the following manifestFile element failed to work for me as I
>> get the following error..
>>
>> [INFO] Failed to configure plugin parameters for:
>> org.apache.maven.plugins:maven-jar-plugin:2.1-SNAPSHOT
>> Cause: Cannot find setter nor field in
>> org.apache.maven.archiver.ManifestConfiguration for 'manifestFile'
>>
>> Is this element no longer supported? If not, then how can I
>> accomplish merging an existing manifest in my project with the
>> maven generated one? I'm looking for a replacement for the m1
>> manifest override property.
>>
>> thx
>>
>> - sachin
>>
>>
>>
>> On Dec 30, 2005, at 10:32 PM, Alexandre Poitras wrote:
>>
>>> And I think to add custom entries, you need to write them in a base
>>> manifest file wich you specify to be added to the generated manifest
>>> file.
>>> You just need to add this line to your plugin configuration :
>>>
>>> <manifest>
>>> <manifestFile>/path/to/MANIFEST.MF</manifestFile>
>>> </manifest>
>>>
>>>
>>> On 12/30/05, Alexandre Poitras <al...@gmail.com> wrote:
>>>> From your example, I am guessing you are looking for a way to
>>>> specify
>>>> the classpath.
>>>> If that the case, you work too hard. Maven is all about laziness
>>>> and
>>>> of course it can generate the class path for you :
>>>>
>>>> <plugins>
>>>> <plugin>
>>>> <groupId>org.apache.maven.plugins</groupId>
>>>> <artifactId>maven-jar-plugin</artifactId>
>>>> <configuration>
>>>> <archive>
>>>> <manifest>
>>>> <addClasspath>true</addClasspath>
>>>> </manifest>
>>>> </archive>
>>>> </configuration>
>>>> </plugin>
>>>> </plugins>
>>>>
>>>> Voilà, everything is always in sync with your dependencies. I like
>>>> the
>>>> magic of Maven :)
>>>> I hope it help!
>>>>
>>>> On 12/30/05, Jochen Wiedmann <jo...@gmail.com> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> how do I add manifest entries to the generated Jar file? I have
>>>>> tried
>>>>> various things in the style of
>>>>>
>>>>> <plugin>
>>>>> <artifactId>maven-jar-plugin</artifactId>
>>>>> <configuration>
>>>>> <archive>
>>>>> <manifest>
>>>>> <manifestEntries>
>>>>> <manifestEntry>
>>>>> <key>Name</key>
>>>>> <value>org/apache/xmlrpc/</value>
>>>>> </manifestEntry>
>>>>> </manifestEntries>
>>>>> </manifest>
>>>>> </archive>
>>>>> </configuration>
>>>>> </plugin>
>>>>>
>>>>> none of which seem to be working?
>>>>>
>>>>>
>>>>> Regards,
>>>>>
>>>>> Jochen
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------
>>>>> --
>>>>> -
>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Alexandre Poitras
>>>> Québec, Canada
>>>>
>>>
>>>
>>> --
>>> Alexandre Poitras
>>> Québec, Canada
>>>
>>> --------------------------------------------------------------------
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
> --
> Alexandre Poitras
> Québec, Canada
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven jar plugin: Manifest Entries?
Posted by Alexandre Poitras <al...@gmail.com>.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<manifestFile>/path/to/MANIFEST.MF</manifestFile>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
According to the documentation, this should work. Is it what you have
in your pom.xml file?
On 3/16/06, Sachin Patel <sp...@gmail.com> wrote:
> Adding the following manifestFile element failed to work for me as I
> get the following error..
>
> [INFO] Failed to configure plugin parameters for:
> org.apache.maven.plugins:maven-jar-plugin:2.1-SNAPSHOT
> Cause: Cannot find setter nor field in
> org.apache.maven.archiver.ManifestConfiguration for 'manifestFile'
>
> Is this element no longer supported? If not, then how can I
> accomplish merging an existing manifest in my project with the
> maven generated one? I'm looking for a replacement for the m1
> manifest override property.
>
> thx
>
> - sachin
>
>
>
> On Dec 30, 2005, at 10:32 PM, Alexandre Poitras wrote:
>
> > And I think to add custom entries, you need to write them in a base
> > manifest file wich you specify to be added to the generated manifest
> > file.
> > You just need to add this line to your plugin configuration :
> >
> > <manifest>
> > <manifestFile>/path/to/MANIFEST.MF</manifestFile>
> > </manifest>
> >
> >
> > On 12/30/05, Alexandre Poitras <al...@gmail.com> wrote:
> >> From your example, I am guessing you are looking for a way to specify
> >> the classpath.
> >> If that the case, you work too hard. Maven is all about laziness and
> >> of course it can generate the class path for you :
> >>
> >> <plugins>
> >> <plugin>
> >> <groupId>org.apache.maven.plugins</groupId>
> >> <artifactId>maven-jar-plugin</artifactId>
> >> <configuration>
> >> <archive>
> >> <manifest>
> >> <addClasspath>true</addClasspath>
> >> </manifest>
> >> </archive>
> >> </configuration>
> >> </plugin>
> >> </plugins>
> >>
> >> Voilà, everything is always in sync with your dependencies. I like
> >> the
> >> magic of Maven :)
> >> I hope it help!
> >>
> >> On 12/30/05, Jochen Wiedmann <jo...@gmail.com> wrote:
> >>>
> >>> Hi,
> >>>
> >>> how do I add manifest entries to the generated Jar file? I have
> >>> tried
> >>> various things in the style of
> >>>
> >>> <plugin>
> >>> <artifactId>maven-jar-plugin</artifactId>
> >>> <configuration>
> >>> <archive>
> >>> <manifest>
> >>> <manifestEntries>
> >>> <manifestEntry>
> >>> <key>Name</key>
> >>> <value>org/apache/xmlrpc/</value>
> >>> </manifestEntry>
> >>> </manifestEntries>
> >>> </manifest>
> >>> </archive>
> >>> </configuration>
> >>> </plugin>
> >>>
> >>> none of which seem to be working?
> >>>
> >>>
> >>> Regards,
> >>>
> >>> Jochen
> >>>
> >>>
> >>> --------------------------------------------------------------------
> >>> -
> >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>> For additional commands, e-mail: users-help@maven.apache.org
> >>>
> >>>
> >>
> >>
> >> --
> >> Alexandre Poitras
> >> Québec, Canada
> >>
> >
> >
> > --
> > Alexandre Poitras
> > Québec, Canada
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Alexandre Poitras
Québec, Canada
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven jar plugin: Manifest Entries?
Posted by Sachin Patel <sp...@gmail.com>.
Adding the following manifestFile element failed to work for me as I
get the following error..
[INFO] Failed to configure plugin parameters for:
org.apache.maven.plugins:maven-jar-plugin:2.1-SNAPSHOT
Cause: Cannot find setter nor field in
org.apache.maven.archiver.ManifestConfiguration for 'manifestFile'
Is this element no longer supported? If not, then how can I
accomplish merging an existing manifest in my project with the
maven generated one? I'm looking for a replacement for the m1
manifest override property.
thx
- sachin
On Dec 30, 2005, at 10:32 PM, Alexandre Poitras wrote:
> And I think to add custom entries, you need to write them in a base
> manifest file wich you specify to be added to the generated manifest
> file.
> You just need to add this line to your plugin configuration :
>
> <manifest>
> <manifestFile>/path/to/MANIFEST.MF</manifestFile>
> </manifest>
>
>
> On 12/30/05, Alexandre Poitras <al...@gmail.com> wrote:
>> From your example, I am guessing you are looking for a way to specify
>> the classpath.
>> If that the case, you work too hard. Maven is all about laziness and
>> of course it can generate the class path for you :
>>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-jar-plugin</artifactId>
>> <configuration>
>> <archive>
>> <manifest>
>> <addClasspath>true</addClasspath>
>> </manifest>
>> </archive>
>> </configuration>
>> </plugin>
>> </plugins>
>>
>> Voilà, everything is always in sync with your dependencies. I like
>> the
>> magic of Maven :)
>> I hope it help!
>>
>> On 12/30/05, Jochen Wiedmann <jo...@gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> how do I add manifest entries to the generated Jar file? I have
>>> tried
>>> various things in the style of
>>>
>>> <plugin>
>>> <artifactId>maven-jar-plugin</artifactId>
>>> <configuration>
>>> <archive>
>>> <manifest>
>>> <manifestEntries>
>>> <manifestEntry>
>>> <key>Name</key>
>>> <value>org/apache/xmlrpc/</value>
>>> </manifestEntry>
>>> </manifestEntries>
>>> </manifest>
>>> </archive>
>>> </configuration>
>>> </plugin>
>>>
>>> none of which seem to be working?
>>>
>>>
>>> Regards,
>>>
>>> Jochen
>>>
>>>
>>> --------------------------------------------------------------------
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>>
>> --
>> Alexandre Poitras
>> Québec, Canada
>>
>
>
> --
> Alexandre Poitras
> Québec, Canada
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven jar plugin: Manifest Entries?
Posted by Alexandre Poitras <al...@gmail.com>.
And I think to add custom entries, you need to write them in a base
manifest file wich you specify to be added to the generated manifest
file.
You just need to add this line to your plugin configuration :
<manifest>
<manifestFile>/path/to/MANIFEST.MF</manifestFile>
</manifest>
On 12/30/05, Alexandre Poitras <al...@gmail.com> wrote:
> From your example, I am guessing you are looking for a way to specify
> the classpath.
> If that the case, you work too hard. Maven is all about laziness and
> of course it can generate the class path for you :
>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-jar-plugin</artifactId>
> <configuration>
> <archive>
> <manifest>
> <addClasspath>true</addClasspath>
> </manifest>
> </archive>
> </configuration>
> </plugin>
> </plugins>
>
> Voilà, everything is always in sync with your dependencies. I like the
> magic of Maven :)
> I hope it help!
>
> On 12/30/05, Jochen Wiedmann <jo...@gmail.com> wrote:
> >
> > Hi,
> >
> > how do I add manifest entries to the generated Jar file? I have tried
> > various things in the style of
> >
> > <plugin>
> > <artifactId>maven-jar-plugin</artifactId>
> > <configuration>
> > <archive>
> > <manifest>
> > <manifestEntries>
> > <manifestEntry>
> > <key>Name</key>
> > <value>org/apache/xmlrpc/</value>
> > </manifestEntry>
> > </manifestEntries>
> > </manifest>
> > </archive>
> > </configuration>
> > </plugin>
> >
> > none of which seem to be working?
> >
> >
> > Regards,
> >
> > Jochen
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> Alexandre Poitras
> Québec, Canada
>
--
Alexandre Poitras
Québec, Canada
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven jar plugin: Manifest Entries?
Posted by Alexandre Poitras <al...@gmail.com>.
>From your example, I am guessing you are looking for a way to specify
the classpath.
If that the case, you work too hard. Maven is all about laziness and
of course it can generate the class path for you :
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
Voilà, everything is always in sync with your dependencies. I like the
magic of Maven :)
I hope it help!
On 12/30/05, Jochen Wiedmann <jo...@gmail.com> wrote:
>
> Hi,
>
> how do I add manifest entries to the generated Jar file? I have tried
> various things in the style of
>
> <plugin>
> <artifactId>maven-jar-plugin</artifactId>
> <configuration>
> <archive>
> <manifest>
> <manifestEntries>
> <manifestEntry>
> <key>Name</key>
> <value>org/apache/xmlrpc/</value>
> </manifestEntry>
> </manifestEntries>
> </manifest>
> </archive>
> </configuration>
> </plugin>
>
> none of which seem to be working?
>
>
> Regards,
>
> Jochen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Alexandre Poitras
Québec, Canada
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org