akhikhl / wuff

Gradle plugin for automating assembly of OSGi/Eclipse bundles and applications
MIT License
153 stars 51 forks source link

privateLib configurations are invisible to other gradle plugins #68

Closed brunobasto closed 1 year ago

brunobasto commented 9 years ago

The other day I was trying to use the maven plugin to publish my project to my local maven repository. It didn't quite work because the maven plugin doesn't know about privateLib configurations. Thus the pom.xml file was generated with missing dependencies in it.

Going through your documentation, this line caught my attention:

"compile" configuration extends from "privateLib"

Maybe if it were the other way around other plugins could interpret privateLib configurations without problems?

ylemoigne commented 9 years ago

The problem will be worst on current snapshot version, as now, the privateLib configuration is no more included in "compile" ( see https://github.com/akhikhl/wuff/issues/54 ). It's just added to sourceSets compile classpath.

Maybe there is a way to add custom configuration into pom generation.

But, If I made no mistake, If a class in privateLib is "leaked" by a bundle API to another one, there is a high risk of problem as they are not loaded by the same classloader. If true, this dependency should be 'bundle-ized' rather than declared as privateLib.

brunobasto commented 9 years ago

@ylemoigne

What I'm actually trying to accomplish is:

I have a projectA with a privateLib configuration. I have a projectB that needs projectA bundle (and some of it's dependencies) to compile.

My first thought was to publish projectA to my local maven repository and in projectB add projectA as a compile dependency.

carlolf commented 9 years ago

Am Mittwoch, 13. Mai 2015 schrieb Bruno Basto :

What I'm actually trying to accomplish is:

I have a projectA with a privateLib configuration I have a projectB that needs projectA bundle (and all it's dependencies) to compile.

My first thought was to publish projectA to my local maven repository and in projectB add projectA as a compile dependency.

— Reply to this email directly or view it on GitHub https://github.com/akhikhl/wuff/issues/68#issuecomment-101685064.

Von Gmail Mobile gesendet

brunobasto commented 9 years ago

@akhikhl Not sure you saw this one :)

akhikhl commented 9 years ago

The initial intent behind privateLib was: to include the artifacts mentioned in privateLib configuration as part of the given OSGi bundle, without exposing them as POM dependencies. Do I get it right, the generated POM gets these dependencies?