Hi,

In Sling we use

         <bundle>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>1.7.4</version>
        </bundle>

which is a real bundle enclosing the really required dependencies of groovy.

Regards
Felix

Am 16.09.2010 09:10, schrieb [email protected]:
>  Hello!
> 
> I have a problem with with libraries, when i'm trying to embed them into
> my bundle using <Embed-Dependency> instruction.
> For example, I have a module A, which has dependency:
> 
> <dependency>
> <groupId>org.codehaus.groovy</groupId>
> <artifactId>groovy</artifactId>
> <version>1.7.0</version>
> </dependency>
> 
> It's not a bundle, so I'm trying to include it into my bundle "A":
> 
> <Embed-Dependency>*;optional=false;scope=compile|runtime</Embed-Dependency>
> <Embed-Transitive>true</Embed-Transitive>
> <Embed-Directory>libs</Embed-Directory>
> 
> If we look at groovy's pom, we'll see many dependencies, most of all
> have flag optional=true. One of these dependencies:
> <dependency>
> <groupId>org.apache.ant</groupId>
> <artifactId>ant</artifactId>
> <version>1.7.1</version>
> <scope>compile</scope>
> <optional>true</optional>
> </dependency>
> 
> <dependency>
> <groupId>bsf</groupId>
> <artifactId>bsf</artifactId>
> <version>2.4.0</version>
> <scope>compile</scope>
> <optional>true</optional>
> <exclusions>
> <exclusion>
> <groupId>commons-logging</groupId>
> <artifactId>commons-logging</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> 
> When I generate a pom for my module I get "Import-Package" directive,
> which contains all packages from my bundle and included libraries, for
> example:
> 
> ...org.apache.tools.ant.taskdefs,org.apache.tools.ant.types,org.apache.tools.ant.util,org.apache.bsf,org.apache.bsf.util...
> 
> 
> and there is no resolution:="optional" or something like that.
> 
> I put a flag "optional=false", however, it has no effect to transitive
> dependencies.
> 
> 1. Is there any way to include simple library (not bundle) into my
> bundle without excluding all transitive packages from my "import"?
> 
> 2. Can bundle plugin set resolution:="optional" for those transitive
> dependencies, which are oprional in pom?
> 
> 3. Maybe, I must use only wrapped libraries in dependencies, which
> already bundles? I don't want to deploy groovy like a bundle, because
> it's unnecessary to share it for all bundles, because it used only in
> one bundle.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to