History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: OSMORC-121
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Jan Thomä
Reporter: Jan Thomä
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Osmorc

Import and Export packages are not propagated to the final OSGi Bundle on compilation

Created: 19 Feb 09 13:53   Updated: 10 Sep 09 14:46
Component/s: None
Affects Version/s: 0.11.0
Fix Version/s: 0.12.0

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Zip Archive osgi-test.zip (86 kb)

Issue Links:
Relates
This issue relates to:
OSMORC-44 Use existing .bnd file as option Normal Closed
This issue is related to:
OSMORC-123 Read Placeholders for bnd files from ... Normal Closed


 Description  « Hide
I just started to use plugin, but I found some problem.

I have multi-module maven project (each module is bundle). I imported them to the Idea (though IDEA maven integration, but not through maven-idea-plugin).

In most basic scenario (without imported and exported packages it works). But it not working, when i try to use ".bnd" file or just manage osgi meta-info manually through Osmorc (not through MANIFEST.MF).

So: when I use MANIFEST all is working. When I enter bundle meta-info in the facet config - bundle name, version and other fields are written to the MANIFEST.MF of jar, but not Import and Export packages. When I use "Bnd File" options - nothing is written to the MANIFEST.MF and osgi container even don't recognizes jar as bundle (but through maven, outside Idea, it works, I tested it).

I use Idea 8.0.1 on windows vista, Osmorc 0.11.0, Equinox 3.3.

Osmorc plugin looks very interesting, but I just cant use it with such an errors. May be I make something wrong. Can you please help me?



 All   Comments   Work Log   Change History      Sort Order:
Jan Thomä - 19 Feb 09 21:47
I cannot reproduce this behaviour. Could you please attach one of the BND-files you are using, or post whatever you have entered into the bundle meta info in the osmorc facet?

Jan Thomä - 19 Feb 09 23:03
It looks like BND files were not used always, i fixed that. However i still cannot reproduce your issues when using the values from the facet configuration.

Angel - 20 Feb 09 00:01
Thank you for attention to my issue!

Today I performed additional testing and seems that facet config actually works. It's look like it was problem with old artifacts. They were not updated during make. I deleted "target" directory and it solved the problem.

But .bnd files are still not working (i haven't tried your fix yet). But i prepared mini-version of my test project. I think with this version you can reproduce the problem. i attached it to this issue in osgi-test.zip. (I think you will need unzip, than execute "mvn install" in the project root folder in order to install all artifacts in the local repository, and make them available to IDEA)

In osgi-test/config-bundle/target/ folder you will find two jars:
config-bundle.jar - created by Osmorc plugin
config-bundle-1.0-SNAPSHOT.jar - created by Maven2.

As you can see, even Bundle-SymbolicName is not written to the MANIFES.MF of config-bundle.jar.

You will also find two .bnd files (I tested with both of them):
osgi.bnd - contains placeholders than maven fills during build
osgi-without-placeholders.bnd - simple bnd config withouot any placeholders

I think it would be great also, if you will add support of such placeholders somehow. For example read them rom maven config (directly from pom.xml or through Idea.). but I think if user will be able to fill generic list of placeholders in
facet config it would be also great an useful.


Angel - 20 Feb 09 00:02
Simple project than can reproduce the problem

Jan Thomä - 22 Feb 09 12:55
I have tried my fix with your test project it seems to work there. We plan on releasing Osmorc 0.12 this week, so your issue should be resolved in that release. As for the placeholders, this is a nice idea, which needs some work though, as i am currently trying to find out how i can connect to the maven model using IntellIJs API. Without that, reading variables from maven is quite impossible.

Jan Thomä - 22 Feb 09 12:57
I have added OSMORC-123 for adding placeholder support for bnd files, so this issue can be closed.