You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Barrie Treloar <ba...@gmail.com> on 2006/08/15 08:03:04 UTC

Re: classpath in jar manifest

On 5/11/06, George Zhao <gx...@hotmail.com> wrote:
> We saw the same issue here (two Class-Path entries).
>
> But if we set <addClasspath> to false and put all the known classpath there,
> we can generate one Class-Path entry - not a pretty solution through.
>
> Anybody over there has other workaround for this issue(I believe it is a
> bug)?

This appears to be fixed in the trunk of maven-jar-plugin.
I'm not sure if the snapshot version has the fix in it.
It wasn't until I installed a local build of the trunk that this
problem went away.

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


Re: classpath in jar manifest

Posted by afsilva <an...@pol.pt>.
Hi,

It's a strange behaviour indeed.

having "Class-path", the entry is added to the manifest, but with duplicate
"Class-Path" entry.

Correcting the capitalization to "Class-Path" it works perfectly!!

thanks guys!! =)


baerrach wrote:
> 
> On Wed, Jul 9, 2008 at 7:44 AM, Wayne Fay <wa...@gmail.com> wrote:
>> I suspect your problem is due to improper capitalization:
>>>                        <manifestEntries>
>>> <Class-path>resources/</Class-path>
>>>                        </manifestEntries>
>>
>> I believe this should be <Class-Path>.
> 
> This is what I use:
> 
>         <plugin>
>           <groupId>org.apache.maven.plugins</groupId>
>           <artifactId>maven-jar-plugin</artifactId>
>           <configuration>
>             <archive>
>               <manifestEntries>
>                 <Class-Path>config/</Class-Path>
>               </manifestEntries>
>               <manifest>
>                 <mainClass>fully.qualified.path.to.Main</mainClass>
>                 <addClasspath>true</addClasspath>
>                 <classpathPrefix>lib/</classpathPrefix>
>               </manifest>
>             </archive>
>           </configuration>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/classpath-in-jar-manifest-tp4295266p18368538.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: classpath in jar manifest

Posted by Barrie Treloar <ba...@gmail.com>.
On Wed, Jul 9, 2008 at 7:44 AM, Wayne Fay <wa...@gmail.com> wrote:
> I suspect your problem is due to improper capitalization:
>>                        <manifestEntries>
>> <Class-path>resources/</Class-path>
>>                        </manifestEntries>
>
> I believe this should be <Class-Path>.

This is what I use:

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <configuration>
            <archive>
              <manifestEntries>
                <Class-Path>config/</Class-Path>
              </manifestEntries>
              <manifest>
                <mainClass>fully.qualified.path.to.Main</mainClass>
                <addClasspath>true</addClasspath>
                <classpathPrefix>lib/</classpathPrefix>
              </manifest>
            </archive>
          </configuration>

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


Re: classpath in jar manifest

Posted by Wayne Fay <wa...@gmail.com>.
I suspect your problem is due to improper capitalization:
>                        <manifestEntries>
> <Class-path>resources/</Class-path>
>                        </manifestEntries>

I believe this should be <Class-Path>.

Wayne

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


Re: classpath in jar manifest

Posted by Dennis Lundberg <de...@apache.org>.
Reporting your configuration here, since this list dumps all attachments.


<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-jar-plugin</artifactId>
	<version>2.2</version>
	<configuration>
		<finalName>${project.build.finalName}</finalName>
		<archive>
			<addMavenDescriptor>false</addMavenDescriptor>
			<manifest>
				<addClasspath>true</addClasspath>
				<mainClass>
					com.afsilva.main.AppMainFrame
				</mainClass>
				<addDefaultSpecificationEntries>
					true
				</addDefaultSpecificationEntries>
				<addDefaultImplementationEntries>
					true
				</addDefaultImplementationEntries>
			</manifest>
			<manifestEntries>
				<Class-path>resources/</Class-path>
			</manifestEntries>
		</archive>
	</configuration>
</plugin>


What is the problem you are experiencing?


afsilva wrote:
> Hi,
> 
> My configuration is in the attached file.
> 
> http://www.nabble.com/file/p18345472/pom.xml pom.xml 
> 
> Thanks for the response.
> 
> 
> Dennis Lundberg-2 wrote:
>> What's your configuration?
>>
>> afsilva wrote:
>>> Hi
>>>
>>> this is an old message, I guess the problem is suposed to be solved. But
>>> the
>>> fact is that I'm observing the same strange behaviour with the 2.3
>>> version
>>> of the maven archiver.
>>>
>>> Can anyone give me a hint about this?
>>>
>>>
>>>
>>> baerrach wrote:
>>>> On 8/15/06, Barrie Treloar <ba...@gmail.com> wrote:
>>>>> On 5/11/06, George Zhao <gx...@hotmail.com> wrote:
>>>>>> We saw the same issue here (two Class-Path entries).
>>>>>>
>>>>>> But if we set <addClasspath> to false and put all the known classpath
>>>>> there,
>>>>>> we can generate one Class-Path entry - not a pretty solution through.
>>>>>>
>>>>>> Anybody over there has other workaround for this issue(I believe it is
>>>>> a
>>>>>> bug)?
>>>>> This appears to be fixed in the trunk of maven-jar-plugin.
>>>>> I'm not sure if the snapshot version has the fix in it.
>>>>> It wasn't until I installed a local build of the trunk that this
>>>>> problem went away.
>>>>>
>>>> The fix is included maven-archiver-2.2-SNAPSHOT.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>>
>>
>> -- 
>> Dennis Lundberg
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
> 


-- 
Dennis Lundberg

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


Re: classpath in jar manifest

Posted by afsilva <an...@pol.pt>.
Hi,

My configuration is in the attached file.

http://www.nabble.com/file/p18345472/pom.xml pom.xml 

Thanks for the response.


Dennis Lundberg-2 wrote:
> 
> What's your configuration?
> 
> afsilva wrote:
>> Hi
>> 
>> this is an old message, I guess the problem is suposed to be solved. But
>> the
>> fact is that I'm observing the same strange behaviour with the 2.3
>> version
>> of the maven archiver.
>> 
>> Can anyone give me a hint about this?
>> 
>> 
>> 
>> baerrach wrote:
>>> On 8/15/06, Barrie Treloar <ba...@gmail.com> wrote:
>>>> On 5/11/06, George Zhao <gx...@hotmail.com> wrote:
>>>>> We saw the same issue here (two Class-Path entries).
>>>>>
>>>>> But if we set <addClasspath> to false and put all the known classpath
>>>> there,
>>>>> we can generate one Class-Path entry - not a pretty solution through.
>>>>>
>>>>> Anybody over there has other workaround for this issue(I believe it is
>>>> a
>>>>> bug)?
>>>> This appears to be fixed in the trunk of maven-jar-plugin.
>>>> I'm not sure if the snapshot version has the fix in it.
>>>> It wasn't until I installed a local build of the trunk that this
>>>> problem went away.
>>>>
>>> The fix is included maven-archiver-2.2-SNAPSHOT.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>> 
> 
> 
> -- 
> Dennis Lundberg
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/classpath-in-jar-manifest-tp4295266p18345472.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: classpath in jar manifest

Posted by Dennis Lundberg <de...@apache.org>.
What's your configuration?

afsilva wrote:
> Hi
> 
> this is an old message, I guess the problem is suposed to be solved. But the
> fact is that I'm observing the same strange behaviour with the 2.3 version
> of the maven archiver.
> 
> Can anyone give me a hint about this?
> 
> 
> 
> baerrach wrote:
>> On 8/15/06, Barrie Treloar <ba...@gmail.com> wrote:
>>> On 5/11/06, George Zhao <gx...@hotmail.com> wrote:
>>>> We saw the same issue here (two Class-Path entries).
>>>>
>>>> But if we set <addClasspath> to false and put all the known classpath
>>> there,
>>>> we can generate one Class-Path entry - not a pretty solution through.
>>>>
>>>> Anybody over there has other workaround for this issue(I believe it is
>>> a
>>>> bug)?
>>> This appears to be fixed in the trunk of maven-jar-plugin.
>>> I'm not sure if the snapshot version has the fix in it.
>>> It wasn't until I installed a local build of the trunk that this
>>> problem went away.
>>>
>> The fix is included maven-archiver-2.2-SNAPSHOT.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
> 


-- 
Dennis Lundberg

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


Re: classpath in jar manifest

Posted by afsilva <an...@pol.pt>.
Hi

this is an old message, I guess the problem is suposed to be solved. But the
fact is that I'm observing the same strange behaviour with the 2.3 version
of the maven archiver.

Can anyone give me a hint about this?



baerrach wrote:
> 
> On 8/15/06, Barrie Treloar <ba...@gmail.com> wrote:
>> On 5/11/06, George Zhao <gx...@hotmail.com> wrote:
>> > We saw the same issue here (two Class-Path entries).
>> >
>> > But if we set <addClasspath> to false and put all the known classpath
>> there,
>> > we can generate one Class-Path entry - not a pretty solution through.
>> >
>> > Anybody over there has other workaround for this issue(I believe it is
>> a
>> > bug)?
>>
>> This appears to be fixed in the trunk of maven-jar-plugin.
>> I'm not sure if the snapshot version has the fix in it.
>> It wasn't until I installed a local build of the trunk that this
>> problem went away.
>>
> 
> The fix is included maven-archiver-2.2-SNAPSHOT.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/classpath-in-jar-manifest-tp4295266p18327205.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: classpath in jar manifest

Posted by Barrie Treloar <ba...@gmail.com>.
On 8/15/06, Barrie Treloar <ba...@gmail.com> wrote:
> On 5/11/06, George Zhao <gx...@hotmail.com> wrote:
> > We saw the same issue here (two Class-Path entries).
> >
> > But if we set <addClasspath> to false and put all the known classpath there,
> > we can generate one Class-Path entry - not a pretty solution through.
> >
> > Anybody over there has other workaround for this issue(I believe it is a
> > bug)?
>
> This appears to be fixed in the trunk of maven-jar-plugin.
> I'm not sure if the snapshot version has the fix in it.
> It wasn't until I installed a local build of the trunk that this
> problem went away.
>

The fix is included maven-archiver-2.2-SNAPSHOT.

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