activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Share <jsh...@opera.com>
Subject Re: Maven assembly with spring
Date Mon, 10 Dec 2007 12:54:35 GMT
Jonathan Share wrote:
> Nguyen Kien Trung wrote:
>>>
>>> Unfortunately when maven creates the jar file including all 
>>> dependencies it extracts all of the jar files and then re-packages 
>>> them into one. When it does this the 
>>> spring.jar:META-INF/spring-schemas gets overwritten by the 
>>> activemq-core.jar:META-INF/spring-schemas this causes spring to fail 
>>> to locate it's own schema and the spring context fails to initialise 
>>> with an xml parsing error.
>>>
>>
>> AFAIK, default maven assembly doesn't extract dependencies and 
>> repackage them with your classes. So you may want to try that instead 
>> of jar-with-dependencies
>>
>> What i usually do is to configure maven-dependency-plugin to save all 
>> dependencies to an outputDirctory, let's say "lib". And then configure 
>> assembly.xml to include the "lib" into the output archive. In your 
>> case, I would need to configure the manifest to have classpathPrefix 
>> "lib/".
> 
> Thanks for this, it looks like this has got me most of the way, but it 
> seems that using the jar assembly format I cannot see which element I 
> can specify the manifest properties in (the jar plugin has the 
> <configuration><archive><manifest> nodes).
> 
> Have I missed something obvious or do I just need to specify a static 
> manifest rather than generating one?
> 

Finally got this working although slightly "hack-ish". Currently I have 
specified a static manifest file and configured my assembly to create a 
zip file that I then rename to .jar

Seems to work...

Thanks for the help.

Jon

Mime
View raw message