This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 180616 - Can't build Maven OSGI bundle
Summary: Can't build Maven OSGI bundle
Status: RESOLVED INVALID
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P1 normal (vote)
Assignee: David Simonek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-11 08:41 UTC by Jaroslav Pospisil
Modified: 2010-02-12 07:08 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Pospisil 2010-02-11 08:41:40 UTC
Build 201002090200,Win Vista,JDK1.6.0_18

Create new Maven OSGI bundle and build it.

[bundle:bundle]
[WARNING] Warning building bundle com.mycompany:mavenproject14:bundle:1.0-SNAPSHOT : Instructions in Private-Package, or -testpackages that are never used: \.
[WARNING] Warning building bundle com.mycompany:mavenproject14:bundle:1.0-SNAPSHOT : Did not find matching referal for *
[ERROR]Error building bundle com.mycompany:mavenproject14:bundle:1.0-SNAPSHOT : The JAR is empty
[ERROR]Error(s) found in bundle configuration
------------------------------------------------------------------------
[ERROR]BUILD ERROR
------------------------------------------------------------------------
Error(s) found in bundle configuration


The same result I get even when bundle isn't empty (new class,bundle activator and package added).
Strangely, this worked in the same build yesterday - I've only cleaned .m2 repository today and reloaded it and now it doesn't work,so it's possible this is caused by some recent change in repository.
Comment 1 David Simonek 2010-02-12 06:25:40 UTC
Jaro, building newly created empty OSGi Bundle never worked and it's as designed, while it may seem awkward.

We discussed the problem with mkleint several times and finally I agreed that while it may seem strange, there is some reasoning behind:

- error is self-explaining and once you put some stuff into Bundle, it will work OK (at least for me it did always)
- main problem is that we don't know what to put into newly created Bundle - Bundles are so varying that they don't need Activator for example.

So we would be forced to create some dummy class that would say "hello I'm there just to prevent from building error, feel free to delete me once you put something into the Bundle" - which is even more silly IMHO than current situation and adds extra step of deleting for users.

Hopefully it's clearer now.
Comment 2 Jaroslav Pospisil 2010-02-12 06:54:23 UTC
Well Dafe,you maybe missed that I wrote I got the same behaviour also for non-empty bundle (I've added a class). It works normally today however,so there is probably more complicated problem and I will update and reopen this issue as soon as i'll have 100% reproducible scenario.
Comment 3 David Simonek 2010-02-12 07:08:36 UTC
OK, thanks.