bndtools/bndtools — Issue #202: build issue with missing repo
Author: fhuberts
Created: 2011-10-17 20:46:35+00:00
State: open

another stack trace, cause by line 16 in cnf/build.bnd

```
repo: ${user.home}/.obr
```

```
$ ant
Buildfile: /home/ferry/vcs/pelagic/bndtools/bndtools.build/build.xml

init:
[bndprepare] java.io.FileNotFoundException: /home/ferry/.obr/jars/repository.xml (No such file or directory)
[bndprepare]	at java.io.FileInputStream.open(Native Method)
[bndprepare]	at java.io.FileInputStream.(FileInputStream.java:137)
[bndprepare]	at java.io.FileInputStream.(FileInputStream.java:96)
[bndprepare]	at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:87)
[bndprepare]	at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:178)
[bndprepare]	at java.net.URL.openStream(URL.java:1029)
[bndprepare]	at aQute.lib.deployer.obr.AbstractBaseOBR.init(AbstractBaseOBR.java:112)
[bndprepare]	at aQute.lib.deployer.obr.AbstractBaseOBR.getHandles(AbstractBaseOBR.java:165)
[bndprepare]	at aQute.lib.deployer.obr.AbstractBaseOBR.resolveBundle(AbstractBaseOBR.java:409)
[bndprepare]	at aQute.lib.deployer.obr.AbstractBaseOBR.getHandle(AbstractBaseOBR.java:193)
[bndprepare]	at aQute.lib.deployer.obr.AbstractBaseOBR.get(AbstractBaseOBR.java:186)
[bndprepare]	at aQute.bnd.build.Project.getBundle(Project.java:953)
[bndprepare]	at aQute.bnd.build.Project.getBundles(Project.java:458)
[bndprepare]	at aQute.bnd.build.Project.parseRunpath(Project.java:381)
[bndprepare]	at aQute.bnd.build.Project.prepare(Project.java:286)
[bndprepare]	at aQute.bnd.build.Project.getBootclasspath(Project.java:737)
[bndprepare]	at aQute.bnd.build.Project._p_bootclasspath(Project.java:796)
[bndprepare]	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[bndprepare]	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[bndprepare]	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[bndprepare]	at java.lang.reflect.Method.invoke(Method.java:616)
[bndprepare]	at aQute.lib.osgi.Macro.doCommand(Macro.java:210)
[bndprepare]	at aQute.lib.osgi.Macro.doCommands(Macro.java:186)
[bndprepare]	at aQute.lib.osgi.Macro.replace(Macro.java:134)
[bndprepare]	at aQute.lib.osgi.Macro.process(Macro.java:71)
[bndprepare]	at aQute.lib.osgi.Macro.process(Macro.java:86)
[bndprepare]	at aQute.lib.osgi.Macro.process(Macro.java:58)
[bndprepare]	at aQute.lib.osgi.Macro.process(Macro.java:53)
[bndprepare]	at aQute.lib.osgi.Macro.process(Macro.java:949)
[bndprepare]	at aQute.lib.osgi.Macro.getFlattenedProperties(Macro.java:911)
[bndprepare]	at aQute.lib.osgi.Processor.getFlattenedProperties(Processor.java:919)
[bndprepare]	at aQute.bnd.ant.PrepareTask.execute(PrepareTask.java:38)
[bndprepare]	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[bndprepare]	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[bndprepare]	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[bndprepare]	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[bndprepare]	at java.lang.reflect.Method.invoke(Method.java:616)
[bndprepare]	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[bndprepare]	at org.apache.tools.ant.Task.perform(Task.java:348)
[bndprepare]	at org.apache.tools.ant.Target.execute(Target.java:390)
[bndprepare]	at org.apache.tools.ant.Target.performTasks(Target.java:411)
[bndprepare]	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[bndprepare]	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[bndprepare]	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[bndprepare]	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[bndprepare]	at org.apache.tools.ant.Main.runBuild(Main.java:809)
[bndprepare]	at org.apache.tools.ant.Main.startAnt(Main.java:217)
[bndprepare]	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
[bndprepare]	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
[bndprepare] java.io.FileNotFoundException: /home/ferry/.obr/bundles/repository.xml (No such file or directory)
[bndprepare]	at java.io.FileInputStream.open(Native Method)
[bndprepare]	at java.io.FileInputStream.(FileInputStream.java:137)
[bndprepare]	at java.io.FileInputStream.(FileInputStream.java:96)
[bndprepare]	at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:87)
[bndprepare]	at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:178)
[bndprepare]	at java.net.URL.openStream(URL.java:1029)
[bndprepare]	at aQute.lib.deployer.obr.AbstractBaseOBR.init(AbstractBaseOBR.java:112)
[bndprepare]	at aQute.lib.deployer.obr.AbstractBaseOBR.getHandles(AbstractBaseOBR.java:165)
[bndprepare]	at aQute.lib.deployer.obr.AbstractBaseOBR.resolveBundle(AbstractBaseOBR.java:409)
[bndprepare]	at aQute.lib.deployer.obr.AbstractBaseOBR.getHandle(AbstractBaseOBR.java:193)
[bndprepare]	at aQute.lib.deployer.obr.AbstractBaseOBR.get(AbstractBaseOBR.java:186)
[bndprepare]	at aQute.bnd.build.Project.getBundle(Project.java:953)
[bndprepare]	at aQute.bnd.build.Project.getBundles(Project.java:458)
[bndprepare]	at aQute.bnd.build.Project.parseRunpath(Project.java:381)
[bndprepare]	at aQute.bnd.build.Project.prepare(Project.java:286)
[bndprepare]	at aQute.bnd.build.Project.getBootclasspath(Project.java:737)
[bndprepare]	at aQute.bnd.build.Project._p_bootclasspath(Project.java:796)
[bndprepare]	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[bndprepare]	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[bndprepare]	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[bndprepare]	at java.lang.reflect.Method.invoke(Method.java:616)
[bndprepare]	at aQute.lib.osgi.Macro.doCommand(Macro.java:210)
[bndprepare]	at aQute.lib.osgi.Macro.doCommands(Macro.java:186)
[bndprepare]	at aQute.lib.osgi.Macro.replace(Macro.java:134)
[bndprepare]	at aQute.lib.osgi.Macro.process(Macro.java:71)
[bndprepare]	at aQute.lib.osgi.Macro.process(Macro.java:86)
[bndprepare]	at aQute.lib.osgi.Macro.process(Macro.java:58)
[bndprepare]	at aQute.lib.osgi.Macro.process(Macro.java:53)
[bndprepare]	at aQute.lib.osgi.Macro.process(Macro.java:949)
[bndprepare]	at aQute.lib.osgi.Macro.getFlattenedProperties(Macro.java:911)
[bndprepare]	at aQute.lib.osgi.Processor.getFlattenedProperties(Processor.java:919)
[bndprepare]	at aQute.bnd.ant.PrepareTask.execute(PrepareTask.java:38)
[bndprepare]	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[bndprepare]	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[bndprepare]	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[bndprepare]	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[bndprepare]	at java.lang.reflect.Method.invoke(Method.java:616)
[bndprepare]	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[bndprepare]	at org.apache.tools.ant.Task.perform(Task.java:348)
[bndprepare]	at org.apache.tools.ant.Target.execute(Target.java:390)
[bndprepare]	at org.apache.tools.ant.Target.performTasks(Target.java:411)
[bndprepare]	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[bndprepare]	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[bndprepare]	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[bndprepare]	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[bndprepare]	at org.apache.tools.ant.Main.runBuild(Main.java:809)
[bndprepare]	at org.apache.tools.ant.Main.startAnt(Main.java:217)
[bndprepare]	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
[bndprepare]	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
[bndprepare] 1 Errors
[bndprepare] junit.osgi;version=3.8 Not found in [/home/ferry/vcs/pelagic/bndtools/cnf/cache r/w=false, aQute.lib.deployer.obr.OBR@21b64e6a, aQute.lib.deployer.obr.OBR@47d62270, Eclipse-3.5.2]
[bndprepare] Errors during Eclipse Path inspection
[bndprepare]	at aQute.bnd.ant.PrepareTask.execute(PrepareTask.java:40)
[bndprepare]	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[bndprepare]	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[bndprepare]	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[bndprepare]	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[bndprepare]	at java.lang.reflect.Method.invoke(Method.java:616)
[bndprepare]	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[bndprepare]	at org.apache.tools.ant.Task.perform(Task.java:348)
[bndprepare]	at org.apache.tools.ant.Target.execute(Target.java:390)
[bndprepare]	at org.apache.tools.ant.Target.performTasks(Target.java:411)
[bndprepare]	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[bndprepare]	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[bndprepare]	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[bndprepare]	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[bndprepare]	at org.apache.tools.ant.Main.runBuild(Main.java:809)
[bndprepare]	at org.apache.tools.ant.Main.startAnt(Main.java:217)
[bndprepare]	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
[bndprepare]	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

BUILD FAILED
/home/ferry/vcs/pelagic/bndtools/cnf/build.xml:31: Errors during Eclipse Path inspection

Total time: 7 seconds
```

I've solved this by clong our repo repository and creating a symbolic link to it as ~/.obr

but shouldn't we just ignore missing repos?