Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JGRP-2399] Problem with loading resources from the bundle root (/) in OSGI environment #446

Closed
wants to merge 1 commit into from

Conversation

stalyanov
Copy link

[JGRP-2399] Problem with loading resources from the bundle root (/) in OSGI environment

+moved resources to META-INF/resources
+pushed version to 3.6.20.Final

@belaban
Copy link
Owner

belaban commented Nov 14, 2019

I'll try this out tomorrow, thanks.
Question: this is against branch 3.6 only. Don't you want to apply this against upstream, too? Otherwise, your changes won't be in more recent releases!

@belaban
Copy link
Owner

belaban commented Nov 14, 2019

OK, so this fails as META-INF/resources is not found. This is not a known location; who creates this?

@stalyanov
Copy link
Author

OK, so this fails as META-INF/resources is not found. This is not a known location; who creates this?

@belaban Are you experiencing build or runtime error ? Can you share some more details ?
Resources are copied from /conf to /META-INF/resources by the maven resource plugin

<resources>
            <resource>
                <directory>conf</directory>
                <targetPath>META-INF/resources</targetPath>
                <includes>
                    <include>*.xml</include>
                    <include>*.properties</include>
                </includes>

I was using maven 3.3.9 to build it - the usual mvn clean install

@belaban
Copy link
Owner

belaban commented Nov 15, 2019

I don't use maven to build artifacts, but ant&ivy.

@belaban
Copy link
Owner

belaban commented Nov 15, 2019

I also don't like having to specify META-INF/resources explicitly; this should be on the classpath (or modulepath)!

@stalyanov
Copy link
Author

Hi @belaban ,I see your point ... and my problem is that I need to integrate jgroups 3.6.x as part of a legacy osgi project ... and I am really not sure what are my other options beside moving resources out of the jar root ... I will appreciate if you have any suggestions on this ?

…n OSGI environment

+moved resources to /resources
+pushed version to 3.6.20.Final
@belaban
Copy link
Owner

belaban commented Nov 26, 2019

I don't see what this changes: instead of meta-inf you now use resources. This is a dir that's not created by default...

@stalyanov
Copy link
Author

@belaban , ok, I will move resource directory creation and file copy in ant and I will provide changes for the 4.x version as well...

@belaban
Copy link
Owner

belaban commented Nov 27, 2019

Wait! I don't want to load resources from a special directory within the JAR. If those resources are not on the classpath, then that's an issue with configuration, IMO.
I suggest create your own JAR, based on a release tag (e.g. 3.6.18.Final).
I'm also thinking about dropping OSGi support...

@belaban belaban closed this Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants