Christian Vogel
unread,Aug 20, 2012, 10:35:22 AM8/20/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to bndtool...@googlegroups.com
Hi,
I know that the title is not saying much, but I didnt know how I can exactly describe my problem as a title.
Following scenario:
* Bundle A has a class BaseException in package a.exceptions which will be exported
* Bundle B has a class InvalidException which extends the BaseException in package b.exceptions which will be exported (Bundle A is on -buildpath)
* Bundle C has a class ClassC with a method "public void doS() throws InvalidException {}" (Bundle B is on -buildpath)
In Eclipse all bundles are correctly build without problems. If I use the console and Ant with clean projects (no bin, bin_test, generated folder) and executes "ant build" I'm getting compiler error:
Buildfile: C:\Users\christian.vogel\indigo_workspace\build.xml
build:
init:
[bndprepare] home .bnd/settings.json C:\Users\christian.vogel
[echo] Enter project A
dependencies:
[subant] No sub-builds to iterate on
compile:
[javac] Compiling 1 source file to C:\Users\christian.vogel\indigo_workspace\A\bin
[javac] C:\Users\christian.vogel\indigo_workspace\A\src\a\exceptions\BaseException.java
build:
init:
[bndprepare] home .bnd/settings.json C:\Users\christian.vogel
[echo] Enter project C
dependencies:
init:
[bndprepare] home .bnd/settings.json C:\Users\christian.vogel
[echo] Enter project A
dependencies:
compile:
build:
init:
[bndprepare] home .bnd/settings.json C:\Users\christian.vogel
[echo] Enter project B
dependencies:
compile:
[javac] Compiling 1 source file to C:\Users\christian.vogel\indigo_workspace\B\bin
[javac] C:\Users\christian.vogel\indigo_workspace\B\src\b\exceptions\InvalidException.java
build:
compile:
[javac] Compiling 1 source file to C:\Users\christian.vogel\indigo_workspace\C\bin
[javac] C:\Users\christian.vogel\indigo_workspace\C\src\c\ClassC.java
[javac] C:\Users\christian.vogel\indigo_workspace\C\src\c\ClassC.java:6: cannot access a.exceptions.BaseException
[javac] class file for a.exceptions.BaseException not found
[javac] public void doS() throws InvalidException {
[javac] ^
[javac] 1 error
If I add Bundle A on Bundle C -buildpath as well it works. But I do not want to add a dependency to Bundle A since Bundle C only uses classes from Bundle B. Is it a bug in Bndtools or Bnd? What can I do?
I think its very crucial and should be reviewed, because if its stay as it is, then I have to add dependencies which are only implicitly as well. :(
Regards.
Christian