To do this, use the Maven trick of specifying
<scope>provided</scope>
for the dependency that you know is going to be available in the runtime
environment
(thus shouldn't be included in the package).

I strongly recommend having a look at the possibilities for dependencies, as
it also gives you
the possibility of, for instance, specifying that a library is only for your
unit tests.


moraleslos wrote:
> 
> Thanks for the tip.  That solved the problem.   However, I'm running into
> another dilemma, sort of a catch-22.  In my pom.xml for my SU, I defined
> dependencies for geronimo-spec-activation, geronimo-spec-j2ee-connector,
> etc. since my classes need them for compilation.  However, I do not want
> to package these jars into the SU since they are already in the
> %servicemix_home%/lib directory.  Seems like when I use the
> "jbi-service-unit" packaging, it packages everything defined in the
> dependencies element of the pom.  How can I have successful compilation of
> my classes that reference these external jars yet not have Maven/JBI
> package them into the SU?  thanks in advance!
> 
> -los
> 
> 
> 
> Terry wrote:
>> 
>>> [INFO] The service unit integration-servicemix does not have a 
>>> dependency
>>> which is packaged as a jbi-component or a project property 
>>> 'componentName'
>>> 
>>> 
>>> Not sure what the above error means... does it need the
>>> integration-servicemix to create the zip SU first before the SA can be
>>> created?  If so, how am I suppose to let maven know how to do this?  
>>> Thanks
>>> in advance.
>> 
>> In your service unit, you can define which component the code in the 
>> service unit is to deploy to, for example:
>> 
>> <properties>
>>       <componentName>servicemix-http</componentName>
>> </properties>
>> 
>> This allows you to set the target component if it cannot be resolved 
>> implicitly.
>> 
>> Terry
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/issues-with-Maven-building-SA-tf2468029.html#a6891073
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to