[ https://issues.apache.org/jira/browse/FELIX-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484004 ]
Stuart McCulloch commented on FELIX-262: ---------------------------------------- If you specify the above snippet in the pluginManagement section of the parent pom then you only need to specify three property values in the child pom: <properties> <jar.artifactId>servlet-api</jar.artifactId> <jar.version>2.5</jar.version> <jar.groupId>javax.servlet</jar.groupId> </properties> and also include the dependency plugin in the build list for the child pom (this approach also avoids problems with plugin inheritance): <build> <plugins> <plugin> <artifactId>maven-dependency-plugin</artifactId> </plugin> ... etc ... and the specified artifacts will get pulled into the local repo by the dependency plugin, even though they're not in the usual dependency list. If you need to wrap more than one jar into the bundle then you just need to amend the artifact list in the child pom (this example is for the asm bundle) : <plugin> <artifactId>maven-dependency-plugin</artifactId> <configuration> <artifactItems> <artifactItem> <groupId>${jar.groupId}</groupId> <artifactId>${jar.artifactId}</artifactId> <version>${jar.version}</version> </artifactItem> <artifactItem> <groupId>${jar.groupId}</groupId> <artifactId>${jar.artifactId}-commons</artifactId> <version>${jar.version}</version> </artifactItem> </artifactItems> </configuration> </plugin> ( for a working example checkout the url given above - mvn install, then go to a temp folder and run the SIMPLE_OSGI_PROJECT.sh script ) > Scope of wrapped dependencies from felix commons > ------------------------------------------------ > > Key: FELIX-262 > URL: https://issues.apache.org/jira/browse/FELIX-262 > Project: Felix > Issue Type: Improvement > Components: Felix Commons > Reporter: Alin Dreghiciu > > Most/Some (I did not check) wrapper bundles have the dependency to the > wrapped library expressed without any <scope>. This means that it will be the > default = COMPILE. Nothing wrong till here but by the moment that I will > express a dependency on the wrapper = those from the felix commons, due to > transitivity, will also pull the original wrapped library, fact that is not > required since is already in the bundle. > So, all the pom's must be changed to add a <scope>PROVIDED</scope> to all > dependencies. > If you need help let me know. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.